blob: 7ea5a8f557ad22f23b20b894b8e759f3bea500ab [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Neal Norwitz020c46a2006-01-07 21:39:28 +00002# From configure.in Revision: 41925 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00004# Generated by GNU Autoconf 2.59 for python 2.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Skip Montanarof0d5f792004-08-15 14:08:23 +00008# Copyright (C) 2003 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011## --------------------- ##
12## M4sh Initialization. ##
13## --------------------- ##
14
15# Be Bourne compatible
16if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17 emulate sh
18 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000022elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23 set -o posix
24fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000025DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026
Martin v. Löwis11437992002-04-12 09:54:03 +000027# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000029 as_unset=unset
30else
31 as_unset=false
32fi
33
Skip Montanaro6dead952003-09-25 14:50:04 +000034
35# Work around bugs in pre-3.0 UWIN ksh.
36$as_unset ENV MAIL MAILPATH
37PS1='$ '
38PS2='> '
39PS4='+ '
40
41# NLS nuisances.
42for as_var in \
43 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
44 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
45 LC_TELEPHONE LC_TIME
46do
Skip Montanarof0d5f792004-08-15 14:08:23 +000047 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000048 eval $as_var=C; export $as_var
49 else
50 $as_unset $as_var
51 fi
52done
53
54# Required to use basename.
55if expr a : '\(a\)' >/dev/null 2>&1; then
56 as_expr=expr
57else
58 as_expr=false
59fi
60
61if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
62 as_basename=basename
63else
64 as_basename=false
65fi
Martin v. Löwis11437992002-04-12 09:54:03 +000066
67
68# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000069as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000070$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
71 X"$0" : 'X\(//\)$' \| \
72 X"$0" : 'X\(/\)$' \| \
73 . : '\(.\)' 2>/dev/null ||
74echo X/"$0" |
75 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
76 /^X\/\(\/\/\)$/{ s//\1/; q; }
77 /^X\/\(\/\).*/{ s//\1/; q; }
78 s/.*/./; q'`
79
Skip Montanaro6dead952003-09-25 14:50:04 +000080
Martin v. Löwis11437992002-04-12 09:54:03 +000081# PATH needs CR, and LINENO needs CR and PATH.
82# Avoid depending upon Character Ranges.
83as_cr_letters='abcdefghijklmnopqrstuvwxyz'
84as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
85as_cr_Letters=$as_cr_letters$as_cr_LETTERS
86as_cr_digits='0123456789'
87as_cr_alnum=$as_cr_Letters$as_cr_digits
88
89# The user is always right.
90if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000091 echo "#! /bin/sh" >conf$$.sh
92 echo "exit 0" >>conf$$.sh
93 chmod +x conf$$.sh
94 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000095 PATH_SEPARATOR=';'
96 else
97 PATH_SEPARATOR=:
98 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000099 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +0000100fi
101
102
103 as_lineno_1=$LINENO
104 as_lineno_2=$LINENO
105 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
106 test "x$as_lineno_1" != "x$as_lineno_2" &&
107 test "x$as_lineno_3" = "x$as_lineno_2" || {
108 # Find who we are. Look in the path if we contain no path at all
109 # relative or not.
110 case $0 in
111 *[\\/]* ) as_myself=$0 ;;
112 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
113for as_dir in $PATH
114do
115 IFS=$as_save_IFS
116 test -z "$as_dir" && as_dir=.
117 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
118done
119
120 ;;
121 esac
122 # We did not find ourselves, most probably we were run as `sh COMMAND'
123 # in which case we are not to be found in the path.
124 if test "x$as_myself" = x; then
125 as_myself=$0
126 fi
127 if test ! -f "$as_myself"; then
128 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
129 { (exit 1); exit 1; }; }
130 fi
131 case $CONFIG_SHELL in
132 '')
133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
134for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
135do
136 IFS=$as_save_IFS
137 test -z "$as_dir" && as_dir=.
138 for as_base in sh bash ksh sh5; do
139 case $as_dir in
140 /*)
141 if ("$as_dir/$as_base" -c '
142 as_lineno_1=$LINENO
143 as_lineno_2=$LINENO
144 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
145 test "x$as_lineno_1" != "x$as_lineno_2" &&
146 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000147 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
148 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000149 CONFIG_SHELL=$as_dir/$as_base
150 export CONFIG_SHELL
151 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
152 fi;;
153 esac
154 done
155done
156;;
157 esac
158
159 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
160 # uniformly replaced by the line number. The first 'sed' inserts a
161 # line-number line before each line; the second 'sed' does the real
162 # work. The second script uses 'N' to pair each line-number line
163 # with the numbered line, and appends trailing '-' during
164 # substitution so that $LINENO is not a special case at line end.
165 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
166 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
167 sed '=' <$as_myself |
168 sed '
169 N
170 s,$,-,
171 : loop
172 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
173 t loop
174 s,-$,,
175 s,^['$as_cr_digits']*\n,,
176 ' >$as_me.lineno &&
177 chmod +x $as_me.lineno ||
178 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
179 { (exit 1); exit 1; }; }
180
181 # Don't try to exec as it changes $[0], causing all sort of problems
182 # (the dirname of $[0] is not the place where we might find the
183 # original and so on. Autoconf is especially sensible to this).
184 . ./$as_me.lineno
185 # Exit status is that of the last command.
186 exit
187}
188
189
190case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
191 *c*,-n*) ECHO_N= ECHO_C='
192' ECHO_T=' ' ;;
193 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
194 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
195esac
196
197if expr a : '\(a\)' >/dev/null 2>&1; then
198 as_expr=expr
199else
200 as_expr=false
201fi
202
203rm -f conf$$ conf$$.exe conf$$.file
204echo >conf$$.file
205if ln -s conf$$.file conf$$ 2>/dev/null; then
206 # We could just check for DJGPP; but this test a) works b) is more generic
207 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
208 if test -f conf$$.exe; then
209 # Don't use ln at all; we don't have any links
210 as_ln_s='cp -p'
211 else
212 as_ln_s='ln -s'
213 fi
214elif ln conf$$.file conf$$ 2>/dev/null; then
215 as_ln_s=ln
216else
217 as_ln_s='cp -p'
218fi
219rm -f conf$$ conf$$.exe conf$$.file
220
Skip Montanaro6dead952003-09-25 14:50:04 +0000221if mkdir -p . 2>/dev/null; then
222 as_mkdir_p=:
223else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000224 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000225 as_mkdir_p=false
226fi
227
Martin v. Löwis11437992002-04-12 09:54:03 +0000228as_executable_p="test -f"
229
230# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000231as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000232
233# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000234as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000235
236
237# IFS
238# We need space, tab and new line, in precisely that order.
239as_nl='
240'
241IFS=" $as_nl"
242
243# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000244$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000245
246
247# Name of the host.
248# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
249# so uname gets run too.
250ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
251
252exec 6>&1
253
254#
255# Initializations.
256#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000257ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000258ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000259cross_compiling=no
260subdirs=
261MFLAGS=
262MAKEFLAGS=
263SHELL=${CONFIG_SHELL-/bin/sh}
264
265# Maximum number of lines to put in a shell here document.
266# This variable seems obsolete. It should probably be removed, and
267# only ac_max_sed_lines should be used.
268: ${ac_max_here_lines=38}
269
270# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000271PACKAGE_NAME='python'
272PACKAGE_TARNAME='python'
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000273PACKAGE_VERSION='2.5'
274PACKAGE_STRING='python 2.5'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000275PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000276
277ac_unique_file="Include/object.h"
278# Factoring default headers for most tests.
279ac_includes_default="\
280#include <stdio.h>
281#if HAVE_SYS_TYPES_H
282# include <sys/types.h>
283#endif
284#if HAVE_SYS_STAT_H
285# include <sys/stat.h>
286#endif
287#if STDC_HEADERS
288# include <stdlib.h>
289# include <stddef.h>
290#else
291# if HAVE_STDLIB_H
292# include <stdlib.h>
293# endif
294#endif
295#if HAVE_STRING_H
296# if !STDC_HEADERS && HAVE_MEMORY_H
297# include <memory.h>
298# endif
299# include <string.h>
300#endif
301#if HAVE_STRINGS_H
302# include <strings.h>
303#endif
304#if HAVE_INTTYPES_H
305# include <inttypes.h>
306#else
307# if HAVE_STDINT_H
308# include <stdint.h>
309# endif
310#endif
311#if HAVE_UNISTD_H
312# include <unistd.h>
313#endif"
314
Martin v. Löwisdea59e52006-01-05 10:00:36 +0000315ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR SVNVERSION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS OTHER_LIBTOOL_OPT LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000316ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000317
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000319ac_init_help=
320ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000321# The variables have the same names as the options, with
322# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000323cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000324exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000325no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000326no_recursion=
327prefix=NONE
328program_prefix=NONE
329program_suffix=NONE
330program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000333srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000334verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000335x_includes=NONE
336x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000337
338# Installation directory options.
339# These are left unexpanded so users can "make install exec_prefix=/foo"
340# and all the variables that are supposed to be based on exec_prefix
341# by default will actually change.
342# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000343bindir='${exec_prefix}/bin'
344sbindir='${exec_prefix}/sbin'
345libexecdir='${exec_prefix}/libexec'
346datadir='${prefix}/share'
347sysconfdir='${prefix}/etc'
348sharedstatedir='${prefix}/com'
349localstatedir='${prefix}/var'
350libdir='${exec_prefix}/lib'
351includedir='${prefix}/include'
352oldincludedir='/usr/include'
353infodir='${prefix}/info'
354mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000355
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356ac_prev=
357for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000358do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359 # If the previous option needs an argument, assign it.
360 if test -n "$ac_prev"; then
361 eval "$ac_prev=\$ac_option"
362 ac_prev=
363 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000364 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365
Martin v. Löwis11437992002-04-12 09:54:03 +0000366 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000367
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000368 # Accept the important Cygnus configure options, so we can diagnose typos.
369
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000371
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000372 -bindir | --bindir | --bindi | --bind | --bin | --bi)
373 ac_prev=bindir ;;
374 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376
377 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000378 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000379 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000380 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000382 -cache-file | --cache-file | --cache-fil | --cache-fi \
383 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
384 ac_prev=cache_file ;;
385 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
386 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000387 cache_file=$ac_optarg ;;
388
389 --config-cache | -C)
390 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000391
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000392 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
393 ac_prev=datadir ;;
394 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
395 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000397
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000399 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
402 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
403 { (exit 1); exit 1; }; }
404 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
405 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406
407 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000408 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000409 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
412 { (exit 1); exit 1; }; }
413 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
414 case $ac_option in
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416 *) ac_optarg=yes ;;
417 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000418 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000419
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
421 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
422 | --exec | --exe | --ex)
423 ac_prev=exec_prefix ;;
424 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
425 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
426 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000427 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000428
429 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000430 # Obsolete; use --with-gas.
431 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 -help | --help | --hel | --he | -h)
434 ac_init_help=long ;;
435 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
436 ac_init_help=recursive ;;
437 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
438 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439
440 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000445 -includedir | --includedir | --includedi | --included | --include \
446 | --includ | --inclu | --incl | --inc)
447 ac_prev=includedir ;;
448 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
449 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -infodir | --infodir | --infodi | --infod | --info | --inf)
453 ac_prev=infodir ;;
454 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000456
457 -libdir | --libdir | --libdi | --libd)
458 ac_prev=libdir ;;
459 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000461
462 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
463 | --libexe | --libex | --libe)
464 ac_prev=libexecdir ;;
465 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
466 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000467 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000468
469 -localstatedir | --localstatedir | --localstatedi | --localstated \
470 | --localstate | --localstat | --localsta | --localst \
471 | --locals | --local | --loca | --loc | --lo)
472 ac_prev=localstatedir ;;
473 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
474 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
475 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000476 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000477
478 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
479 ac_prev=mandir ;;
480 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000481 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000482
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484 # Obsolete; use --without-fp.
485 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486
487 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000489 no_create=yes ;;
490
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
492 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
493 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000495 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
496 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
497 | --oldin | --oldi | --old | --ol | --o)
498 ac_prev=oldincludedir ;;
499 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
500 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
501 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000502 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000503
Guido van Rossum7f43da71994-08-01 12:15:30 +0000504 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
505 ac_prev=prefix ;;
506 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000507 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000508
509 -program-prefix | --program-prefix | --program-prefi | --program-pref \
510 | --program-pre | --program-pr | --program-p)
511 ac_prev=program_prefix ;;
512 -program-prefix=* | --program-prefix=* | --program-prefi=* \
513 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000514 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000515
516 -program-suffix | --program-suffix | --program-suffi | --program-suff \
517 | --program-suf | --program-su | --program-s)
518 ac_prev=program_suffix ;;
519 -program-suffix=* | --program-suffix=* | --program-suffi=* \
520 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -program-transform-name | --program-transform-name \
524 | --program-transform-nam | --program-transform-na \
525 | --program-transform-n | --program-transform- \
526 | --program-transform | --program-transfor \
527 | --program-transfo | --program-transf \
528 | --program-trans | --program-tran \
529 | --progr-tra | --program-tr | --program-t)
530 ac_prev=program_transform_name ;;
531 -program-transform-name=* | --program-transform-name=* \
532 | --program-transform-nam=* | --program-transform-na=* \
533 | --program-transform-n=* | --program-transform-=* \
534 | --program-transform=* | --program-transfor=* \
535 | --program-transfo=* | --program-transf=* \
536 | --program-trans=* | --program-tran=* \
537 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000538 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000539
540 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
541 | -silent | --silent | --silen | --sile | --sil)
542 silent=yes ;;
543
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000544 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
545 ac_prev=sbindir ;;
546 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
547 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000548 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000549
550 -sharedstatedir | --sharedstatedir | --sharedstatedi \
551 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
552 | --sharedst | --shareds | --shared | --share | --shar \
553 | --sha | --sh)
554 ac_prev=sharedstatedir ;;
555 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
556 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
557 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
558 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000561 -site | --site | --sit)
562 ac_prev=site ;;
563 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565
Guido van Rossum7f43da71994-08-01 12:15:30 +0000566 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
567 ac_prev=srcdir ;;
568 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000570
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000571 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
572 | --syscon | --sysco | --sysc | --sys | --sy)
573 ac_prev=sysconfdir ;;
574 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
575 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000577
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000580 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000581 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000582
583 -v | -verbose | --verbose | --verbos | --verbo | --verb)
584 verbose=yes ;;
585
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 -version | --version | --versio | --versi | --vers | -V)
587 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000588
589 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000590 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000591 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000592 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
593 { echo "$as_me: error: invalid package name: $ac_package" >&2
594 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000596 case $ac_option in
597 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598 *) ac_optarg=yes ;;
599 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000601
602 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000604 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000605 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
606 { echo "$as_me: error: invalid package name: $ac_package" >&2
607 { (exit 1); exit 1; }; }
608 ac_package=`echo $ac_package | sed 's/-/_/g'`
609 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000610
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000611 --x)
612 # Obsolete; use --with-x.
613 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000614
615 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
616 | --x-incl | --x-inc | --x-in | --x-i)
617 ac_prev=x_includes ;;
618 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
619 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000620 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000621
622 -x-libraries | --x-libraries | --x-librarie | --x-librari \
623 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
624 ac_prev=x_libraries ;;
625 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
626 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000627 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000628
Martin v. Löwis11437992002-04-12 09:54:03 +0000629 -*) { echo "$as_me: error: unrecognized option: $ac_option
630Try \`$0 --help' for more information." >&2
631 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000632 ;;
633
Martin v. Löwis11437992002-04-12 09:54:03 +0000634 *=*)
635 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
636 # Reject names that are not valid shell variable names.
637 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
638 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
639 { (exit 1); exit 1; }; }
640 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
641 eval "$ac_envvar='$ac_optarg'"
642 export $ac_envvar ;;
643
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000644 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000645 # FIXME: should be removed in autoconf 3.0.
646 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
647 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
648 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
649 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000650 ;;
651
652 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000653done
654
Guido van Rossum7f43da71994-08-01 12:15:30 +0000655if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000656 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
657 { echo "$as_me: error: missing argument to $ac_option" >&2
658 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000659fi
660
Martin v. Löwis11437992002-04-12 09:54:03 +0000661# Be sure to have absolute paths.
662for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000663do
Martin v. Löwis11437992002-04-12 09:54:03 +0000664 eval ac_val=$`echo $ac_var`
665 case $ac_val in
666 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
667 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
668 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000669 esac
670done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000671
Martin v. Löwis11437992002-04-12 09:54:03 +0000672# Be sure to have absolute paths.
673for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000674 localstatedir libdir includedir oldincludedir infodir mandir
Martin v. Löwis11437992002-04-12 09:54:03 +0000675do
676 eval ac_val=$`echo $ac_var`
677 case $ac_val in
678 [\\/$]* | ?:[\\/]* ) ;;
679 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
680 { (exit 1); exit 1; }; };;
681 esac
682done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000683
Martin v. Löwis11437992002-04-12 09:54:03 +0000684# There might be people who depend on the old broken behavior: `$host'
685# used to hold the argument of --host etc.
686# FIXME: To remove some day.
687build=$build_alias
688host=$host_alias
689target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
Martin v. Löwis11437992002-04-12 09:54:03 +0000691# FIXME: To remove some day.
692if test "x$host_alias" != x; then
693 if test "x$build_alias" = x; then
694 cross_compiling=maybe
695 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
696 If a cross compiler is detected then cross compile mode will be used." >&2
697 elif test "x$build_alias" != "x$host_alias"; then
698 cross_compiling=yes
699 fi
700fi
701
702ac_tool_prefix=
703test -n "$host_alias" && ac_tool_prefix=$host_alias-
704
705test "$silent" = yes && exec 6>/dev/null
706
Guido van Rossum627b2d71993-12-24 10:39:16 +0000707
708# Find the source files, if location was not specified.
709if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000710 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000712 ac_confdir=`(dirname "$0") 2>/dev/null ||
713$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000714 X"$0" : 'X\(//\)[^/]' \| \
715 X"$0" : 'X\(//\)$' \| \
716 X"$0" : 'X\(/\)' \| \
717 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000718echo X"$0" |
719 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
720 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
721 /^X\(\/\/\)$/{ s//\1/; q; }
722 /^X\(\/\).*/{ s//\1/; q; }
723 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000724 srcdir=$ac_confdir
725 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000726 srcdir=..
727 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000728else
729 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000730fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000731if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000732 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000736 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
737 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000738 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000739fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000740(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
741 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
742 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000743srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
744ac_env_build_alias_set=${build_alias+set}
745ac_env_build_alias_value=$build_alias
746ac_cv_env_build_alias_set=${build_alias+set}
747ac_cv_env_build_alias_value=$build_alias
748ac_env_host_alias_set=${host_alias+set}
749ac_env_host_alias_value=$host_alias
750ac_cv_env_host_alias_set=${host_alias+set}
751ac_cv_env_host_alias_value=$host_alias
752ac_env_target_alias_set=${target_alias+set}
753ac_env_target_alias_value=$target_alias
754ac_cv_env_target_alias_set=${target_alias+set}
755ac_cv_env_target_alias_value=$target_alias
756ac_env_CC_set=${CC+set}
757ac_env_CC_value=$CC
758ac_cv_env_CC_set=${CC+set}
759ac_cv_env_CC_value=$CC
760ac_env_CFLAGS_set=${CFLAGS+set}
761ac_env_CFLAGS_value=$CFLAGS
762ac_cv_env_CFLAGS_set=${CFLAGS+set}
763ac_cv_env_CFLAGS_value=$CFLAGS
764ac_env_LDFLAGS_set=${LDFLAGS+set}
765ac_env_LDFLAGS_value=$LDFLAGS
766ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
767ac_cv_env_LDFLAGS_value=$LDFLAGS
768ac_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_env_CPPFLAGS_value=$CPPFLAGS
770ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
771ac_cv_env_CPPFLAGS_value=$CPPFLAGS
772ac_env_CPP_set=${CPP+set}
773ac_env_CPP_value=$CPP
774ac_cv_env_CPP_set=${CPP+set}
775ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776
Martin v. Löwis11437992002-04-12 09:54:03 +0000777#
778# Report the --help message.
779#
780if test "$ac_init_help" = "long"; then
781 # Omit some internal or obsolete options to make the list less imposing.
782 # This message is too long to be a string in the A/UX 3.1 sh.
783 cat <<_ACEOF
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000784\`configure' configures python 2.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785
786Usage: $0 [OPTION]... [VAR=VALUE]...
787
788To assign environment variables (e.g., CC, CFLAGS...), specify them as
789VAR=VALUE. See below for descriptions of some of the useful variables.
790
791Defaults for the options are specified in brackets.
792
793Configuration:
794 -h, --help display this help and exit
795 --help=short display options specific to this package
796 --help=recursive display the short help of all the included packages
797 -V, --version display version information and exit
798 -q, --quiet, --silent do not print \`checking...' messages
799 --cache-file=FILE cache test results in FILE [disabled]
800 -C, --config-cache alias for \`--cache-file=config.cache'
801 -n, --no-create do not create output files
802 --srcdir=DIR find the sources in DIR [configure dir or \`..']
803
804_ACEOF
805
806 cat <<_ACEOF
807Installation directories:
808 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000809 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +0000810 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000811 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +0000812
813By default, \`make install' will install all the files in
814\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
815an installation prefix other than \`$ac_default_prefix' using \`--prefix',
816for instance \`--prefix=\$HOME'.
817
818For better control, use the options below.
819
820Fine tuning of the installation directories:
821 --bindir=DIR user executables [EPREFIX/bin]
822 --sbindir=DIR system admin executables [EPREFIX/sbin]
823 --libexecdir=DIR program executables [EPREFIX/libexec]
824 --datadir=DIR read-only architecture-independent data [PREFIX/share]
825 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
826 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
827 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
828 --libdir=DIR object code libraries [EPREFIX/lib]
829 --includedir=DIR C header files [PREFIX/include]
830 --oldincludedir=DIR C header files for non-gcc [/usr/include]
831 --infodir=DIR info documentation [PREFIX/info]
832 --mandir=DIR man documentation [PREFIX/man]
833_ACEOF
834
835 cat <<\_ACEOF
836_ACEOF
837fi
838
839if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000840 case $ac_init_help in
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000841 short | recursive ) echo "Configuration of python 2.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000842 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 cat <<\_ACEOF
844
845Optional Features:
846 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
847 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000848 --enable-framework[=INSTALLDIR]
849 Build (MacOSX|Darwin) framework
850 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +0000851 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000852 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
853 --enable-ipv6 Enable ipv6 (with ipv4) support
854 --disable-ipv6 Disable ipv6 support
855 --enable-unicode[=ucs[24]]
856 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857
858Optional Packages:
859 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
860 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000861 --without-gcc never use gcc
862 --with-cxx=<compiler> enable C++ support
863 --with-suffix=.exe set executable suffix
864 --with-pydebug build with Py_DEBUG defined
865 --with-libs='lib1 ...' link against additional libs
866 --with-signal-module disable/enable signal module
867 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
868 --with(out)-threads[=DIRECTORY]
869 disable/enable thread support
870 --with(out)-thread[=DIRECTORY]
871 deprecated; use --with(out)-threads
872 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000873 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000874 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000875 --with(out)-pymalloc disable/enable specialized mallocs
876 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000877 --with-fpectl enable SIGFPE catching
878 --with-libm=STRING math library
879 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000880
881Some influential environment variables:
882 CC C compiler command
883 CFLAGS C compiler flags
884 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
885 nonstandard directory <lib dir>
886 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
887 headers in a nonstandard directory <include dir>
888 CPP C preprocessor
889
890Use these variables to override the choices made by `configure' or to help
891it to find libraries and programs with nonstandard names/locations.
892
Martin v. Löwis1d459062005-03-14 21:23:33 +0000893Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +0000894_ACEOF
895fi
896
897if test "$ac_init_help" = "recursive"; then
898 # If there are subdirs, report their specific --help.
899 ac_popdir=`pwd`
900 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
901 test -d $ac_dir || continue
902 ac_builddir=.
903
904if test "$ac_dir" != .; then
905 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
906 # A "../" for each directory in $ac_dir_suffix.
907 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
908else
909 ac_dir_suffix= ac_top_builddir=
910fi
911
912case $srcdir in
913 .) # No --srcdir option. We are building in place.
914 ac_srcdir=.
915 if test -z "$ac_top_builddir"; then
916 ac_top_srcdir=.
917 else
918 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
919 fi ;;
920 [\\/]* | ?:[\\/]* ) # Absolute path.
921 ac_srcdir=$srcdir$ac_dir_suffix;
922 ac_top_srcdir=$srcdir ;;
923 *) # Relative path.
924 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
925 ac_top_srcdir=$ac_top_builddir$srcdir ;;
926esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000927
928# Do not use `cd foo && pwd` to compute absolute paths, because
929# the directories may not exist.
930case `pwd` in
931.) ac_abs_builddir="$ac_dir";;
932*)
933 case "$ac_dir" in
934 .) ac_abs_builddir=`pwd`;;
935 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
936 *) ac_abs_builddir=`pwd`/"$ac_dir";;
937 esac;;
938esac
939case $ac_abs_builddir in
940.) ac_abs_top_builddir=${ac_top_builddir}.;;
941*)
942 case ${ac_top_builddir}. in
943 .) ac_abs_top_builddir=$ac_abs_builddir;;
944 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
945 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_srcdir=$ac_srcdir;;
950*)
951 case $ac_srcdir in
952 .) ac_abs_srcdir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
954 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_top_srcdir=$ac_top_srcdir;;
959*)
960 case $ac_top_srcdir in
961 .) ac_abs_top_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
963 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
964 esac;;
965esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000966
967 cd $ac_dir
968 # Check for guested configure; otherwise get Cygnus style configure.
969 if test -f $ac_srcdir/configure.gnu; then
970 echo
971 $SHELL $ac_srcdir/configure.gnu --help=recursive
972 elif test -f $ac_srcdir/configure; then
973 echo
974 $SHELL $ac_srcdir/configure --help=recursive
975 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000976 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 echo
978 $ac_configure --help
979 else
980 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
981 fi
Brett Cannon43802422005-02-10 20:48:03 +0000982 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 done
984fi
985
986test -n "$ac_init_help" && exit 0
987if $ac_init_version; then
988 cat <<\_ACEOF
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000989python configure 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +0000990generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000991
Skip Montanarof0d5f792004-08-15 14:08:23 +0000992Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000993This configure script is free software; the Free Software Foundation
994gives unlimited permission to copy, distribute and modify it.
995_ACEOF
996 exit 0
997fi
998exec 5>config.log
999cat >&5 <<_ACEOF
1000This file contains any messages produced by compilers while
1001running configure, to aid debugging if configure makes a mistake.
1002
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00001003It was created by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001004generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001005
1006 $ $0 $@
1007
1008_ACEOF
1009{
1010cat <<_ASUNAME
1011## --------- ##
1012## Platform. ##
1013## --------- ##
1014
1015hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1016uname -m = `(uname -m) 2>/dev/null || echo unknown`
1017uname -r = `(uname -r) 2>/dev/null || echo unknown`
1018uname -s = `(uname -s) 2>/dev/null || echo unknown`
1019uname -v = `(uname -v) 2>/dev/null || echo unknown`
1020
1021/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1022/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1023
1024/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1025/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1026/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1027hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1028/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1029/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1030/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1031
1032_ASUNAME
1033
1034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1035for as_dir in $PATH
1036do
1037 IFS=$as_save_IFS
1038 test -z "$as_dir" && as_dir=.
1039 echo "PATH: $as_dir"
1040done
1041
1042} >&5
1043
1044cat >&5 <<_ACEOF
1045
1046
1047## ----------- ##
1048## Core tests. ##
1049## ----------- ##
1050
1051_ACEOF
1052
1053
1054# Keep a trace of the command line.
1055# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001056# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001057# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001058# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001059ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001060ac_configure_args0=
1061ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001062ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001063ac_must_keep_next=false
1064for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001065do
Skip Montanaro6dead952003-09-25 14:50:04 +00001066 for ac_arg
1067 do
1068 case $ac_arg in
1069 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1070 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1071 | -silent | --silent | --silen | --sile | --sil)
1072 continue ;;
1073 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1074 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1075 esac
1076 case $ac_pass in
1077 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1078 2)
1079 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1080 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001081 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001082 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001083 case $ac_arg in
1084 *=* | --config-cache | -C | -disable-* | --disable-* \
1085 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1086 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1087 | -with-* | --with-* | -without-* | --without-* | --x)
1088 case "$ac_configure_args0 " in
1089 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1090 esac
1091 ;;
1092 -* ) ac_must_keep_next=true ;;
1093 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001094 fi
1095 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1096 # Get rid of the leading space.
1097 ac_sep=" "
1098 ;;
1099 esac
1100 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001101done
Skip Montanaro6dead952003-09-25 14:50:04 +00001102$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1103$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001104
1105# When interrupted or exit'd, cleanup temporary files, and complete
1106# config.log. We remove comments because anyway the quotes in there
1107# would cause problems or look ugly.
1108# WARNING: Be sure not to use single quotes in there, as some shells,
1109# such as our DU 5.0 friend, will then `close' the trap.
1110trap 'exit_status=$?
1111 # Save into config.log some information that might help in debugging.
1112 {
1113 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001114
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 cat <<\_ASBOX
1116## ---------------- ##
1117## Cache variables. ##
1118## ---------------- ##
1119_ASBOX
1120 echo
1121 # The following way of writing the cache mishandles newlines in values,
1122{
1123 (set) 2>&1 |
1124 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1125 *ac_space=\ *)
1126 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001127 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1128 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ;;
1130 *)
1131 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001132 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 ;;
1134 esac;
1135}
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137
1138 cat <<\_ASBOX
1139## ----------------- ##
1140## Output variables. ##
1141## ----------------- ##
1142_ASBOX
1143 echo
1144 for ac_var in $ac_subst_vars
1145 do
1146 eval ac_val=$`echo $ac_var`
1147 echo "$ac_var='"'"'$ac_val'"'"'"
1148 done | sort
1149 echo
1150
1151 if test -n "$ac_subst_files"; then
1152 cat <<\_ASBOX
1153## ------------- ##
1154## Output files. ##
1155## ------------- ##
1156_ASBOX
1157 echo
1158 for ac_var in $ac_subst_files
1159 do
1160 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001161 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001162 done | sort
1163 echo
1164 fi
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 if test -s confdefs.h; then
1167 cat <<\_ASBOX
1168## ----------- ##
1169## confdefs.h. ##
1170## ----------- ##
1171_ASBOX
1172 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001173 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 echo
1175 fi
1176 test "$ac_signal" != 0 &&
1177 echo "$as_me: caught signal $ac_signal"
1178 echo "$as_me: exit $exit_status"
1179 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001180 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1182 exit $exit_status
1183 ' 0
1184for ac_signal in 1 2 13 15; do
1185 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1186done
1187ac_signal=0
1188
1189# confdefs.h avoids OS command line length limits that DEFS can exceed.
1190rm -rf conftest* confdefs.h
1191# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1192echo >confdefs.h
1193
1194# Predefined preprocessor variables.
1195
1196cat >>confdefs.h <<_ACEOF
1197#define PACKAGE_NAME "$PACKAGE_NAME"
1198_ACEOF
1199
1200
1201cat >>confdefs.h <<_ACEOF
1202#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1203_ACEOF
1204
1205
1206cat >>confdefs.h <<_ACEOF
1207#define PACKAGE_VERSION "$PACKAGE_VERSION"
1208_ACEOF
1209
1210
1211cat >>confdefs.h <<_ACEOF
1212#define PACKAGE_STRING "$PACKAGE_STRING"
1213_ACEOF
1214
1215
1216cat >>confdefs.h <<_ACEOF
1217#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1218_ACEOF
1219
1220
1221# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222# Prefer explicitly selected file to automatically selected ones.
1223if test -z "$CONFIG_SITE"; then
1224 if test "x$prefix" != xNONE; then
1225 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1226 else
1227 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1228 fi
1229fi
1230for ac_site_file in $CONFIG_SITE; do
1231 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1233echo "$as_me: loading site script $ac_site_file" >&6;}
1234 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235 . "$ac_site_file"
1236 fi
1237done
1238
1239if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 # Some versions of bash will fail to source /dev/null (special
1241 # files actually), so we avoid doing that.
1242 if test -f "$cache_file"; then
1243 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1244echo "$as_me: loading cache $cache_file" >&6;}
1245 case $cache_file in
1246 [\\/]* | ?:[\\/]* ) . $cache_file;;
1247 *) . ./$cache_file;;
1248 esac
1249 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001250else
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1252echo "$as_me: creating cache $cache_file" >&6;}
1253 >$cache_file
1254fi
1255
1256# Check that the precious variables saved in the cache have kept the same
1257# value.
1258ac_cache_corrupted=false
1259for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001260 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1262 eval ac_new_set=\$ac_env_${ac_var}_set
1263 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1264 eval ac_new_val="\$ac_env_${ac_var}_value"
1265 case $ac_old_set,$ac_new_set in
1266 set,)
1267 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1268echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1269 ac_cache_corrupted=: ;;
1270 ,set)
1271 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1272echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1273 ac_cache_corrupted=: ;;
1274 ,);;
1275 *)
1276 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001277 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001278echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001279 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001280echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001281 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001282echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001283 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 fi;;
1285 esac
1286 # Pass precious variables to config.status.
1287 if test "$ac_new_set" = set; then
1288 case $ac_new_val in
1289 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1290 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1291 *) ac_arg=$ac_var=$ac_new_val ;;
1292 esac
1293 case " $ac_configure_args " in
1294 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1295 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1296 esac
1297 fi
1298done
1299if $ac_cache_corrupted; then
1300 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1301echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1302 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1303echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1304 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305fi
1306
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1311ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Michael W. Hudson54241132001-12-07 15:38:26 +00001314
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
Martin v. Löwis88afe662002-10-26 13:47:44 +00001330
1331
1332
1333
1334
1335
1336
1337
1338
Skip Montanaro6dead952003-09-25 14:50:04 +00001339
1340 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343
1344
1345
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001346
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001347
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001348# We don't use PACKAGE_ variables, and they cause conflicts
1349# with other autoconf-based packages that include Python.h
1350grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1351rm confdefs.h
1352mv confdefs.h.new confdefs.h
1353
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001354
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00001355VERSION=2.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001356
Martin v. Löwis1142de32002-03-29 16:28:31 +00001357
1358SOVERSION=1.0
1359
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001360# The later defininition of _XOPEN_SOURCE disables certain features
1361# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1362
1363cat >>confdefs.h <<\_ACEOF
1364#define _GNU_SOURCE 1
1365_ACEOF
1366
1367
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001368# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1369# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1370# them.
1371
1372cat >>confdefs.h <<\_ACEOF
1373#define _NETBSD_SOURCE 1
1374_ACEOF
1375
1376
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001377# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1378# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1379# them.
1380
1381cat >>confdefs.h <<\_ACEOF
1382#define __BSD_VISIBLE 1
1383_ACEOF
1384
1385
Martin v. Löwisd6320502004-08-12 13:45:08 +00001386# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1387# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1388
1389cat >>confdefs.h <<\_ACEOF
1390#define _BSD_TYPES 1
1391_ACEOF
1392
1393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001394define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001395
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001396# Arguments passed to configure.
1397
1398CONFIG_ARGS="$ac_configure_args"
1399
Jack Jansene578a632001-08-15 01:27:14 +00001400# Check whether --enable-framework or --disable-framework was given.
1401if test "${enable_framework+set}" = set; then
1402 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
Jack Jansene578a632001-08-15 01:27:14 +00001404 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001406 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001407 esac
1408 case $enableval in
1409 no)
1410 PYTHONFRAMEWORK=
1411 PYTHONFRAMEWORKDIR=no-framework
1412 PYTHONFRAMEWORKPREFIX=
1413 PYTHONFRAMEWORKINSTALLDIR=
1414 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001415 ;;
1416 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001417 PYTHONFRAMEWORK=Python
1418 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001419 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001420 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1421 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001422 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
Guido van Rossum563e7081996-09-10 18:20:48 +00001424else
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
Jack Jansene578a632001-08-15 01:27:14 +00001426 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001427 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001428 PYTHONFRAMEWORKPREFIX=
1429 PYTHONFRAMEWORKINSTALLDIR=
1430 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001433
1434
1435
1436
Jack Jansene578a632001-08-15 01:27:14 +00001437
1438##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439## AC_HELP_STRING(--with-dyld,
1440## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001441##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001442# Set name for machine-dependent library files
1443
Martin v. Löwis11437992002-04-12 09:54:03 +00001444echo "$as_me:$LINENO: checking MACHDEP" >&5
1445echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001446if test -z "$MACHDEP"
1447then
Guido van Rossum563e7081996-09-10 18:20:48 +00001448 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001449 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1450 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001451 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001452 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001453 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001454 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001455 ac_md_system=`echo $ac_sys_system |
1456 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1457 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001458 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001459 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001460
Guido van Rossum07397971997-04-29 21:49:50 +00001461 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001462 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001463 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001464 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001465 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001466 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001467 esac
1468fi
Guido van Rossum91922671997-10-09 20:24:13 +00001469
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001470# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1471# disable features if it is defined, without any means to access these
1472# features as extensions. For these systems, we skip the definition of
1473# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1474# some feature, make sure there is no alternative way to access this
1475# feature. Also, when using wildcards, make sure you have verified the
1476# need for not defining _XOPEN_SOURCE on all systems matching the
1477# wildcard, and that the wildcard does not include future systems
1478# (which may remove their limitations).
1479case $ac_sys_system/$ac_sys_release in
1480 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1481 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001482 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
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
Martin v. Löwis7dece662005-11-26 11:38:24 +00001526 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
1527 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00001528 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00001529 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00001530
1531cat >>confdefs.h <<\_ACEOF
1532#define _XOPEN_SOURCE 500
1533_ACEOF
1534
1535 ;;
1536 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001537
1538cat >>confdefs.h <<\_ACEOF
1539#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001540_ACEOF
1541
Skip Montanarof0d5f792004-08-15 14:08:23 +00001542 ;;
1543 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001544
1545 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1546 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1547 # several APIs are not declared. Since this is also needed in some
1548 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00001549 # except for Solaris 10, where it must not be defined,
1550 # as it implies XPG4.2
1551 case $ac_sys_system/$ac_sys_release in
1552 SunOS/5.10)
1553 ;;
1554 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001555
1556cat >>confdefs.h <<\_ACEOF
1557#define _XOPEN_SOURCE_EXTENDED 1
1558_ACEOF
1559
Martin v. Löwis7dece662005-11-26 11:38:24 +00001560 ;;
1561 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001562
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001563
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001564cat >>confdefs.h <<\_ACEOF
1565#define _POSIX_C_SOURCE 200112L
1566_ACEOF
1567
1568
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001569fi
1570
Guido van Rossum91922671997-10-09 20:24:13 +00001571#
1572# SGI compilers allow the specification of the both the ABI and the
1573# ISA on the command line. Depending on the values of these switches,
1574# different and often incompatable code will be generated.
1575#
1576# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1577# thus supply support for various ABI/ISA combinations. The MACHDEP
1578# variable is also adjusted.
1579#
1580
1581if test ! -z "$SGI_ABI"
1582then
1583 CC="cc $SGI_ABI"
1584 LDFLAGS="$SGI_ABI $LDFLAGS"
1585 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001587echo "$as_me:$LINENO: result: $MACHDEP" >&5
1588echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001589
Jack Jansen83f898c2002-12-30 22:23:40 +00001590# And add extra plat-mac for darwin
1591
Jack Jansen7b59b422003-03-17 15:44:10 +00001592
Jack Jansen83f898c2002-12-30 22:23:40 +00001593echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1594echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1595if test -z "$EXTRAPLATDIR"
1596then
1597 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001598 darwin)
1599 EXTRAPLATDIR="\$(PLATMACDIRS)"
1600 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1601 ;;
1602 *)
1603 EXTRAPLATDIR=""
1604 EXTRAMACHDEPPATH=""
1605 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001606 esac
1607fi
1608echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1609echo "${ECHO_T}$EXTRAPLATDIR" >&6
1610
Jack Jansen6b08a402004-06-03 12:41:45 +00001611# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1612# it may influence the way we can build extensions, so distutils
1613# needs to check it
1614
1615CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1616
Guido van Rossum627b2d71993-12-24 10:39:16 +00001617# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001618
1619# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1620# for debug/optimization stuff. BASECFLAGS is for flags that are required
1621# just to get things to compile and link. Users are free to override OPT
1622# when running configure or make. The build should not break if they do.
1623# BASECFLAGS should generally not be messed with, however.
1624
1625# XXX shouldn't some/most/all of this code be merged with the stuff later
1626# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001627echo "$as_me:$LINENO: checking for --without-gcc" >&5
1628echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001631if test "${with_gcc+set}" = set; then
1632 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001633
Guido van Rossum7f43da71994-08-01 12:15:30 +00001634 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001635 no) CC=cc
1636 without_gcc=yes;;
1637 yes) CC=gcc
1638 without_gcc=no;;
1639 *) CC=$withval
1640 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001641 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001642else
Martin v. Löwis11437992002-04-12 09:54:03 +00001643
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001644 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001645 AIX*) CC=cc_r
1646 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001647 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001648 case $BE_HOST_CPU in
1649 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001650 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001651 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001652 BASECFLAGS="$BASECFLAGS -export pragma"
1653 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001654 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001655 ;;
1656 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001657 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001658 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001659 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001660 ;;
1661 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001662 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1663echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1664 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001665 ;;
1666 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001667 AR="\$(srcdir)/Modules/ar_beos"
1668 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001669 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001670 Monterey*)
1671 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001672 without_gcc=;;
1673 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001674 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001675fi;
1676echo "$as_me:$LINENO: result: $without_gcc" >&5
1677echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001678
1679
Guido van Rossum95012191999-12-16 17:50:52 +00001680
Fred Drakea1a84e72001-03-06 05:52:16 +00001681MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001682echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1683echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1684
Guido van Rossum95012191999-12-16 17:50:52 +00001685# Check whether --with-cxx or --without-cxx was given.
1686if test "${with_cxx+set}" = set; then
1687 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001688
Martin v. Löwis22352952000-12-13 17:37:02 +00001689 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001690 case $withval in
1691 no) CXX=
1692 with_cxx=no;;
1693 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001694 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001695 with_cxx=$withval;;
1696 esac
1697else
Martin v. Löwis11437992002-04-12 09:54:03 +00001698
Guido van Rossum95012191999-12-16 17:50:52 +00001699 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001700 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001701
Martin v. Löwis11437992002-04-12 09:54:03 +00001702fi;
1703echo "$as_me:$LINENO: result: $with_cxx" >&5
1704echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001705
1706if test "$with_cxx" = "yes"
1707then
Martin v. Löwis11437992002-04-12 09:54:03 +00001708 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1709echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1710 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001711fi
1712
1713
1714
1715
Martin v. Löwis11437992002-04-12 09:54:03 +00001716if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001717then
1718 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1719do
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001721set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001722echo "$as_me:$LINENO: checking for $ac_word" >&5
1723echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1724if test "${ac_cv_prog_CXX+set}" = set; then
1725 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001726else
1727 if test -n "$CXX"; then
1728 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1729else
Martin v. Löwis11437992002-04-12 09:54:03 +00001730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1731for as_dir in $PATH
1732do
1733 IFS=$as_save_IFS
1734 test -z "$as_dir" && as_dir=.
1735 for ac_exec_ext in '' $ac_executable_extensions; do
1736 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1737 ac_cv_prog_CXX="$ac_prog"
1738 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1739 break 2
1740 fi
1741done
1742done
1743
Martin v. Löwis22352952000-12-13 17:37:02 +00001744fi
1745fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001746CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001747if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001748 echo "$as_me:$LINENO: result: $CXX" >&5
1749echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001750else
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 echo "$as_me:$LINENO: result: no" >&5
1752echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001753fi
1754
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001756done
1757test -n "$CXX" || CXX="notfound"
1758
1759 if test "$CXX" = "notfound"
1760 then
1761 CXX=
1762 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001763 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001764ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001765ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1766ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1767ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00001769/* confdefs.h. */
1770_ACEOF
1771cat confdefs.h >>conftest.$ac_ext
1772cat >>conftest.$ac_ext <<_ACEOF
1773/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001774
Martin v. Löwis11437992002-04-12 09:54:03 +00001775int
1776main ()
1777{
Michael W. Hudson54241132001-12-07 15:38:26 +00001778
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 ;
1780 return 0;
1781}
1782_ACEOF
1783ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001784ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001785# Try to create an executable without -o first, disregard a.out.
1786# It will help us diagnose broken compilers, and finding out an intuition
1787# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00001788echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1789echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001790ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1791if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1792 (eval $ac_link_default) 2>&5
1793 ac_status=$?
1794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1795 (exit $ac_status); }; then
1796 # Find the output, starting from the most likely. This scheme is
1797# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1798# resort.
1799
1800# Be careful to initialize this variable, since it used to be cached.
1801# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1802ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001803# b.out is created by i960 compilers.
1804for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1805do
1806 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001807 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001808 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001809 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001810 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001811 # This is the source file.
1812 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001813 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001814 # We found the default executable, but exeext='' is most
1815 # certainly right.
1816 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001817 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001818 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1819 # FIXME: I believe we export ac_cv_exeext for Libtool,
1820 # but it would be cool to find out if it's true. Does anybody
1821 # maintain Libtool? --akim.
1822 export ac_cv_exeext
1823 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001824 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001825 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001826 esac
1827done
1828else
1829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001830sed 's/^/| /' conftest.$ac_ext >&5
1831
1832{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1833See \`config.log' for more details." >&5
1834echo "$as_me: error: C++ compiler cannot create executables
1835See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001836 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001838
1839ac_exeext=$ac_cv_exeext
1840echo "$as_me:$LINENO: result: $ac_file" >&5
1841echo "${ECHO_T}$ac_file" >&6
1842
1843# Check the compiler produces executables we can run. If not, either
1844# the compiler is broken, or we cross compile.
1845echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1846echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1847# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1848# If not cross compiling, check that we can run a simple program.
1849if test "$cross_compiling" != yes; then
1850 if { ac_try='./$ac_file'
1851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1852 (eval $ac_try) 2>&5
1853 ac_status=$?
1854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1855 (exit $ac_status); }; }; then
1856 cross_compiling=no
1857 else
1858 if test "$cross_compiling" = maybe; then
1859 cross_compiling=yes
1860 else
1861 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001862If you meant to cross compile, use \`--host'.
1863See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001864echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001865If you meant to cross compile, use \`--host'.
1866See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001867 { (exit 1); exit 1; }; }
1868 fi
1869 fi
1870fi
1871echo "$as_me:$LINENO: result: yes" >&5
1872echo "${ECHO_T}yes" >&6
1873
Skip Montanaro6dead952003-09-25 14:50:04 +00001874rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001875ac_clean_files=$ac_clean_files_save
1876# Check the compiler produces executables we can run. If not, either
1877# the compiler is broken, or we cross compile.
1878echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1879echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1880echo "$as_me:$LINENO: result: $cross_compiling" >&5
1881echo "${ECHO_T}$cross_compiling" >&6
1882
1883echo "$as_me:$LINENO: checking for suffix of executables" >&5
1884echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1886 (eval $ac_link) 2>&5
1887 ac_status=$?
1888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1889 (exit $ac_status); }; then
1890 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1891# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1892# work properly (i.e., refer to `conftest.exe'), while it won't with
1893# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001894for ac_file in conftest.exe conftest conftest.*; do
1895 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001897 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001898 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001899 export ac_cv_exeext
1900 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001901 * ) break;;
1902 esac
1903done
1904else
Skip Montanaro6dead952003-09-25 14:50:04 +00001905 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1906See \`config.log' for more details." >&5
1907echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1908See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001909 { (exit 1); exit 1; }; }
1910fi
1911
1912rm -f conftest$ac_cv_exeext
1913echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1914echo "${ECHO_T}$ac_cv_exeext" >&6
1915
1916rm -f conftest.$ac_ext
1917EXEEXT=$ac_cv_exeext
1918ac_exeext=$EXEEXT
1919
1920 ac_ext=c
1921ac_cpp='$CPP $CPPFLAGS'
1922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1924ac_compiler_gnu=$ac_cv_c_compiler_gnu
1925
1926
Martin v. Löwis22352952000-12-13 17:37:02 +00001927
1928 fi
1929fi
1930
Guido van Rossum8b131c51995-03-09 14:10:13 +00001931# If the user switches compilers, we can't believe the cache
1932if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1933then
Martin v. Löwis11437992002-04-12 09:54:03 +00001934 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1935(it is also a good idea to do 'make clean' before compiling)" >&5
1936echo "$as_me: error: cached CC is different -- throw away $cache_file
1937(it is also a good idea to do 'make clean' before compiling)" >&2;}
1938 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001939fi
1940
Martin v. Löwis11437992002-04-12 09:54:03 +00001941ac_ext=c
1942ac_cpp='$CPP $CPPFLAGS'
1943ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1944ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1945ac_compiler_gnu=$ac_cv_c_compiler_gnu
1946if test -n "$ac_tool_prefix"; then
1947 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1948set dummy ${ac_tool_prefix}gcc; ac_word=$2
1949echo "$as_me:$LINENO: checking for $ac_word" >&5
1950echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1951if test "${ac_cv_prog_CC+set}" = set; then
1952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001953else
1954 if test -n "$CC"; then
1955 ac_cv_prog_CC="$CC" # Let the user override the test.
1956else
Martin v. Löwis11437992002-04-12 09:54:03 +00001957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1958for as_dir in $PATH
1959do
1960 IFS=$as_save_IFS
1961 test -z "$as_dir" && as_dir=.
1962 for ac_exec_ext in '' $ac_executable_extensions; do
1963 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1964 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1965 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1966 break 2
1967 fi
1968done
1969done
1970
Jack Jansendd19cf82001-12-06 22:36:17 +00001971fi
1972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001973CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001974if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001975 echo "$as_me:$LINENO: result: $CC" >&5
1976echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001977else
Martin v. Löwis11437992002-04-12 09:54:03 +00001978 echo "$as_me:$LINENO: result: no" >&5
1979echo "${ECHO_T}no" >&6
1980fi
1981
1982fi
1983if test -z "$ac_cv_prog_CC"; then
1984 ac_ct_CC=$CC
1985 # Extract the first word of "gcc", so it can be a program name with args.
1986set dummy gcc; ac_word=$2
1987echo "$as_me:$LINENO: checking for $ac_word" >&5
1988echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1989if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1990 echo $ECHO_N "(cached) $ECHO_C" >&6
1991else
1992 if test -n "$ac_ct_CC"; then
1993 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1994else
1995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1996for as_dir in $PATH
1997do
1998 IFS=$as_save_IFS
1999 test -z "$as_dir" && as_dir=.
2000 for ac_exec_ext in '' $ac_executable_extensions; do
2001 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2002 ac_cv_prog_ac_ct_CC="gcc"
2003 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2004 break 2
2005 fi
2006done
2007done
2008
2009fi
2010fi
2011ac_ct_CC=$ac_cv_prog_ac_ct_CC
2012if test -n "$ac_ct_CC"; then
2013 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2014echo "${ECHO_T}$ac_ct_CC" >&6
2015else
2016 echo "$as_me:$LINENO: result: no" >&5
2017echo "${ECHO_T}no" >&6
2018fi
2019
2020 CC=$ac_ct_CC
2021else
2022 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002023fi
2024
Jack Jansendd19cf82001-12-06 22:36:17 +00002025if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002026 if test -n "$ac_tool_prefix"; then
2027 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2028set dummy ${ac_tool_prefix}cc; ac_word=$2
2029echo "$as_me:$LINENO: checking for $ac_word" >&5
2030echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2031if test "${ac_cv_prog_CC+set}" = set; then
2032 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002033else
2034 if test -n "$CC"; then
2035 ac_cv_prog_CC="$CC" # Let the user override the test.
2036else
Martin v. Löwis11437992002-04-12 09:54:03 +00002037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2038for as_dir in $PATH
2039do
2040 IFS=$as_save_IFS
2041 test -z "$as_dir" && as_dir=.
2042 for ac_exec_ext in '' $ac_executable_extensions; do
2043 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2044 ac_cv_prog_CC="${ac_tool_prefix}cc"
2045 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2046 break 2
2047 fi
2048done
2049done
2050
2051fi
2052fi
2053CC=$ac_cv_prog_CC
2054if test -n "$CC"; then
2055 echo "$as_me:$LINENO: result: $CC" >&5
2056echo "${ECHO_T}$CC" >&6
2057else
2058 echo "$as_me:$LINENO: result: no" >&5
2059echo "${ECHO_T}no" >&6
2060fi
2061
2062fi
2063if test -z "$ac_cv_prog_CC"; then
2064 ac_ct_CC=$CC
2065 # Extract the first word of "cc", so it can be a program name with args.
2066set dummy cc; ac_word=$2
2067echo "$as_me:$LINENO: checking for $ac_word" >&5
2068echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2069if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2070 echo $ECHO_N "(cached) $ECHO_C" >&6
2071else
2072 if test -n "$ac_ct_CC"; then
2073 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2074else
2075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2076for as_dir in $PATH
2077do
2078 IFS=$as_save_IFS
2079 test -z "$as_dir" && as_dir=.
2080 for ac_exec_ext in '' $ac_executable_extensions; do
2081 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2082 ac_cv_prog_ac_ct_CC="cc"
2083 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2084 break 2
2085 fi
2086done
2087done
2088
2089fi
2090fi
2091ac_ct_CC=$ac_cv_prog_ac_ct_CC
2092if test -n "$ac_ct_CC"; then
2093 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2094echo "${ECHO_T}$ac_ct_CC" >&6
2095else
2096 echo "$as_me:$LINENO: result: no" >&5
2097echo "${ECHO_T}no" >&6
2098fi
2099
2100 CC=$ac_ct_CC
2101else
2102 CC="$ac_cv_prog_CC"
2103fi
2104
2105fi
2106if test -z "$CC"; then
2107 # Extract the first word of "cc", so it can be a program name with args.
2108set dummy cc; ac_word=$2
2109echo "$as_me:$LINENO: checking for $ac_word" >&5
2110echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2111if test "${ac_cv_prog_CC+set}" = set; then
2112 echo $ECHO_N "(cached) $ECHO_C" >&6
2113else
2114 if test -n "$CC"; then
2115 ac_cv_prog_CC="$CC" # Let the user override the test.
2116else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002117 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2119for as_dir in $PATH
2120do
2121 IFS=$as_save_IFS
2122 test -z "$as_dir" && as_dir=.
2123 for ac_exec_ext in '' $ac_executable_extensions; do
2124 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2125 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2126 ac_prog_rejected=yes
2127 continue
2128 fi
2129 ac_cv_prog_CC="cc"
2130 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2131 break 2
2132 fi
2133done
2134done
2135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002136if test $ac_prog_rejected = yes; then
2137 # We found a bogon in the path, so make sure we never use it.
2138 set dummy $ac_cv_prog_CC
2139 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002140 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002141 # We chose a different compiler from the bogus one.
2142 # However, it has the same basename, so the bogon will be chosen
2143 # first if we set CC to just the basename; use the full file name.
2144 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002145 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002146 fi
2147fi
2148fi
2149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002150CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002151if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002152 echo "$as_me:$LINENO: result: $CC" >&5
2153echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002154else
Martin v. Löwis11437992002-04-12 09:54:03 +00002155 echo "$as_me:$LINENO: result: no" >&5
2156echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002157fi
2158
Martin v. Löwis11437992002-04-12 09:54:03 +00002159fi
2160if test -z "$CC"; then
2161 if test -n "$ac_tool_prefix"; then
2162 for ac_prog in cl
2163 do
2164 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2165set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2166echo "$as_me:$LINENO: checking for $ac_word" >&5
2167echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2168if test "${ac_cv_prog_CC+set}" = set; then
2169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002170else
2171 if test -n "$CC"; then
2172 ac_cv_prog_CC="$CC" # Let the user override the test.
2173else
Martin v. Löwis11437992002-04-12 09:54:03 +00002174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2175for as_dir in $PATH
2176do
2177 IFS=$as_save_IFS
2178 test -z "$as_dir" && as_dir=.
2179 for ac_exec_ext in '' $ac_executable_extensions; do
2180 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2181 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2182 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2183 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002184 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002185done
2186done
2187
2188fi
2189fi
2190CC=$ac_cv_prog_CC
2191if test -n "$CC"; then
2192 echo "$as_me:$LINENO: result: $CC" >&5
2193echo "${ECHO_T}$CC" >&6
2194else
2195 echo "$as_me:$LINENO: result: no" >&5
2196echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002197fi
2198
Martin v. Löwis11437992002-04-12 09:54:03 +00002199 test -n "$CC" && break
2200 done
2201fi
2202if test -z "$CC"; then
2203 ac_ct_CC=$CC
2204 for ac_prog in cl
2205do
2206 # Extract the first word of "$ac_prog", so it can be a program name with args.
2207set dummy $ac_prog; ac_word=$2
2208echo "$as_me:$LINENO: checking for $ac_word" >&5
2209echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2210if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2211 echo $ECHO_N "(cached) $ECHO_C" >&6
2212else
2213 if test -n "$ac_ct_CC"; then
2214 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2215else
2216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2217for as_dir in $PATH
2218do
2219 IFS=$as_save_IFS
2220 test -z "$as_dir" && as_dir=.
2221 for ac_exec_ext in '' $ac_executable_extensions; do
2222 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2223 ac_cv_prog_ac_ct_CC="$ac_prog"
2224 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2225 break 2
2226 fi
2227done
2228done
Jack Jansendd19cf82001-12-06 22:36:17 +00002229
Martin v. Löwis11437992002-04-12 09:54:03 +00002230fi
2231fi
2232ac_ct_CC=$ac_cv_prog_ac_ct_CC
2233if test -n "$ac_ct_CC"; then
2234 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2235echo "${ECHO_T}$ac_ct_CC" >&6
2236else
2237 echo "$as_me:$LINENO: result: no" >&5
2238echo "${ECHO_T}no" >&6
2239fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002240
Martin v. Löwis11437992002-04-12 09:54:03 +00002241 test -n "$ac_ct_CC" && break
2242done
Michael W. Hudson54241132001-12-07 15:38:26 +00002243
Martin v. Löwis11437992002-04-12 09:54:03 +00002244 CC=$ac_ct_CC
2245fi
2246
2247fi
2248
2249
Skip Montanaro6dead952003-09-25 14:50:04 +00002250test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2251See \`config.log' for more details." >&5
2252echo "$as_me: error: no acceptable C compiler found in \$PATH
2253See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002254 { (exit 1); exit 1; }; }
2255
2256# Provide some information about the compiler.
2257echo "$as_me:$LINENO:" \
2258 "checking for C compiler version" >&5
2259ac_compiler=`set X $ac_compile; echo $2`
2260{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2261 (eval $ac_compiler --version </dev/null >&5) 2>&5
2262 ac_status=$?
2263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2264 (exit $ac_status); }
2265{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2266 (eval $ac_compiler -v </dev/null >&5) 2>&5
2267 ac_status=$?
2268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269 (exit $ac_status); }
2270{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2271 (eval $ac_compiler -V </dev/null >&5) 2>&5
2272 ac_status=$?
2273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2274 (exit $ac_status); }
2275
2276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002277/* confdefs.h. */
2278_ACEOF
2279cat confdefs.h >>conftest.$ac_ext
2280cat >>conftest.$ac_ext <<_ACEOF
2281/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002282
Martin v. Löwis11437992002-04-12 09:54:03 +00002283int
2284main ()
2285{
2286
2287 ;
2288 return 0;
2289}
2290_ACEOF
2291ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002292ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002293# Try to create an executable without -o first, disregard a.out.
2294# It will help us diagnose broken compilers, and finding out an intuition
2295# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002296echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2297echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002298ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2299if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2300 (eval $ac_link_default) 2>&5
2301 ac_status=$?
2302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2303 (exit $ac_status); }; then
2304 # Find the output, starting from the most likely. This scheme is
2305# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2306# resort.
2307
2308# Be careful to initialize this variable, since it used to be cached.
2309# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2310ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002311# b.out is created by i960 compilers.
2312for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2313do
2314 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002315 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002316 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002317 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002318 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002319 # This is the source file.
2320 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002321 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002322 # We found the default executable, but exeext='' is most
2323 # certainly right.
2324 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002325 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002326 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2327 # FIXME: I believe we export ac_cv_exeext for Libtool,
2328 # but it would be cool to find out if it's true. Does anybody
2329 # maintain Libtool? --akim.
2330 export ac_cv_exeext
2331 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002332 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002333 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002334 esac
2335done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002336else
Martin v. Löwis11437992002-04-12 09:54:03 +00002337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002338sed 's/^/| /' conftest.$ac_ext >&5
2339
2340{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2341See \`config.log' for more details." >&5
2342echo "$as_me: error: C compiler cannot create executables
2343See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002344 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002345fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002346
Martin v. Löwis11437992002-04-12 09:54:03 +00002347ac_exeext=$ac_cv_exeext
2348echo "$as_me:$LINENO: result: $ac_file" >&5
2349echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002350
Martin v. Löwis11437992002-04-12 09:54:03 +00002351# Check the compiler produces executables we can run. If not, either
2352# the compiler is broken, or we cross compile.
2353echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2354echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2355# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2356# If not cross compiling, check that we can run a simple program.
2357if test "$cross_compiling" != yes; then
2358 if { ac_try='./$ac_file'
2359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2360 (eval $ac_try) 2>&5
2361 ac_status=$?
2362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2363 (exit $ac_status); }; }; then
2364 cross_compiling=no
2365 else
2366 if test "$cross_compiling" = maybe; then
2367 cross_compiling=yes
2368 else
2369 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002370If you meant to cross compile, use \`--host'.
2371See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002372echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002373If you meant to cross compile, use \`--host'.
2374See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002375 { (exit 1); exit 1; }; }
2376 fi
2377 fi
2378fi
2379echo "$as_me:$LINENO: result: yes" >&5
2380echo "${ECHO_T}yes" >&6
2381
Skip Montanaro6dead952003-09-25 14:50:04 +00002382rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002383ac_clean_files=$ac_clean_files_save
2384# Check the compiler produces executables we can run. If not, either
2385# the compiler is broken, or we cross compile.
2386echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2387echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2388echo "$as_me:$LINENO: result: $cross_compiling" >&5
2389echo "${ECHO_T}$cross_compiling" >&6
2390
2391echo "$as_me:$LINENO: checking for suffix of executables" >&5
2392echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2394 (eval $ac_link) 2>&5
2395 ac_status=$?
2396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397 (exit $ac_status); }; then
2398 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2399# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2400# work properly (i.e., refer to `conftest.exe'), while it won't with
2401# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402for ac_file in conftest.exe conftest conftest.*; do
2403 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002406 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002407 export ac_cv_exeext
2408 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 * ) break;;
2410 esac
2411done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002412else
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2414See \`config.log' for more details." >&5
2415echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2416See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002417 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002418fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002419
Martin v. Löwis11437992002-04-12 09:54:03 +00002420rm -f conftest$ac_cv_exeext
2421echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2422echo "${ECHO_T}$ac_cv_exeext" >&6
2423
2424rm -f conftest.$ac_ext
2425EXEEXT=$ac_cv_exeext
2426ac_exeext=$EXEEXT
2427echo "$as_me:$LINENO: checking for suffix of object files" >&5
2428echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2429if test "${ac_cv_objext+set}" = set; then
2430 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002431else
Martin v. Löwis11437992002-04-12 09:54:03 +00002432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002433/* confdefs.h. */
2434_ACEOF
2435cat confdefs.h >>conftest.$ac_ext
2436cat >>conftest.$ac_ext <<_ACEOF
2437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
Martin v. Löwis11437992002-04-12 09:54:03 +00002439int
2440main ()
2441{
2442
2443 ;
2444 return 0;
2445}
2446_ACEOF
2447rm -f conftest.o conftest.obj
2448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2449 (eval $ac_compile) 2>&5
2450 ac_status=$?
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); }; then
2453 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2454 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002455 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2457 break;;
2458 esac
2459done
2460else
2461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002462sed 's/^/| /' conftest.$ac_ext >&5
2463
2464{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2465See \`config.log' for more details." >&5
2466echo "$as_me: error: cannot compute suffix of object files: cannot compile
2467See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 { (exit 1); exit 1; }; }
2469fi
2470
2471rm -f conftest.$ac_cv_objext conftest.$ac_ext
2472fi
2473echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2474echo "${ECHO_T}$ac_cv_objext" >&6
2475OBJEXT=$ac_cv_objext
2476ac_objext=$OBJEXT
2477echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2478echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2479if test "${ac_cv_c_compiler_gnu+set}" = set; then
2480 echo $ECHO_N "(cached) $ECHO_C" >&6
2481else
2482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002483/* confdefs.h. */
2484_ACEOF
2485cat confdefs.h >>conftest.$ac_ext
2486cat >>conftest.$ac_ext <<_ACEOF
2487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002488
Martin v. Löwis11437992002-04-12 09:54:03 +00002489int
2490main ()
2491{
2492#ifndef __GNUC__
2493 choke me
2494#endif
2495
2496 ;
2497 return 0;
2498}
2499_ACEOF
2500rm -f conftest.$ac_objext
2501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002502 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002504 grep -v '^ *+' conftest.er1 >conftest.err
2505 rm -f conftest.er1
2506 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002509 { ac_try='test -z "$ac_c_werror_flag"
2510 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2512 (eval $ac_try) 2>&5
2513 ac_status=$?
2514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515 (exit $ac_status); }; } &&
2516 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2518 (eval $ac_try) 2>&5
2519 ac_status=$?
2520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2521 (exit $ac_status); }; }; then
2522 ac_compiler_gnu=yes
2523else
2524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002525sed 's/^/| /' conftest.$ac_ext >&5
2526
Martin v. Löwis11437992002-04-12 09:54:03 +00002527ac_compiler_gnu=no
2528fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002530ac_cv_c_compiler_gnu=$ac_compiler_gnu
2531
2532fi
2533echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2534echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2535GCC=`test $ac_compiler_gnu = yes && echo yes`
2536ac_test_CFLAGS=${CFLAGS+set}
2537ac_save_CFLAGS=$CFLAGS
2538CFLAGS="-g"
2539echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2540echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2541if test "${ac_cv_prog_cc_g+set}" = set; then
2542 echo $ECHO_N "(cached) $ECHO_C" >&6
2543else
2544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002545/* confdefs.h. */
2546_ACEOF
2547cat confdefs.h >>conftest.$ac_ext
2548cat >>conftest.$ac_ext <<_ACEOF
2549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551int
2552main ()
2553{
2554
2555 ;
2556 return 0;
2557}
2558_ACEOF
2559rm -f conftest.$ac_objext
2560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002561 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002563 grep -v '^ *+' conftest.er1 >conftest.err
2564 rm -f conftest.er1
2565 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2567 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002568 { ac_try='test -z "$ac_c_werror_flag"
2569 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2571 (eval $ac_try) 2>&5
2572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); }; } &&
2575 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2577 (eval $ac_try) 2>&5
2578 ac_status=$?
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002581 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002582else
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002584sed 's/^/| /' conftest.$ac_ext >&5
2585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002587fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002588rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002590echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2591echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002592if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002594elif test $ac_cv_prog_cc_g = yes; then
2595 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002596 CFLAGS="-g -O2"
2597 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002598 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599 fi
2600else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002601 if test "$GCC" = yes; then
2602 CFLAGS="-O2"
2603 else
2604 CFLAGS=
2605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002607echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2608echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2609if test "${ac_cv_prog_cc_stdc+set}" = set; then
2610 echo $ECHO_N "(cached) $ECHO_C" >&6
2611else
2612 ac_cv_prog_cc_stdc=no
2613ac_save_CC=$CC
2614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002615/* confdefs.h. */
2616_ACEOF
2617cat confdefs.h >>conftest.$ac_ext
2618cat >>conftest.$ac_ext <<_ACEOF
2619/* end confdefs.h. */
2620#include <stdarg.h>
2621#include <stdio.h>
2622#include <sys/types.h>
2623#include <sys/stat.h>
2624/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2625struct buf { int x; };
2626FILE * (*rcsopen) (struct buf *, struct stat *, int);
2627static char *e (p, i)
2628 char **p;
2629 int i;
2630{
2631 return p[i];
2632}
2633static char *f (char * (*g) (char **, int), char **p, ...)
2634{
2635 char *s;
2636 va_list v;
2637 va_start (v,p);
2638 s = g (p, va_arg (v,int));
2639 va_end (v);
2640 return s;
2641}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002642
2643/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2644 function prototypes and stuff, but not '\xHH' hex character constants.
2645 These don't provoke an error unfortunately, instead are silently treated
2646 as 'x'. The following induces an error, until -std1 is added to get
2647 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2648 array size at least. It's necessary to write '\x00'==0 to get something
2649 that's true only with -std1. */
2650int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2651
Skip Montanaro6dead952003-09-25 14:50:04 +00002652int test (int i, double x);
2653struct s1 {int (*f) (int a);};
2654struct s2 {int (*f) (double a);};
2655int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2656int argc;
2657char **argv;
2658int
2659main ()
2660{
2661return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2662 ;
2663 return 0;
2664}
2665_ACEOF
2666# Don't try gcc -ansi; that turns off useful extensions and
2667# breaks some systems' header files.
2668# AIX -qlanglvl=ansi
2669# Ultrix and OSF/1 -std1
2670# HP-UX 10.20 and later -Ae
2671# HP-UX older versions -Aa -D_HPUX_SOURCE
2672# SVR4 -Xc -D__EXTENSIONS__
2673for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2674do
2675 CC="$ac_save_CC $ac_arg"
2676 rm -f conftest.$ac_objext
2677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002678 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002680 grep -v '^ *+' conftest.er1 >conftest.err
2681 rm -f conftest.er1
2682 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2684 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002685 { ac_try='test -z "$ac_c_werror_flag"
2686 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2688 (eval $ac_try) 2>&5
2689 ac_status=$?
2690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691 (exit $ac_status); }; } &&
2692 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2694 (eval $ac_try) 2>&5
2695 ac_status=$?
2696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697 (exit $ac_status); }; }; then
2698 ac_cv_prog_cc_stdc=$ac_arg
2699break
2700else
2701 echo "$as_me: failed program was:" >&5
2702sed 's/^/| /' conftest.$ac_ext >&5
2703
2704fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002705rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002706done
2707rm -f conftest.$ac_ext conftest.$ac_objext
2708CC=$ac_save_CC
2709
2710fi
2711
2712case "x$ac_cv_prog_cc_stdc" in
2713 x|xno)
2714 echo "$as_me:$LINENO: result: none needed" >&5
2715echo "${ECHO_T}none needed" >&6 ;;
2716 *)
2717 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2718echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2719 CC="$CC $ac_cv_prog_cc_stdc" ;;
2720esac
2721
Martin v. Löwis11437992002-04-12 09:54:03 +00002722# Some people use a C++ compiler to compile C. Since we use `exit',
2723# in C++ we need to declare it. In case someone uses the same compiler
2724# for both compiling C and C++ we need to have the C++ compiler decide
2725# the declaration of exit, since it's the most demanding environment.
2726cat >conftest.$ac_ext <<_ACEOF
2727#ifndef __cplusplus
2728 choke me
2729#endif
2730_ACEOF
2731rm -f conftest.$ac_objext
2732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 grep -v '^ *+' conftest.er1 >conftest.err
2736 rm -f conftest.er1
2737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002740 { ac_try='test -z "$ac_c_werror_flag"
2741 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2743 (eval $ac_try) 2>&5
2744 ac_status=$?
2745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2746 (exit $ac_status); }; } &&
2747 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2749 (eval $ac_try) 2>&5
2750 ac_status=$?
2751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2752 (exit $ac_status); }; }; then
2753 for ac_declaration in \
Skip Montanarof0d5f792004-08-15 14:08:23 +00002754 '' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 'extern "C" void std::exit (int) throw (); using std::exit;' \
2756 'extern "C" void std::exit (int); using std::exit;' \
2757 'extern "C" void exit (int) throw ();' \
2758 'extern "C" void exit (int);' \
2759 'void exit (int);'
2760do
2761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002762/* confdefs.h. */
2763_ACEOF
2764cat confdefs.h >>conftest.$ac_ext
2765cat >>conftest.$ac_ext <<_ACEOF
2766/* end confdefs.h. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002767$ac_declaration
Skip Montanarof0d5f792004-08-15 14:08:23 +00002768#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002769int
2770main ()
2771{
2772exit (42);
2773 ;
2774 return 0;
2775}
2776_ACEOF
2777rm -f conftest.$ac_objext
2778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002779 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002781 grep -v '^ *+' conftest.er1 >conftest.err
2782 rm -f conftest.er1
2783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2785 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002786 { ac_try='test -z "$ac_c_werror_flag"
2787 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2789 (eval $ac_try) 2>&5
2790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); }; } &&
2793 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2795 (eval $ac_try) 2>&5
2796 ac_status=$?
2797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2798 (exit $ac_status); }; }; then
2799 :
2800else
2801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002802sed 's/^/| /' conftest.$ac_ext >&5
2803
Martin v. Löwis11437992002-04-12 09:54:03 +00002804continue
2805fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002808/* confdefs.h. */
2809_ACEOF
2810cat confdefs.h >>conftest.$ac_ext
2811cat >>conftest.$ac_ext <<_ACEOF
2812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002813$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002814int
2815main ()
2816{
2817exit (42);
2818 ;
2819 return 0;
2820}
2821_ACEOF
2822rm -f conftest.$ac_objext
2823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002824 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002826 grep -v '^ *+' conftest.er1 >conftest.err
2827 rm -f conftest.er1
2828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2830 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002831 { ac_try='test -z "$ac_c_werror_flag"
2832 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2834 (eval $ac_try) 2>&5
2835 ac_status=$?
2836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837 (exit $ac_status); }; } &&
2838 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2840 (eval $ac_try) 2>&5
2841 ac_status=$?
2842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2843 (exit $ac_status); }; }; then
2844 break
2845else
2846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002847sed 's/^/| /' conftest.$ac_ext >&5
2848
Martin v. Löwis11437992002-04-12 09:54:03 +00002849fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002851done
2852rm -f conftest*
2853if test -n "$ac_declaration"; then
2854 echo '#ifdef __cplusplus' >>confdefs.h
2855 echo $ac_declaration >>confdefs.h
2856 echo '#endif' >>confdefs.h
2857fi
2858
2859else
2860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002861sed 's/^/| /' conftest.$ac_ext >&5
2862
Martin v. Löwis11437992002-04-12 09:54:03 +00002863fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002864rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002865ac_ext=c
2866ac_cpp='$CPP $CPPFLAGS'
2867ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2868ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2869ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002870
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002871
2872# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002873
2874ac_ext=c
2875ac_cpp='$CPP $CPPFLAGS'
2876ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2877ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2878ac_compiler_gnu=$ac_cv_c_compiler_gnu
2879echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2880echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002881# On Suns, sometimes $CPP names a directory.
2882if test -n "$CPP" && test -d "$CPP"; then
2883 CPP=
2884fi
2885if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 if test "${ac_cv_prog_CPP+set}" = set; then
2887 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002888else
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 # Double quotes because CPP needs to be expanded
2890 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2891 do
2892 ac_preproc_ok=false
2893for ac_c_preproc_warn_flag in '' yes
2894do
2895 # Use a header file that comes with gcc, so configuring glibc
2896 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002897 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2898 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002899 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 # not just through cpp. "Syntax error" is here to catch this case.
2901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002902/* confdefs.h. */
2903_ACEOF
2904cat confdefs.h >>conftest.$ac_ext
2905cat >>conftest.$ac_ext <<_ACEOF
2906/* end confdefs.h. */
2907#ifdef __STDC__
2908# include <limits.h>
2909#else
2910# include <assert.h>
2911#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002912 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002913_ACEOF
2914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2916 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002917 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 rm -f conftest.er1
2919 cat conftest.err >&5
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); } >/dev/null; then
2922 if test -s conftest.err; then
2923 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002924 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 else
2926 ac_cpp_err=
2927 fi
2928else
2929 ac_cpp_err=yes
2930fi
2931if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002932 :
2933else
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002935sed 's/^/| /' conftest.$ac_ext >&5
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 # Broken: fails on valid input.
2938continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002940rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002941
Martin v. Löwis11437992002-04-12 09:54:03 +00002942 # OK, works on sane cases. Now check whether non-existent headers
2943 # can be detected and how.
2944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002945/* confdefs.h. */
2946_ACEOF
2947cat confdefs.h >>conftest.$ac_ext
2948cat >>conftest.$ac_ext <<_ACEOF
2949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002950#include <ac_nonexistent.h>
2951_ACEOF
2952if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2953 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2954 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002955 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002956 rm -f conftest.er1
2957 cat conftest.err >&5
2958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2959 (exit $ac_status); } >/dev/null; then
2960 if test -s conftest.err; then
2961 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002962 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002963 else
2964 ac_cpp_err=
2965 fi
2966else
2967 ac_cpp_err=yes
2968fi
2969if test -z "$ac_cpp_err"; then
2970 # Broken: success on invalid input.
2971continue
2972else
2973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002974sed 's/^/| /' conftest.$ac_ext >&5
2975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976 # Passes both tests.
2977ac_preproc_ok=:
2978break
2979fi
2980rm -f conftest.err conftest.$ac_ext
2981
2982done
2983# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2984rm -f conftest.err conftest.$ac_ext
2985if $ac_preproc_ok; then
2986 break
2987fi
2988
2989 done
2990 ac_cv_prog_CPP=$CPP
2991
2992fi
2993 CPP=$ac_cv_prog_CPP
2994else
2995 ac_cv_prog_CPP=$CPP
2996fi
2997echo "$as_me:$LINENO: result: $CPP" >&5
2998echo "${ECHO_T}$CPP" >&6
2999ac_preproc_ok=false
3000for ac_c_preproc_warn_flag in '' yes
3001do
3002 # Use a header file that comes with gcc, so configuring glibc
3003 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003004 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3005 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003006 # On the NeXT, cc -E runs the code through the compiler's parser,
3007 # not just through cpp. "Syntax error" is here to catch this case.
3008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003009/* confdefs.h. */
3010_ACEOF
3011cat confdefs.h >>conftest.$ac_ext
3012cat >>conftest.$ac_ext <<_ACEOF
3013/* end confdefs.h. */
3014#ifdef __STDC__
3015# include <limits.h>
3016#else
3017# include <assert.h>
3018#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003019 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003020_ACEOF
3021if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3022 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3023 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003024 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003025 rm -f conftest.er1
3026 cat conftest.err >&5
3027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3028 (exit $ac_status); } >/dev/null; then
3029 if test -s conftest.err; then
3030 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003031 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003032 else
3033 ac_cpp_err=
3034 fi
3035else
3036 ac_cpp_err=yes
3037fi
3038if test -z "$ac_cpp_err"; then
3039 :
3040else
3041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003042sed 's/^/| /' conftest.$ac_ext >&5
3043
Martin v. Löwis11437992002-04-12 09:54:03 +00003044 # Broken: fails on valid input.
3045continue
3046fi
3047rm -f conftest.err conftest.$ac_ext
3048
3049 # OK, works on sane cases. Now check whether non-existent headers
3050 # can be detected and how.
3051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003052/* confdefs.h. */
3053_ACEOF
3054cat confdefs.h >>conftest.$ac_ext
3055cat >>conftest.$ac_ext <<_ACEOF
3056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003057#include <ac_nonexistent.h>
3058_ACEOF
3059if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3060 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3061 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003062 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003063 rm -f conftest.er1
3064 cat conftest.err >&5
3065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3066 (exit $ac_status); } >/dev/null; then
3067 if test -s conftest.err; then
3068 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003069 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003070 else
3071 ac_cpp_err=
3072 fi
3073else
3074 ac_cpp_err=yes
3075fi
3076if test -z "$ac_cpp_err"; then
3077 # Broken: success on invalid input.
3078continue
3079else
3080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003081sed 's/^/| /' conftest.$ac_ext >&5
3082
Martin v. Löwis11437992002-04-12 09:54:03 +00003083 # Passes both tests.
3084ac_preproc_ok=:
3085break
3086fi
3087rm -f conftest.err conftest.$ac_ext
3088
3089done
3090# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3091rm -f conftest.err conftest.$ac_ext
3092if $ac_preproc_ok; then
3093 :
3094else
Skip Montanaro6dead952003-09-25 14:50:04 +00003095 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3096See \`config.log' for more details." >&5
3097echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3098See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003099 { (exit 1); exit 1; }; }
3100fi
3101
3102ac_ext=c
3103ac_cpp='$CPP $CPPFLAGS'
3104ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3105ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3106ac_compiler_gnu=$ac_cv_c_compiler_gnu
3107
3108
Skip Montanaro6dead952003-09-25 14:50:04 +00003109echo "$as_me:$LINENO: checking for egrep" >&5
3110echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3111if test "${ac_cv_prog_egrep+set}" = set; then
3112 echo $ECHO_N "(cached) $ECHO_C" >&6
3113else
3114 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3115 then ac_cv_prog_egrep='grep -E'
3116 else ac_cv_prog_egrep='egrep'
3117 fi
3118fi
3119echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3120echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3121 EGREP=$ac_cv_prog_egrep
3122
3123
Martin v. Löwis11437992002-04-12 09:54:03 +00003124
3125echo "$as_me:$LINENO: checking for AIX" >&5
3126echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003128/* confdefs.h. */
3129_ACEOF
3130cat confdefs.h >>conftest.$ac_ext
3131cat >>conftest.$ac_ext <<_ACEOF
3132/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003133#ifdef _AIX
3134 yes
3135#endif
3136
Martin v. Löwis11437992002-04-12 09:54:03 +00003137_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003139 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003140 echo "$as_me:$LINENO: result: yes" >&5
3141echo "${ECHO_T}yes" >&6
3142cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003143#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003144_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003145
3146else
Martin v. Löwis11437992002-04-12 09:54:03 +00003147 echo "$as_me:$LINENO: result: no" >&5
3148echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003149fi
3150rm -f conftest*
3151
Michael W. Hudson54241132001-12-07 15:38:26 +00003152
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003153
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003154# Check for unsupported systems
3155case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003156Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003157 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3158 echo See README for details.
3159 exit 1;;
3160esac
3161
Michael W. Hudson54241132001-12-07 15:38:26 +00003162
Martin v. Löwis11437992002-04-12 09:54:03 +00003163echo "$as_me:$LINENO: checking for --with-suffix" >&5
3164echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003165
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003166# Check whether --with-suffix or --without-suffix was given.
3167if test "${with_suffix+set}" = set; then
3168 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003170 case $withval in
3171 no) EXEEXT=;;
3172 yes) EXEEXT=.exe;;
3173 *) EXEEXT=$withval;;
3174 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003175fi;
3176echo "$as_me:$LINENO: result: $EXEEXT" >&5
3177echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003178
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003179# Test whether we're running on a non-case-sensitive system, in which
3180# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003181
Martin v. Löwis11437992002-04-12 09:54:03 +00003182echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3183echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003184if test ! -d CaseSensitiveTestDir; then
3185mkdir CaseSensitiveTestDir
3186fi
3187
3188if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003189then
Martin v. Löwis11437992002-04-12 09:54:03 +00003190 echo "$as_me:$LINENO: result: yes" >&5
3191echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003192 BUILDEXEEXT=.exe
3193else
Martin v. Löwis11437992002-04-12 09:54:03 +00003194 echo "$as_me:$LINENO: result: no" >&5
3195echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003196 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003197fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003198rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003199
Guido van Rossumdd997f71998-10-07 19:58:26 +00003200case $MACHDEP in
3201bsdos*)
3202 case $CC in
3203 gcc) CC="$CC -D_HAVE_BSDI";;
3204 esac;;
3205esac
3206
Guido van Rossum24b1e751997-08-21 02:29:16 +00003207case $ac_sys_system in
3208hp*|HP*)
3209 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003210 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003211 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003212Monterey*)
3213 case $CC in
3214 cc) CC="$CC -Wl,-Bexport";;
3215 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003216SunOS*)
3217 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003218
3219cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003220#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003221_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003222
3223 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003224esac
3225
Michael W. Hudson54241132001-12-07 15:38:26 +00003226
3227
Martin v. Löwis11437992002-04-12 09:54:03 +00003228echo "$as_me:$LINENO: checking LIBRARY" >&5
3229echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003230if test -z "$LIBRARY"
3231then
3232 LIBRARY='libpython$(VERSION).a'
3233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003234echo "$as_me:$LINENO: result: $LIBRARY" >&5
3235echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003236
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003237# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003238# name of the library into which to insert object files). BLDLIBRARY is also
3239# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3240# is blank as the main program is not linked directly against LDLIBRARY.
3241# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3242# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3243# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3244# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003245#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003246# RUNSHARED is used to run shared python without installed libraries
3247#
3248# INSTSONAME is the name of the shared library that will be use to install
3249# on the system - some systems like version suffix, others don't
3250
3251
Michael W. Hudson54241132001-12-07 15:38:26 +00003252
3253
3254
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003255
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003256LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003257BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003258INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003259DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003260LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003261RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003262
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003263# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003264# If CXX is set, and if it is needed to link a main function that was
3265# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3266# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003267# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003268# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003269
Martin v. Löwis11437992002-04-12 09:54:03 +00003270echo "$as_me:$LINENO: checking LINKCC" >&5
3271echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003272if test -z "$LINKCC"
3273then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003274 if test -z "$CXX"; then
3275 LINKCC="\$(PURIFY) \$(CC)"
3276 else
Martin v. Löwis147fbe52005-08-07 21:09:30 +00003277 echo 'extern "C" void foo();int main(){foo();}' > conftest_a.cc
3278 $CXX -c conftest_a.cc # 2>&5
3279 echo 'void foo(){}' > conftest_b.$ac_ext
3280 $CC -c conftest_b.$ac_ext # 2>&5
3281 if $CC -o conftest$ac_exeext conftest_a.$ac_objext conftest_b.$ac_objext 2>&5 \
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003282 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3283 then
3284 LINKCC="\$(PURIFY) \$(CC)"
3285 else
3286 LINKCC="\$(PURIFY) \$(CXX)"
3287 fi
3288 rm -fr conftest*
3289 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003290 case $ac_sys_system in
3291 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003292 exp_extra="\"\""
3293 if test $ac_sys_release -ge 5 -o \
3294 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3295 exp_extra="."
3296 fi
3297 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003298 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003299 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003300 esac
3301fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003302echo "$as_me:$LINENO: result: $LINKCC" >&5
3303echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003304
Martin v. Löwis11437992002-04-12 09:54:03 +00003305echo "$as_me:$LINENO: checking for --enable-shared" >&5
3306echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003307# Check whether --enable-shared or --disable-shared was given.
3308if test "${enable_shared+set}" = set; then
3309 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003310
Martin v. Löwis11437992002-04-12 09:54:03 +00003311fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003312
3313if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003314then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003315 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003316 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003317 enable_shared="yes";;
3318 *)
3319 enable_shared="no";;
3320 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003322echo "$as_me:$LINENO: result: $enable_shared" >&5
3323echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003324
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003325echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3326echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3327# Check whether --enable-profiling or --disable-profiling was given.
3328if test "${enable_profiling+set}" = set; then
3329 enableval="$enable_profiling"
3330 ac_save_cc="$CC"
3331 CC="$CC -pg"
3332 if test "$cross_compiling" = yes; then
3333 ac_enable_profiling="no"
3334else
3335 cat >conftest.$ac_ext <<_ACEOF
3336/* confdefs.h. */
3337_ACEOF
3338cat confdefs.h >>conftest.$ac_ext
3339cat >>conftest.$ac_ext <<_ACEOF
3340/* end confdefs.h. */
3341int main() { return 0; }
3342_ACEOF
3343rm -f conftest$ac_exeext
3344if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3345 (eval $ac_link) 2>&5
3346 ac_status=$?
3347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3348 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3350 (eval $ac_try) 2>&5
3351 ac_status=$?
3352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3353 (exit $ac_status); }; }; then
3354 ac_enable_profiling="yes"
3355else
3356 echo "$as_me: program exited with status $ac_status" >&5
3357echo "$as_me: failed program was:" >&5
3358sed 's/^/| /' conftest.$ac_ext >&5
3359
3360( exit $ac_status )
3361ac_enable_profiling="no"
3362fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003363rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003364fi
3365 CC="$ac_save_cc"
3366fi;
3367echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3368echo "${ECHO_T}$ac_enable_profiling" >&6
3369
3370case "$ac_enable_profiling" in
3371 "yes")
3372 BASECFLAGS="-pg $BASECFLAGS"
3373 LDFLAGS="-pg $LDFLAGS"
3374 ;;
3375esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003376
Martin v. Löwis11437992002-04-12 09:54:03 +00003377echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3378echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003379
Guido van Rossumb8552162001-09-05 14:58:11 +00003380# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3381# library that we build, but we do not want to link against it (we
3382# will find it with a -framework option). For this reason there is an
3383# extra variable BLDLIBRARY against which Python and the extension
3384# modules are linked, BLDLIBRARY. This is normally the same as
3385# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003386if test "$enable_framework"
3387then
3388 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003389 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003390 BLDLIBRARY=''
3391else
3392 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003393fi
Jack Jansene578a632001-08-15 01:27:14 +00003394
Martin v. Löwis1142de32002-03-29 16:28:31 +00003395# Other platforms follow
3396if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003397
3398cat >>confdefs.h <<\_ACEOF
3399#define Py_ENABLE_SHARED 1
3400_ACEOF
3401
Martin v. Löwis1142de32002-03-29 16:28:31 +00003402 case $ac_sys_system in
3403 BeOS*)
3404 LDLIBRARY='libpython$(VERSION).so'
3405 ;;
3406 CYGWIN*)
3407 LDLIBRARY='libpython$(VERSION).dll.a'
3408 DLLLIBRARY='libpython$(VERSION).dll'
3409 ;;
3410 SunOS*)
3411 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003412 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003413 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003414 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003415 ;;
Hye-Shik Chang33761492004-10-26 09:53:46 +00003416 Linux*|GNU*|NetBSD*|FreeBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003417 LDLIBRARY='libpython$(VERSION).so'
3418 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003419 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003420 case $ac_sys_system in
3421 FreeBSD*)
3422 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3423 ;;
3424 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003425 INSTSONAME="$LDLIBRARY".$SOVERSION
3426 ;;
3427 hp*|HP*)
3428 LDLIBRARY='libpython$(VERSION).sl'
3429 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003430 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003431 ;;
3432 OSF*)
3433 LDLIBRARY='libpython$(VERSION).so'
3434 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003435 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003436 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003437 atheos*)
3438 LDLIBRARY='libpython$(VERSION).so'
3439 BLDLIBRARY='-L. -lpython$(VERSION)'
3440 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3441 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003442 esac
Jason Tishler30765592003-09-04 11:04:06 +00003443else # shared is disabled
3444 case $ac_sys_system in
3445 CYGWIN*)
3446 BLDLIBRARY='$(LIBRARY)'
3447 LDLIBRARY='libpython$(VERSION).dll.a'
3448 ;;
3449 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003450fi
3451
Martin v. Löwis11437992002-04-12 09:54:03 +00003452echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3453echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455if test -n "$ac_tool_prefix"; then
3456 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3457set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3458echo "$as_me:$LINENO: checking for $ac_word" >&5
3459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3460if test "${ac_cv_prog_RANLIB+set}" = set; then
3461 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003462else
3463 if test -n "$RANLIB"; then
3464 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3465else
Martin v. Löwis11437992002-04-12 09:54:03 +00003466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3467for as_dir in $PATH
3468do
3469 IFS=$as_save_IFS
3470 test -z "$as_dir" && as_dir=.
3471 for ac_exec_ext in '' $ac_executable_extensions; do
3472 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3473 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3474 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3475 break 2
3476 fi
3477done
3478done
3479
Guido van Rossum627b2d71993-12-24 10:39:16 +00003480fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003482RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003483if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 echo "$as_me:$LINENO: result: $RANLIB" >&5
3485echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003486else
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 echo "$as_me:$LINENO: result: no" >&5
3488echo "${ECHO_T}no" >&6
3489fi
3490
3491fi
3492if test -z "$ac_cv_prog_RANLIB"; then
3493 ac_ct_RANLIB=$RANLIB
3494 # Extract the first word of "ranlib", so it can be a program name with args.
3495set dummy ranlib; ac_word=$2
3496echo "$as_me:$LINENO: checking for $ac_word" >&5
3497echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3499 echo $ECHO_N "(cached) $ECHO_C" >&6
3500else
3501 if test -n "$ac_ct_RANLIB"; then
3502 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3503else
3504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3505for as_dir in $PATH
3506do
3507 IFS=$as_save_IFS
3508 test -z "$as_dir" && as_dir=.
3509 for ac_exec_ext in '' $ac_executable_extensions; do
3510 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3511 ac_cv_prog_ac_ct_RANLIB="ranlib"
3512 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3513 break 2
3514 fi
3515done
3516done
3517
3518 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3519fi
3520fi
3521ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3522if test -n "$ac_ct_RANLIB"; then
3523 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3524echo "${ECHO_T}$ac_ct_RANLIB" >&6
3525else
3526 echo "$as_me:$LINENO: result: no" >&5
3527echo "${ECHO_T}no" >&6
3528fi
3529
3530 RANLIB=$ac_ct_RANLIB
3531else
3532 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003533fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003534
3535
Guido van Rossum7f43da71994-08-01 12:15:30 +00003536for ac_prog in ar aal
3537do
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003539set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003540echo "$as_me:$LINENO: checking for $ac_word" >&5
3541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3542if test "${ac_cv_prog_AR+set}" = set; then
3543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003544else
3545 if test -n "$AR"; then
3546 ac_cv_prog_AR="$AR" # Let the user override the test.
3547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3549for as_dir in $PATH
3550do
3551 IFS=$as_save_IFS
3552 test -z "$as_dir" && as_dir=.
3553 for ac_exec_ext in '' $ac_executable_extensions; do
3554 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3555 ac_cv_prog_AR="$ac_prog"
3556 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3557 break 2
3558 fi
3559done
3560done
3561
Guido van Rossum7f43da71994-08-01 12:15:30 +00003562fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003563fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003564AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003565if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 echo "$as_me:$LINENO: result: $AR" >&5
3567echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003568else
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 echo "$as_me:$LINENO: result: no" >&5
3570echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003571fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003574done
3575test -n "$AR" || AR="ar"
3576
Michael W. Hudson54241132001-12-07 15:38:26 +00003577
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003578
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003579# Extract the first word of "svnversion", so it can be a program name with args.
3580set dummy svnversion; ac_word=$2
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003581echo "$as_me:$LINENO: checking for $ac_word" >&5
3582echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3583if test "${ac_cv_prog_SVNVERSION+set}" = set; then
3584 echo $ECHO_N "(cached) $ECHO_C" >&6
3585else
3586 if test -n "$SVNVERSION"; then
3587 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
3588else
3589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
3594 for ac_exec_ext in '' $ac_executable_extensions; do
3595 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003596 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003597 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3598 break 2
3599 fi
3600done
3601done
3602
3603fi
3604fi
3605SVNVERSION=$ac_cv_prog_SVNVERSION
3606if test -n "$SVNVERSION"; then
3607 echo "$as_me:$LINENO: result: $SVNVERSION" >&5
3608echo "${ECHO_T}$SVNVERSION" >&6
3609else
3610 echo "$as_me:$LINENO: result: no" >&5
3611echo "${ECHO_T}no" >&6
3612fi
3613
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003614if test $SVNVERSION = found
3615then
3616 SVNVERSION="svnversion \$(srcdir)"
3617else
3618 SVNVERSION="echo exported"
3619fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003620
Neil Schemenauera42c8272001-03-31 00:01:55 +00003621case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003622bsdos*|hp*|HP*)
3623 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003624 if test -z "$INSTALL"
3625 then
3626 INSTALL="${srcdir}/install-sh -c"
3627 fi
3628esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003629ac_aux_dir=
3630for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3631 if test -f $ac_dir/install-sh; then
3632 ac_aux_dir=$ac_dir
3633 ac_install_sh="$ac_aux_dir/install-sh -c"
3634 break
3635 elif test -f $ac_dir/install.sh; then
3636 ac_aux_dir=$ac_dir
3637 ac_install_sh="$ac_aux_dir/install.sh -c"
3638 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 elif test -f $ac_dir/shtool; then
3640 ac_aux_dir=$ac_dir
3641 ac_install_sh="$ac_aux_dir/shtool install -c"
3642 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003643 fi
3644done
3645if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3647echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3648 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003650ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3651ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3652ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003653
3654# Find a good install program. We prefer a C program (faster),
3655# so one script is as good as another. But avoid the broken or
3656# incompatible versions:
3657# SysV /etc/install, /usr/sbin/install
3658# SunOS /usr/etc/install
3659# IRIX /sbin/install
3660# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003661# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003662# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3663# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3664# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003665# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003666# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003667echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3668echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003669if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003670if test "${ac_cv_path_install+set}" = set; then
3671 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003672else
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674for as_dir in $PATH
3675do
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
3678 # Account for people who put trailing slashes in PATH elements.
3679case $as_dir/ in
3680 ./ | .// | /cC/* | \
3681 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003682 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 /usr/ucb/* ) ;;
3684 *)
3685 # OSF1 and SCO ODT 3.0 have their own names for install.
3686 # Don't use installbsd from OSF since it installs stuff as root
3687 # by default.
3688 for ac_prog in ginstall scoinst install; do
3689 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003690 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3691 if test $ac_prog = install &&
3692 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3693 # AIX install. It has an incompatible calling convention.
3694 :
3695 elif test $ac_prog = install &&
3696 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3697 # program-specific install script used by HP pwplus--don't use.
3698 :
3699 else
3700 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3701 break 3
3702 fi
3703 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003704 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 done
3706 ;;
3707esac
3708done
3709
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003710
3711fi
3712 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003714 else
3715 # As a last resort, use the slow shell script. We don't cache a
3716 # path for INSTALL within a source directory, because that will
3717 # break other packages using the cache if that directory is
3718 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003720 fi
3721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003722echo "$as_me:$LINENO: result: $INSTALL" >&5
3723echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003724
3725# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3726# It thinks the first close brace ends the variable substitution.
3727test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3728
Martin v. Löwis11437992002-04-12 09:54:03 +00003729test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003730
3731test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3732
Michael W. Hudson54241132001-12-07 15:38:26 +00003733
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003734# Not every filesystem supports hard links
3735
3736if test -z "$LN" ; then
3737 case $ac_sys_system in
3738 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003739 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003740 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003741 *) LN=ln;;
3742 esac
3743fi
3744
Fred Drake109d9862001-07-11 06:27:56 +00003745# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003746echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3747echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3748
Fred Drake109d9862001-07-11 06:27:56 +00003749# Check whether --with-pydebug or --without-pydebug was given.
3750if test "${with_pydebug+set}" = set; then
3751 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003752
Fred Drake109d9862001-07-11 06:27:56 +00003753if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003754then
3755
3756cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003757#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003758_ACEOF
3759
3760 echo "$as_me:$LINENO: result: yes" >&5
3761echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003762 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003763else echo "$as_me:$LINENO: result: no" >&5
3764echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003765fi
3766else
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 echo "$as_me:$LINENO: result: no" >&5
3768echo "${ECHO_T}no" >&6
3769fi;
Fred Drake109d9862001-07-11 06:27:56 +00003770
Skip Montanarodecc6a42003-01-01 20:07:49 +00003771# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3772# merged with this chunk of code?
3773
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003774# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003775# ------------------------
3776# (The following bit of code is complicated enough - please keep things
3777# indented properly. Just pretend you're editing Python code. ;-)
3778
3779# There are two parallel sets of case statements below, one that checks to
3780# see if OPT was set and one that does BASECFLAGS setting based upon
3781# compiler and platform. BASECFLAGS tweaks need to be made even if the
3782# user set OPT.
3783
3784# tweak OPT based on compiler and platform, only if the user didn't set
3785# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003786
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003787if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003788then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003789 case $GCC in
3790 yes)
3791 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003792 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003793 if test "$Py_DEBUG" = 'true' ; then
3794 # Optimization messes up debuggers, so turn it off for
3795 # debug builds.
3796 OPT="-g -Wall -Wstrict-prototypes"
3797 else
3798 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003799 fi
3800 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003801 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003802 OPT="-O3 -Wall -Wstrict-prototypes"
3803 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003804 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003805 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003806 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3807 ;;
3808 esac
Fred Drake109d9862001-07-11 06:27:56 +00003809 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003810
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003811 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003812 OPT="-O"
3813 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003814 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003815
3816 # The current (beta) Monterey compiler dies with optimizations
3817 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003818 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003819 Monterey*)
3820 OPT=""
3821 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003822 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003823
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003824fi
3825
Skip Montanarodecc6a42003-01-01 20:07:49 +00003826
3827# tweak BASECFLAGS based on compiler and platform
3828case $GCC in
3829yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003830 # Python violates C99 rules, by casting between incompatible
3831 # pointer types. GCC may generate bad code as a result of that,
3832 # so use -fno-strict-aliasing if supported.
3833 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3834echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3835 ac_save_cc="$CC"
3836 CC="$CC -fno-strict-aliasing"
3837 if test "$cross_compiling" = yes; then
3838 ac_cv_no_strict_aliasing_ok=no
3839else
3840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003841/* confdefs.h. */
3842_ACEOF
3843cat confdefs.h >>conftest.$ac_ext
3844cat >>conftest.$ac_ext <<_ACEOF
3845/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003846int main() { return 0; }
3847_ACEOF
3848rm -f conftest$ac_exeext
3849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3850 (eval $ac_link) 2>&5
3851 ac_status=$?
3852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3855 (eval $ac_try) 2>&5
3856 ac_status=$?
3857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858 (exit $ac_status); }; }; then
3859 ac_cv_no_strict_aliasing_ok=yes
3860else
3861 echo "$as_me: program exited with status $ac_status" >&5
3862echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003863sed 's/^/| /' conftest.$ac_ext >&5
3864
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003865( exit $ac_status )
3866ac_cv_no_strict_aliasing_ok=no
3867fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003868rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003869fi
3870 CC="$ac_save_cc"
3871 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3872echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3873 if test $ac_cv_no_strict_aliasing_ok = yes
3874 then
3875 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3876 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003877 case $ac_sys_system in
3878 SCO_SV*)
3879 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3880 ;;
3881 # is there any other compiler on Darwin besides gcc?
3882 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003883 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003884 ;;
3885 esac
3886 ;;
3887
3888*)
3889 case $ac_sys_system in
3890 OpenUNIX*|UnixWare*)
3891 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3892 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003893 OSF*)
3894 BASECFLAGS="$BASECFLAGS -ieee -std"
3895 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003896 SCO_SV*)
3897 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3898 ;;
3899 esac
3900 ;;
3901esac
3902
Fred Drakee1ceaa02001-12-04 20:55:47 +00003903if test "$Py_DEBUG" = 'true'; then
3904 :
3905else
3906 OPT="-DNDEBUG $OPT"
3907fi
3908
Guido van Rossum563e7081996-09-10 18:20:48 +00003909if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003910then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003911 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003912fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003913
Neal Norwitz020c46a2006-01-07 21:39:28 +00003914# disable check for icc since it seems to pass, but generates a warning
3915if test "$CC" = icc
3916then
3917 ac_cv_opt_olimit_ok=no
3918fi
3919
Martin v. Löwis11437992002-04-12 09:54:03 +00003920echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3921echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3922if test "${ac_cv_opt_olimit_ok+set}" = set; then
3923 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003924else
3925 ac_save_cc="$CC"
3926CC="$CC -OPT:Olimit=0"
3927if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003928 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003929else
Martin v. Löwis11437992002-04-12 09:54:03 +00003930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003931/* confdefs.h. */
3932_ACEOF
3933cat confdefs.h >>conftest.$ac_ext
3934cat >>conftest.$ac_ext <<_ACEOF
3935/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003936int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003937_ACEOF
3938rm -f conftest$ac_exeext
3939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3940 (eval $ac_link) 2>&5
3941 ac_status=$?
3942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3945 (eval $ac_try) 2>&5
3946 ac_status=$?
3947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3948 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003949 ac_cv_opt_olimit_ok=yes
3950else
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 echo "$as_me: program exited with status $ac_status" >&5
3952echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003953sed 's/^/| /' conftest.$ac_ext >&5
3954
Martin v. Löwis11437992002-04-12 09:54:03 +00003955( exit $ac_status )
3956ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003957fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003958rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003959fi
Guido van Rossum91922671997-10-09 20:24:13 +00003960CC="$ac_save_cc"
3961fi
3962
Martin v. Löwis11437992002-04-12 09:54:03 +00003963echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3964echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003965if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003966 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003967 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3968 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3969 # environment?
3970 Darwin*)
3971 ;;
3972 *)
3973 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3974 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003975 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003976else
Martin v. Löwis11437992002-04-12 09:54:03 +00003977 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3978echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3979 if test "${ac_cv_olimit_ok+set}" = set; then
3980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003981else
3982 ac_save_cc="$CC"
3983 CC="$CC -Olimit 1500"
3984 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003985 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003986else
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003988/* confdefs.h. */
3989_ACEOF
3990cat confdefs.h >>conftest.$ac_ext
3991cat >>conftest.$ac_ext <<_ACEOF
3992/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003993int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003994_ACEOF
3995rm -f conftest$ac_exeext
3996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3997 (eval $ac_link) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4002 (eval $ac_try) 2>&5
4003 ac_status=$?
4004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4005 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004006 ac_cv_olimit_ok=yes
4007else
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 echo "$as_me: program exited with status $ac_status" >&5
4009echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004010sed 's/^/| /' conftest.$ac_ext >&5
4011
Martin v. Löwis11437992002-04-12 09:54:03 +00004012( exit $ac_status )
4013ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004014fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004015rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004016fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004017 CC="$ac_save_cc"
4018fi
4019
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4021echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004022 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004023 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004024 fi
4025fi
4026
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004027# On some compilers, pthreads are available without further options
4028# (e.g. MacOS X). On some of these systems, the compiler will not
4029# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4030# So we have to see first whether pthreads are available without
4031# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004032echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4033echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4034if test "${ac_cv_pthread_is_default+set}" = set; then
4035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004036else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004037 if test "$cross_compiling" = yes; then
4038 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004039else
Martin v. Löwis11437992002-04-12 09:54:03 +00004040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004041/* confdefs.h. */
4042_ACEOF
4043cat confdefs.h >>conftest.$ac_ext
4044cat >>conftest.$ac_ext <<_ACEOF
4045/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004046
Martin v. Löwis130fb172001-07-19 11:00:41 +00004047#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004048
4049void* routine(void* p){return NULL;}
4050
4051int main(){
4052 pthread_t p;
4053 if(pthread_create(&p,NULL,routine,NULL)!=0)
4054 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004055 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004056 return 0;
4057}
4058
Martin v. Löwis11437992002-04-12 09:54:03 +00004059_ACEOF
4060rm -f conftest$ac_exeext
4061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4062 (eval $ac_link) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4067 (eval $ac_try) 2>&5
4068 ac_status=$?
4069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4070 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004071
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004072 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004073 ac_cv_kthread=no
4074 ac_cv_pthread=no
4075
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004076else
Martin v. Löwis11437992002-04-12 09:54:03 +00004077 echo "$as_me: program exited with status $ac_status" >&5
4078echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004079sed 's/^/| /' conftest.$ac_ext >&5
4080
Martin v. Löwis11437992002-04-12 09:54:03 +00004081( exit $ac_status )
4082ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004084rm -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 +00004085fi
4086
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004087fi
4088
Martin v. Löwis11437992002-04-12 09:54:03 +00004089echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4090echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004091
Michael W. Hudson54241132001-12-07 15:38:26 +00004092
Martin v. Löwis11437992002-04-12 09:54:03 +00004093if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004094then
4095 ac_cv_kpthread=no
4096else
4097# -Kpthread, if available, provides the right #defines
4098# and linker options to make pthread_create available
4099# Some compilers won't report that they do not support -Kpthread,
4100# so we need to run a program to see whether it really made the
4101# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004102echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4103echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4104if test "${ac_cv_kpthread+set}" = set; then
4105 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004106else
4107 ac_save_cc="$CC"
4108CC="$CC -Kpthread"
4109if test "$cross_compiling" = yes; then
4110 ac_cv_kpthread=no
4111else
Martin v. Löwis11437992002-04-12 09:54:03 +00004112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004113/* confdefs.h. */
4114_ACEOF
4115cat confdefs.h >>conftest.$ac_ext
4116cat >>conftest.$ac_ext <<_ACEOF
4117/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004118
4119#include <pthread.h>
4120
4121void* routine(void* p){return NULL;}
4122
4123int main(){
4124 pthread_t p;
4125 if(pthread_create(&p,NULL,routine,NULL)!=0)
4126 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004127 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004128 return 0;
4129}
4130
Martin v. Löwis11437992002-04-12 09:54:03 +00004131_ACEOF
4132rm -f conftest$ac_exeext
4133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4134 (eval $ac_link) 2>&5
4135 ac_status=$?
4136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4137 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4139 (eval $ac_try) 2>&5
4140 ac_status=$?
4141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004143 ac_cv_kpthread=yes
4144else
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 echo "$as_me: program exited with status $ac_status" >&5
4146echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004147sed 's/^/| /' conftest.$ac_ext >&5
4148
Martin v. Löwis11437992002-04-12 09:54:03 +00004149( exit $ac_status )
4150ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004151fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004152rm -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 +00004153fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004154CC="$ac_save_cc"
4155fi
4156
Martin v. Löwis11437992002-04-12 09:54:03 +00004157echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4158echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004159fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004160
Skip Montanarod8d39a02003-07-10 20:44:10 +00004161if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004162then
4163# -Kthread, if available, provides the right #defines
4164# and linker options to make pthread_create available
4165# Some compilers won't report that they do not support -Kthread,
4166# so we need to run a program to see whether it really made the
4167# function available.
4168echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4169echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4170if test "${ac_cv_kthread+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
4172else
4173 ac_save_cc="$CC"
4174CC="$CC -Kthread"
4175if test "$cross_compiling" = yes; then
4176 ac_cv_kthread=no
4177else
4178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* confdefs.h. */
4180_ACEOF
4181cat confdefs.h >>conftest.$ac_ext
4182cat >>conftest.$ac_ext <<_ACEOF
4183/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004184
4185#include <pthread.h>
4186
4187void* routine(void* p){return NULL;}
4188
4189int main(){
4190 pthread_t p;
4191 if(pthread_create(&p,NULL,routine,NULL)!=0)
4192 return 1;
4193 (void)pthread_detach(p);
4194 return 0;
4195}
4196
4197_ACEOF
4198rm -f conftest$ac_exeext
4199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4200 (eval $ac_link) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4205 (eval $ac_try) 2>&5
4206 ac_status=$?
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); }; }; then
4209 ac_cv_kthread=yes
4210else
4211 echo "$as_me: program exited with status $ac_status" >&5
4212echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004213sed 's/^/| /' conftest.$ac_ext >&5
4214
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004215( exit $ac_status )
4216ac_cv_kthread=no
4217fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004218rm -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 +00004219fi
4220CC="$ac_save_cc"
4221fi
4222
4223echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4224echo "${ECHO_T}$ac_cv_kthread" >&6
4225fi
4226
Skip Montanarod8d39a02003-07-10 20:44:10 +00004227if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004228then
4229# -pthread, if available, provides the right #defines
4230# and linker options to make pthread_create available
4231# Some compilers won't report that they do not support -pthread,
4232# so we need to run a program to see whether it really made the
4233# function available.
4234echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4235echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4236if test "${ac_cv_thread+set}" = set; then
4237 echo $ECHO_N "(cached) $ECHO_C" >&6
4238else
4239 ac_save_cc="$CC"
4240CC="$CC -pthread"
4241if test "$cross_compiling" = yes; then
4242 ac_cv_pthread=no
4243else
4244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004245/* confdefs.h. */
4246_ACEOF
4247cat confdefs.h >>conftest.$ac_ext
4248cat >>conftest.$ac_ext <<_ACEOF
4249/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004250
4251#include <pthread.h>
4252
4253void* routine(void* p){return NULL;}
4254
4255int main(){
4256 pthread_t p;
4257 if(pthread_create(&p,NULL,routine,NULL)!=0)
4258 return 1;
4259 (void)pthread_detach(p);
4260 return 0;
4261}
4262
4263_ACEOF
4264rm -f conftest$ac_exeext
4265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4266 (eval $ac_link) 2>&5
4267 ac_status=$?
4268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4269 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4271 (eval $ac_try) 2>&5
4272 ac_status=$?
4273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4274 (exit $ac_status); }; }; then
4275 ac_cv_pthread=yes
4276else
4277 echo "$as_me: program exited with status $ac_status" >&5
4278echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004279sed 's/^/| /' conftest.$ac_ext >&5
4280
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004281( exit $ac_status )
4282ac_cv_pthread=no
4283fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284rm -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 +00004285fi
4286CC="$ac_save_cc"
4287fi
4288
4289echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4290echo "${ECHO_T}$ac_cv_pthread" >&6
4291fi
4292
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004293# If we have set a CC compiler flag for thread support then
4294# check if it works for CXX, too.
4295ac_cv_cxx_thread=no
4296if test ! -z "$CXX"
4297then
4298echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4299echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4300ac_save_cxx="$CXX"
4301
4302if test "$ac_cv_kpthread" = "yes"
4303then
4304 CXX="$CXX -Kpthread"
4305 ac_cv_cxx_thread=yes
4306elif test "$ac_cv_kthread" = "yes"
4307then
4308 CXX="$CXX -Kthread"
4309 ac_cv_cxx_thread=yes
4310elif test "$ac_cv_pthread" = "yes"
4311then
4312 CXX="$CXX -pthread"
4313 ac_cv_cxx_thread=yes
4314fi
4315
4316if test $ac_cv_cxx_thread = yes
4317then
4318 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4319 $CXX -c conftest.$ac_ext 2>&5
4320 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4321 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4322 then
4323 ac_cv_cxx_thread=yes
4324 else
4325 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004326 fi
4327 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004328fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004329echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4330echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004331fi
4332CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004333
Michael W. Hudson54241132001-12-07 15:38:26 +00004334
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004335# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004336echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4337echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4338if test "${ac_cv_header_stdc+set}" = set; then
4339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004340else
Martin v. Löwis11437992002-04-12 09:54:03 +00004341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004342/* confdefs.h. */
4343_ACEOF
4344cat confdefs.h >>conftest.$ac_ext
4345cat >>conftest.$ac_ext <<_ACEOF
4346/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004347#include <stdlib.h>
4348#include <stdarg.h>
4349#include <string.h>
4350#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004351
Skip Montanaro6dead952003-09-25 14:50:04 +00004352int
4353main ()
4354{
4355
4356 ;
4357 return 0;
4358}
Martin v. Löwis11437992002-04-12 09:54:03 +00004359_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004360rm -f conftest.$ac_objext
4361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004362 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004364 grep -v '^ *+' conftest.er1 >conftest.err
4365 rm -f conftest.er1
4366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004368 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004369 { ac_try='test -z "$ac_c_werror_flag"
4370 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4372 (eval $ac_try) 2>&5
4373 ac_status=$?
4374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4375 (exit $ac_status); }; } &&
4376 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4378 (eval $ac_try) 2>&5
4379 ac_status=$?
4380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4381 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382 ac_cv_header_stdc=yes
4383else
Martin v. Löwis11437992002-04-12 09:54:03 +00004384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004385sed 's/^/| /' conftest.$ac_ext >&5
4386
4387ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390
4391if test $ac_cv_header_stdc = yes; then
4392 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004394/* confdefs.h. */
4395_ACEOF
4396cat confdefs.h >>conftest.$ac_ext
4397cat >>conftest.$ac_ext <<_ACEOF
4398/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004399#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004400
4401_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004403 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404 :
4405else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406 ac_cv_header_stdc=no
4407fi
4408rm -f conftest*
4409
4410fi
4411
4412if test $ac_cv_header_stdc = yes; then
4413 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004415/* confdefs.h. */
4416_ACEOF
4417cat confdefs.h >>conftest.$ac_ext
4418cat >>conftest.$ac_ext <<_ACEOF
4419/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004421
4422_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004423if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004424 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004425 :
4426else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427 ac_cv_header_stdc=no
4428fi
4429rm -f conftest*
4430
4431fi
4432
4433if test $ac_cv_header_stdc = yes; then
4434 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004435 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004436 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437else
Martin v. Löwis11437992002-04-12 09:54:03 +00004438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004439/* confdefs.h. */
4440_ACEOF
4441cat confdefs.h >>conftest.$ac_ext
4442cat >>conftest.$ac_ext <<_ACEOF
4443/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004444#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004445#if ((' ' & 0x0FF) == 0x020)
4446# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4447# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4448#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004449# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004450 (('a' <= (c) && (c) <= 'i') \
4451 || ('j' <= (c) && (c) <= 'r') \
4452 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004453# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4454#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004455
Martin v. Löwis11437992002-04-12 09:54:03 +00004456#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4457int
4458main ()
4459{
4460 int i;
4461 for (i = 0; i < 256; i++)
4462 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004463 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004464 exit(2);
4465 exit (0);
4466}
4467_ACEOF
4468rm -f conftest$ac_exeext
4469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4470 (eval $ac_link) 2>&5
4471 ac_status=$?
4472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475 (eval $ac_try) 2>&5
4476 ac_status=$?
4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004479 :
4480else
Martin v. Löwis11437992002-04-12 09:54:03 +00004481 echo "$as_me: program exited with status $ac_status" >&5
4482echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004483sed 's/^/| /' conftest.$ac_ext >&5
4484
Martin v. Löwis11437992002-04-12 09:54:03 +00004485( exit $ac_status )
4486ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004487fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004488rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004489fi
4490fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004491fi
4492echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4493echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004494if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004495
4496cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004497#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004498_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499
4500fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501
Skip Montanarob9820a32004-01-17 00:16:12 +00004502# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004513 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004514do
4515as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4516echo "$as_me:$LINENO: checking for $ac_header" >&5
4517echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4518if eval "test \"\${$as_ac_Header+set}\" = set"; then
4519 echo $ECHO_N "(cached) $ECHO_C" >&6
4520else
4521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004522/* confdefs.h. */
4523_ACEOF
4524cat confdefs.h >>conftest.$ac_ext
4525cat >>conftest.$ac_ext <<_ACEOF
4526/* end confdefs.h. */
4527$ac_includes_default
4528
4529#include <$ac_header>
4530_ACEOF
4531rm -f conftest.$ac_objext
4532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004533 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004535 grep -v '^ *+' conftest.er1 >conftest.err
4536 rm -f conftest.er1
4537 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4539 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004540 { ac_try='test -z "$ac_c_werror_flag"
4541 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); }; } &&
4547 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4549 (eval $ac_try) 2>&5
4550 ac_status=$?
4551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552 (exit $ac_status); }; }; then
4553 eval "$as_ac_Header=yes"
4554else
4555 echo "$as_me: failed program was:" >&5
4556sed 's/^/| /' conftest.$ac_ext >&5
4557
4558eval "$as_ac_Header=no"
4559fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004560rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004561fi
4562echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4563echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4564if test `eval echo '${'$as_ac_Header'}'` = yes; then
4565 cat >>confdefs.h <<_ACEOF
4566#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4567_ACEOF
4568
4569fi
4570
4571done
4572
4573
Martin v. Löwis11437992002-04-12 09:54:03 +00004574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
Anthony Baxter8a560de2004-10-13 15:30:56 +00004610
Martin v. Löwisc3001752005-01-23 09:27:24 +00004611
4612for ac_header in curses.h dlfcn.h fcntl.h grp.h shadow.h langinfo.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004613libintl.h ncurses.h poll.h pthread.h \
4614stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004615unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004616sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4617sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004618sys/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 +00004619sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004620sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4621bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004622do
Martin v. Löwis11437992002-04-12 09:54:03 +00004623as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4624if eval "test \"\${$as_ac_Header+set}\" = set"; then
4625 echo "$as_me:$LINENO: checking for $ac_header" >&5
4626echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4627if eval "test \"\${$as_ac_Header+set}\" = set"; then
4628 echo $ECHO_N "(cached) $ECHO_C" >&6
4629fi
4630echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4631echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004632else
Martin v. Löwis11437992002-04-12 09:54:03 +00004633 # Is the header compilable?
4634echo "$as_me:$LINENO: checking $ac_header usability" >&5
4635echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004637/* confdefs.h. */
4638_ACEOF
4639cat confdefs.h >>conftest.$ac_ext
4640cat >>conftest.$ac_ext <<_ACEOF
4641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004642$ac_includes_default
4643#include <$ac_header>
4644_ACEOF
4645rm -f conftest.$ac_objext
4646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004647 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004649 grep -v '^ *+' conftest.er1 >conftest.err
4650 rm -f conftest.er1
4651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004654 { ac_try='test -z "$ac_c_werror_flag"
4655 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4657 (eval $ac_try) 2>&5
4658 ac_status=$?
4659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4660 (exit $ac_status); }; } &&
4661 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4663 (eval $ac_try) 2>&5
4664 ac_status=$?
4665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4666 (exit $ac_status); }; }; then
4667 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004668else
Martin v. Löwis11437992002-04-12 09:54:03 +00004669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004670sed 's/^/| /' conftest.$ac_ext >&5
4671
Martin v. Löwis11437992002-04-12 09:54:03 +00004672ac_header_compiler=no
4673fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004675echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4676echo "${ECHO_T}$ac_header_compiler" >&6
4677
4678# Is the header present?
4679echo "$as_me:$LINENO: checking $ac_header presence" >&5
4680echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004682/* confdefs.h. */
4683_ACEOF
4684cat confdefs.h >>conftest.$ac_ext
4685cat >>conftest.$ac_ext <<_ACEOF
4686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004687#include <$ac_header>
4688_ACEOF
4689if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4690 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4691 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004692 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004693 rm -f conftest.er1
4694 cat conftest.err >&5
4695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4696 (exit $ac_status); } >/dev/null; then
4697 if test -s conftest.err; then
4698 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004699 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004700 else
4701 ac_cpp_err=
4702 fi
4703else
4704 ac_cpp_err=yes
4705fi
4706if test -z "$ac_cpp_err"; then
4707 ac_header_preproc=yes
4708else
4709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004710sed 's/^/| /' conftest.$ac_ext >&5
4711
Martin v. Löwis11437992002-04-12 09:54:03 +00004712 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004714rm -f conftest.err conftest.$ac_ext
4715echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4716echo "${ECHO_T}$ac_header_preproc" >&6
4717
4718# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004719case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4720 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004721 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4722echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004723 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4724echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4725 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004726 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004727 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004728 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4729echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004730 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4731echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4732 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4733echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4734 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4735echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004736 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4737echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004738 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4739echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004740 (
4741 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004742## ------------------------------------------------ ##
4743## Report this to http://www.python.org/python-bugs ##
4744## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004745_ASBOX
4746 ) |
4747 sed "s/^/$as_me: WARNING: /" >&2
4748 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004749esac
4750echo "$as_me:$LINENO: checking for $ac_header" >&5
4751echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4752if eval "test \"\${$as_ac_Header+set}\" = set"; then
4753 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004754else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004755 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004756fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004757echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4758echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4759
4760fi
4761if test `eval echo '${'$as_ac_Header'}'` = yes; then
4762 cat >>confdefs.h <<_ACEOF
4763#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4764_ACEOF
4765
4766fi
4767
Guido van Rossum627b2d71993-12-24 10:39:16 +00004768done
4769
Martin v. Löwis11437992002-04-12 09:54:03 +00004770
4771
4772
4773
4774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004775ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004776for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4777 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4778echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4779echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4780if eval "test \"\${$as_ac_Header+set}\" = set"; then
4781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004782else
Martin v. Löwis11437992002-04-12 09:54:03 +00004783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004784/* confdefs.h. */
4785_ACEOF
4786cat confdefs.h >>conftest.$ac_ext
4787cat >>conftest.$ac_ext <<_ACEOF
4788/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004789#include <sys/types.h>
4790#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004791
Martin v. Löwis11437992002-04-12 09:54:03 +00004792int
4793main ()
4794{
4795if ((DIR *) 0)
4796return 0;
4797 ;
4798 return 0;
4799}
4800_ACEOF
4801rm -f conftest.$ac_objext
4802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004803 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004805 grep -v '^ *+' conftest.er1 >conftest.err
4806 rm -f conftest.er1
4807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004810 { ac_try='test -z "$ac_c_werror_flag"
4811 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4813 (eval $ac_try) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); }; } &&
4817 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4819 (eval $ac_try) 2>&5
4820 ac_status=$?
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); }; }; then
4823 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004824else
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004826sed 's/^/| /' conftest.$ac_ext >&5
4827
Martin v. Löwis11437992002-04-12 09:54:03 +00004828eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004830rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004831fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4833echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4834if test `eval echo '${'$as_ac_Header'}'` = yes; then
4835 cat >>confdefs.h <<_ACEOF
4836#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4837_ACEOF
4838
4839ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004840fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004841
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004842done
4843# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4844if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4846echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4847if test "${ac_cv_search_opendir+set}" = set; then
4848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004849else
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 ac_func_search_save_LIBS=$LIBS
4851ac_cv_search_opendir=no
4852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004853/* confdefs.h. */
4854_ACEOF
4855cat confdefs.h >>conftest.$ac_ext
4856cat >>conftest.$ac_ext <<_ACEOF
4857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004858
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004859/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004860#ifdef __cplusplus
4861extern "C"
4862#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004863/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004864 builtin and then its argument prototype would still apply. */
4865char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004866int
4867main ()
4868{
4869opendir ();
4870 ;
4871 return 0;
4872}
4873_ACEOF
4874rm -f conftest.$ac_objext conftest$ac_exeext
4875if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004876 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004878 grep -v '^ *+' conftest.er1 >conftest.err
4879 rm -f conftest.er1
4880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4882 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004883 { ac_try='test -z "$ac_c_werror_flag"
4884 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4886 (eval $ac_try) 2>&5
4887 ac_status=$?
4888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4889 (exit $ac_status); }; } &&
4890 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4892 (eval $ac_try) 2>&5
4893 ac_status=$?
4894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4895 (exit $ac_status); }; }; then
4896 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004897else
Martin v. Löwis11437992002-04-12 09:54:03 +00004898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004899sed 's/^/| /' conftest.$ac_ext >&5
4900
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004902rm -f conftest.err conftest.$ac_objext \
4903 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004904if test "$ac_cv_search_opendir" = no; then
4905 for ac_lib in dir; do
4906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004908/* confdefs.h. */
4909_ACEOF
4910cat confdefs.h >>conftest.$ac_ext
4911cat >>conftest.$ac_ext <<_ACEOF
4912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004914/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004915#ifdef __cplusplus
4916extern "C"
4917#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004918/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004919 builtin and then its argument prototype would still apply. */
4920char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004921int
4922main ()
4923{
4924opendir ();
4925 ;
4926 return 0;
4927}
4928_ACEOF
4929rm -f conftest.$ac_objext conftest$ac_exeext
4930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004931 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004933 grep -v '^ *+' conftest.er1 >conftest.err
4934 rm -f conftest.er1
4935 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4937 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004938 { ac_try='test -z "$ac_c_werror_flag"
4939 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4941 (eval $ac_try) 2>&5
4942 ac_status=$?
4943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4944 (exit $ac_status); }; } &&
4945 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4947 (eval $ac_try) 2>&5
4948 ac_status=$?
4949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4950 (exit $ac_status); }; }; then
4951 ac_cv_search_opendir="-l$ac_lib"
4952break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004953else
Martin v. Löwis11437992002-04-12 09:54:03 +00004954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004955sed 's/^/| /' conftest.$ac_ext >&5
4956
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004957fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004958rm -f conftest.err conftest.$ac_objext \
4959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004960 done
4961fi
4962LIBS=$ac_func_search_save_LIBS
4963fi
4964echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4965echo "${ECHO_T}$ac_cv_search_opendir" >&6
4966if test "$ac_cv_search_opendir" != no; then
4967 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004968
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004969fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004970
Michael W. Hudson54241132001-12-07 15:38:26 +00004971else
Martin v. Löwis11437992002-04-12 09:54:03 +00004972 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4973echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4974if test "${ac_cv_search_opendir+set}" = set; then
4975 echo $ECHO_N "(cached) $ECHO_C" >&6
4976else
4977 ac_func_search_save_LIBS=$LIBS
4978ac_cv_search_opendir=no
4979cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004980/* confdefs.h. */
4981_ACEOF
4982cat confdefs.h >>conftest.$ac_ext
4983cat >>conftest.$ac_ext <<_ACEOF
4984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004985
4986/* Override any gcc2 internal prototype to avoid an error. */
4987#ifdef __cplusplus
4988extern "C"
4989#endif
4990/* We use char because int might match the return type of a gcc2
4991 builtin and then its argument prototype would still apply. */
4992char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004993int
4994main ()
4995{
4996opendir ();
4997 ;
4998 return 0;
4999}
5000_ACEOF
5001rm -f conftest.$ac_objext conftest$ac_exeext
5002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005003 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005005 grep -v '^ *+' conftest.er1 >conftest.err
5006 rm -f conftest.er1
5007 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5009 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005010 { ac_try='test -z "$ac_c_werror_flag"
5011 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5013 (eval $ac_try) 2>&5
5014 ac_status=$?
5015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5016 (exit $ac_status); }; } &&
5017 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5019 (eval $ac_try) 2>&5
5020 ac_status=$?
5021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5022 (exit $ac_status); }; }; then
5023 ac_cv_search_opendir="none required"
5024else
5025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005026sed 's/^/| /' conftest.$ac_ext >&5
5027
Martin v. Löwis11437992002-04-12 09:54:03 +00005028fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005029rm -f conftest.err conftest.$ac_objext \
5030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005031if test "$ac_cv_search_opendir" = no; then
5032 for ac_lib in x; do
5033 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005035/* confdefs.h. */
5036_ACEOF
5037cat confdefs.h >>conftest.$ac_ext
5038cat >>conftest.$ac_ext <<_ACEOF
5039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005040
5041/* Override any gcc2 internal prototype to avoid an error. */
5042#ifdef __cplusplus
5043extern "C"
5044#endif
5045/* We use char because int might match the return type of a gcc2
5046 builtin and then its argument prototype would still apply. */
5047char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005048int
5049main ()
5050{
5051opendir ();
5052 ;
5053 return 0;
5054}
5055_ACEOF
5056rm -f conftest.$ac_objext conftest$ac_exeext
5057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005058 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005060 grep -v '^ *+' conftest.er1 >conftest.err
5061 rm -f conftest.er1
5062 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005065 { ac_try='test -z "$ac_c_werror_flag"
5066 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5068 (eval $ac_try) 2>&5
5069 ac_status=$?
5070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5071 (exit $ac_status); }; } &&
5072 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
5078 ac_cv_search_opendir="-l$ac_lib"
5079break
5080else
5081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005082sed 's/^/| /' conftest.$ac_ext >&5
5083
Martin v. Löwis11437992002-04-12 09:54:03 +00005084fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005085rm -f conftest.err conftest.$ac_objext \
5086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005087 done
5088fi
5089LIBS=$ac_func_search_save_LIBS
5090fi
5091echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5092echo "${ECHO_T}$ac_cv_search_opendir" >&6
5093if test "$ac_cv_search_opendir" != no; then
5094 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096fi
5097
5098fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005099
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005100echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5101echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5102if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5103 echo $ECHO_N "(cached) $ECHO_C" >&6
5104else
5105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005106/* confdefs.h. */
5107_ACEOF
5108cat confdefs.h >>conftest.$ac_ext
5109cat >>conftest.$ac_ext <<_ACEOF
5110/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005111#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005112int
5113main ()
5114{
5115return makedev(0, 0);
5116 ;
5117 return 0;
5118}
5119_ACEOF
5120rm -f conftest.$ac_objext conftest$ac_exeext
5121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005122 (eval $ac_link) 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_exeext'
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_cv_header_sys_types_h_makedev=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_cv_header_sys_types_h_makedev=no
5148fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005149rm -f conftest.err conftest.$ac_objext \
5150 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005151
5152fi
5153echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5154echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5155
5156if test $ac_cv_header_sys_types_h_makedev = no; then
5157if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5158 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5159echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5160if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5161 echo $ECHO_N "(cached) $ECHO_C" >&6
5162fi
5163echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5164echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5165else
5166 # Is the header compilable?
5167echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5168echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5169cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005170/* confdefs.h. */
5171_ACEOF
5172cat confdefs.h >>conftest.$ac_ext
5173cat >>conftest.$ac_ext <<_ACEOF
5174/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005175$ac_includes_default
5176#include <sys/mkdev.h>
5177_ACEOF
5178rm -f conftest.$ac_objext
5179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005180 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005182 grep -v '^ *+' conftest.er1 >conftest.err
5183 rm -f conftest.er1
5184 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005187 { ac_try='test -z "$ac_c_werror_flag"
5188 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5190 (eval $ac_try) 2>&5
5191 ac_status=$?
5192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5193 (exit $ac_status); }; } &&
5194 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5196 (eval $ac_try) 2>&5
5197 ac_status=$?
5198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5199 (exit $ac_status); }; }; then
5200 ac_header_compiler=yes
5201else
5202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005203sed 's/^/| /' conftest.$ac_ext >&5
5204
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005205ac_header_compiler=no
5206fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005207rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005208echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5209echo "${ECHO_T}$ac_header_compiler" >&6
5210
5211# Is the header present?
5212echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5213echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005215/* confdefs.h. */
5216_ACEOF
5217cat confdefs.h >>conftest.$ac_ext
5218cat >>conftest.$ac_ext <<_ACEOF
5219/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005220#include <sys/mkdev.h>
5221_ACEOF
5222if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5223 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5224 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005225 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005226 rm -f conftest.er1
5227 cat conftest.err >&5
5228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5229 (exit $ac_status); } >/dev/null; then
5230 if test -s conftest.err; then
5231 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005232 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005233 else
5234 ac_cpp_err=
5235 fi
5236else
5237 ac_cpp_err=yes
5238fi
5239if test -z "$ac_cpp_err"; then
5240 ac_header_preproc=yes
5241else
5242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005243sed 's/^/| /' conftest.$ac_ext >&5
5244
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005245 ac_header_preproc=no
5246fi
5247rm -f conftest.err conftest.$ac_ext
5248echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5249echo "${ECHO_T}$ac_header_preproc" >&6
5250
5251# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005252case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5253 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005254 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5255echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005256 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5257echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5258 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005259 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005260 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005261 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5262echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005263 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5264echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5265 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5266echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5267 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5268echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005269 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5270echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005271 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5272echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005273 (
5274 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005275## ------------------------------------------------ ##
5276## Report this to http://www.python.org/python-bugs ##
5277## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005278_ASBOX
5279 ) |
5280 sed "s/^/$as_me: WARNING: /" >&2
5281 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005282esac
5283echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5284echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5285if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5286 echo $ECHO_N "(cached) $ECHO_C" >&6
5287else
5288 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5289fi
5290echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5291echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5292
5293fi
5294if test $ac_cv_header_sys_mkdev_h = yes; then
5295
5296cat >>confdefs.h <<\_ACEOF
5297#define MAJOR_IN_MKDEV 1
5298_ACEOF
5299
5300fi
5301
5302
5303
5304 if test $ac_cv_header_sys_mkdev_h = no; then
5305 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5306 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5307echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5308if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5309 echo $ECHO_N "(cached) $ECHO_C" >&6
5310fi
5311echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5312echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5313else
5314 # Is the header compilable?
5315echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5316echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005318/* confdefs.h. */
5319_ACEOF
5320cat confdefs.h >>conftest.$ac_ext
5321cat >>conftest.$ac_ext <<_ACEOF
5322/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005323$ac_includes_default
5324#include <sys/sysmacros.h>
5325_ACEOF
5326rm -f conftest.$ac_objext
5327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005328 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005330 grep -v '^ *+' conftest.er1 >conftest.err
5331 rm -f conftest.er1
5332 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5334 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005335 { ac_try='test -z "$ac_c_werror_flag"
5336 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5338 (eval $ac_try) 2>&5
5339 ac_status=$?
5340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5341 (exit $ac_status); }; } &&
5342 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5344 (eval $ac_try) 2>&5
5345 ac_status=$?
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); }; }; then
5348 ac_header_compiler=yes
5349else
5350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005351sed 's/^/| /' conftest.$ac_ext >&5
5352
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005353ac_header_compiler=no
5354fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005356echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5357echo "${ECHO_T}$ac_header_compiler" >&6
5358
5359# Is the header present?
5360echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5361echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5362cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005363/* confdefs.h. */
5364_ACEOF
5365cat confdefs.h >>conftest.$ac_ext
5366cat >>conftest.$ac_ext <<_ACEOF
5367/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005368#include <sys/sysmacros.h>
5369_ACEOF
5370if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5371 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5372 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005373 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005374 rm -f conftest.er1
5375 cat conftest.err >&5
5376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5377 (exit $ac_status); } >/dev/null; then
5378 if test -s conftest.err; then
5379 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005380 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005381 else
5382 ac_cpp_err=
5383 fi
5384else
5385 ac_cpp_err=yes
5386fi
5387if test -z "$ac_cpp_err"; then
5388 ac_header_preproc=yes
5389else
5390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005391sed 's/^/| /' conftest.$ac_ext >&5
5392
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005393 ac_header_preproc=no
5394fi
5395rm -f conftest.err conftest.$ac_ext
5396echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5397echo "${ECHO_T}$ac_header_preproc" >&6
5398
5399# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005400case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5401 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005402 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5403echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005404 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5405echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5406 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005407 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005408 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005409 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5410echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005411 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5412echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5413 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5414echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5415 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5416echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005417 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5418echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005419 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5420echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005421 (
5422 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005423## ------------------------------------------------ ##
5424## Report this to http://www.python.org/python-bugs ##
5425## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005426_ASBOX
5427 ) |
5428 sed "s/^/$as_me: WARNING: /" >&2
5429 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005430esac
5431echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5432echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5433if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5434 echo $ECHO_N "(cached) $ECHO_C" >&6
5435else
5436 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5437fi
5438echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5439echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5440
5441fi
5442if test $ac_cv_header_sys_sysmacros_h = yes; then
5443
5444cat >>confdefs.h <<\_ACEOF
5445#define MAJOR_IN_SYSMACROS 1
5446_ACEOF
5447
5448fi
5449
5450
5451 fi
5452fi
5453
Michael W. Hudson54241132001-12-07 15:38:26 +00005454
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005455# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005456
5457for ac_header in term.h
5458do
5459as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5460echo "$as_me:$LINENO: checking for $ac_header" >&5
5461echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5462if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005463 echo $ECHO_N "(cached) $ECHO_C" >&6
5464else
5465 cat >conftest.$ac_ext <<_ACEOF
5466/* confdefs.h. */
5467_ACEOF
5468cat confdefs.h >>conftest.$ac_ext
5469cat >>conftest.$ac_ext <<_ACEOF
5470/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005471
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005472#ifdef HAVE_CURSES_H
5473#include <curses.h>
5474#endif
5475
5476
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005477#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005478_ACEOF
5479rm -f conftest.$ac_objext
5480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5481 (eval $ac_compile) 2>conftest.er1
5482 ac_status=$?
5483 grep -v '^ *+' conftest.er1 >conftest.err
5484 rm -f conftest.er1
5485 cat conftest.err >&5
5486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005488 { ac_try='test -z "$ac_c_werror_flag"
5489 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5491 (eval $ac_try) 2>&5
5492 ac_status=$?
5493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494 (exit $ac_status); }; } &&
5495 { ac_try='test -s conftest.$ac_objext'
5496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5497 (eval $ac_try) 2>&5
5498 ac_status=$?
5499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5500 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005501 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005502else
5503 echo "$as_me: failed program was:" >&5
5504sed 's/^/| /' conftest.$ac_ext >&5
5505
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005506eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005507fi
5508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5509fi
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005510echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5511echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5512if test `eval echo '${'$as_ac_Header'}'` = yes; then
5513 cat >>confdefs.h <<_ACEOF
5514#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5515_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005516
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005517fi
5518
5519done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005520
5521
Guido van Rossum627b2d71993-12-24 10:39:16 +00005522# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005523was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005524echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5525echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005527/* confdefs.h. */
5528_ACEOF
5529cat confdefs.h >>conftest.$ac_ext
5530cat >>conftest.$ac_ext <<_ACEOF
5531/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005532#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005533
5534_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005536 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005537 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005538else
Martin v. Löwis11437992002-04-12 09:54:03 +00005539
5540
5541cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005542#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005543_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005544
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005545
Guido van Rossum627b2d71993-12-24 10:39:16 +00005546fi
5547rm -f conftest*
5548
Martin v. Löwis11437992002-04-12 09:54:03 +00005549echo "$as_me:$LINENO: result: $was_it_defined" >&5
5550echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005551
Neal Norwitz11690112002-07-30 01:08:28 +00005552# Check whether using makedev requires defining _OSF_SOURCE
5553echo "$as_me:$LINENO: checking for makedev" >&5
5554echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5555cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005556/* confdefs.h. */
5557_ACEOF
5558cat confdefs.h >>conftest.$ac_ext
5559cat >>conftest.$ac_ext <<_ACEOF
5560/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005561#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005562int
5563main ()
5564{
5565 makedev(0, 0)
5566 ;
5567 return 0;
5568}
5569_ACEOF
5570rm -f conftest.$ac_objext conftest$ac_exeext
5571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005572 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005574 grep -v '^ *+' conftest.er1 >conftest.err
5575 rm -f conftest.er1
5576 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005579 { ac_try='test -z "$ac_c_werror_flag"
5580 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5582 (eval $ac_try) 2>&5
5583 ac_status=$?
5584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5585 (exit $ac_status); }; } &&
5586 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5588 (eval $ac_try) 2>&5
5589 ac_status=$?
5590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591 (exit $ac_status); }; }; then
5592 ac_cv_has_makedev=yes
5593else
5594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005595sed 's/^/| /' conftest.$ac_ext >&5
5596
Neal Norwitz11690112002-07-30 01:08:28 +00005597ac_cv_has_makedev=no
5598fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005599rm -f conftest.err conftest.$ac_objext \
5600 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005601if test "$ac_cv_has_makedev" = "no"; then
5602 # we didn't link, try if _OSF_SOURCE will allow us to link
5603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005604/* confdefs.h. */
5605_ACEOF
5606cat confdefs.h >>conftest.$ac_ext
5607cat >>conftest.$ac_ext <<_ACEOF
5608/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005609
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005610#define _OSF_SOURCE 1
5611#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005612
Neal Norwitz11690112002-07-30 01:08:28 +00005613int
5614main ()
5615{
5616 makedev(0, 0)
5617 ;
5618 return 0;
5619}
5620_ACEOF
5621rm -f conftest.$ac_objext conftest$ac_exeext
5622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005623 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005625 grep -v '^ *+' conftest.er1 >conftest.err
5626 rm -f conftest.er1
5627 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005630 { ac_try='test -z "$ac_c_werror_flag"
5631 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5633 (eval $ac_try) 2>&5
5634 ac_status=$?
5635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5636 (exit $ac_status); }; } &&
5637 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5639 (eval $ac_try) 2>&5
5640 ac_status=$?
5641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5642 (exit $ac_status); }; }; then
5643 ac_cv_has_makedev=yes
5644else
5645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005646sed 's/^/| /' conftest.$ac_ext >&5
5647
Neal Norwitz11690112002-07-30 01:08:28 +00005648ac_cv_has_makedev=no
5649fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005650rm -f conftest.err conftest.$ac_objext \
5651 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005652 if test "$ac_cv_has_makedev" = "yes"; then
5653
5654cat >>confdefs.h <<\_ACEOF
5655#define _OSF_SOURCE 1
5656_ACEOF
5657
5658 fi
5659fi
5660echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5661echo "${ECHO_T}$ac_cv_has_makedev" >&6
5662if test "$ac_cv_has_makedev" = "yes"; then
5663
5664cat >>confdefs.h <<\_ACEOF
5665#define HAVE_MAKEDEV 1
5666_ACEOF
5667
5668fi
5669
Martin v. Löwis399a6892002-10-04 10:22:02 +00005670# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5671# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5672# defined, but the compiler does not support pragma redefine_extname,
5673# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5674# structures (such as rlimit64) without declaring them. As a
5675# work-around, disable LFS on such configurations
5676
5677use_lfs=yes
5678echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5679echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5680cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005681/* confdefs.h. */
5682_ACEOF
5683cat confdefs.h >>conftest.$ac_ext
5684cat >>conftest.$ac_ext <<_ACEOF
5685/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005686
5687#define _LARGEFILE_SOURCE 1
5688#define _FILE_OFFSET_BITS 64
5689#include <sys/resource.h>
5690
Martin v. Löwis399a6892002-10-04 10:22:02 +00005691int
5692main ()
5693{
5694struct rlimit foo;
5695 ;
5696 return 0;
5697}
5698_ACEOF
5699rm -f conftest.$ac_objext
5700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005703 grep -v '^ *+' conftest.er1 >conftest.err
5704 rm -f conftest.er1
5705 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005708 { ac_try='test -z "$ac_c_werror_flag"
5709 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5711 (eval $ac_try) 2>&5
5712 ac_status=$?
5713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5714 (exit $ac_status); }; } &&
5715 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5717 (eval $ac_try) 2>&5
5718 ac_status=$?
5719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5720 (exit $ac_status); }; }; then
5721 sol_lfs_bug=no
5722else
5723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005724sed 's/^/| /' conftest.$ac_ext >&5
5725
Martin v. Löwis399a6892002-10-04 10:22:02 +00005726sol_lfs_bug=yes
5727fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005728rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005729echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5730echo "${ECHO_T}$sol_lfs_bug" >&6
5731if test "$sol_lfs_bug" = "yes"; then
5732 use_lfs=no
5733fi
5734
5735if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005736# Two defines needed to enable largefile support on various platforms
5737# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005738
Martin v. Löwis11437992002-04-12 09:54:03 +00005739cat >>confdefs.h <<\_ACEOF
5740#define _LARGEFILE_SOURCE 1
5741_ACEOF
5742
5743
5744cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005745#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005746_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005747
Martin v. Löwis399a6892002-10-04 10:22:02 +00005748fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005749
Guido van Rossum84e7b241996-08-19 21:59:00 +00005750# Add some code to confdefs.h so that the test for off_t works on SCO
5751cat >> confdefs.h <<\EOF
5752#if defined(SCO_DS)
5753#undef _OFF_T
5754#endif
5755EOF
5756
Guido van Rossumef2255b2000-03-10 22:30:29 +00005757# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005758echo "$as_me:$LINENO: checking for mode_t" >&5
5759echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5760if test "${ac_cv_type_mode_t+set}" = set; then
5761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005762else
Martin v. Löwis11437992002-04-12 09:54:03 +00005763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005764/* confdefs.h. */
5765_ACEOF
5766cat confdefs.h >>conftest.$ac_ext
5767cat >>conftest.$ac_ext <<_ACEOF
5768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005769$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005770int
5771main ()
5772{
5773if ((mode_t *) 0)
5774 return 0;
5775if (sizeof (mode_t))
5776 return 0;
5777 ;
5778 return 0;
5779}
5780_ACEOF
5781rm -f conftest.$ac_objext
5782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005783 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005785 grep -v '^ *+' conftest.er1 >conftest.err
5786 rm -f conftest.er1
5787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5789 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005790 { ac_try='test -z "$ac_c_werror_flag"
5791 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5793 (eval $ac_try) 2>&5
5794 ac_status=$?
5795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5796 (exit $ac_status); }; } &&
5797 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5799 (eval $ac_try) 2>&5
5800 ac_status=$?
5801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5802 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005803 ac_cv_type_mode_t=yes
5804else
Martin v. Löwis11437992002-04-12 09:54:03 +00005805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005806sed 's/^/| /' conftest.$ac_ext >&5
5807
Martin v. Löwis11437992002-04-12 09:54:03 +00005808ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005809fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005810rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005812echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5813echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5814if test $ac_cv_type_mode_t = yes; then
5815 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816else
Martin v. Löwis11437992002-04-12 09:54:03 +00005817
5818cat >>confdefs.h <<_ACEOF
5819#define mode_t int
5820_ACEOF
5821
5822fi
5823
5824echo "$as_me:$LINENO: checking for off_t" >&5
5825echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5826if test "${ac_cv_type_off_t+set}" = set; then
5827 echo $ECHO_N "(cached) $ECHO_C" >&6
5828else
5829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005830/* confdefs.h. */
5831_ACEOF
5832cat confdefs.h >>conftest.$ac_ext
5833cat >>conftest.$ac_ext <<_ACEOF
5834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005835$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005836int
5837main ()
5838{
5839if ((off_t *) 0)
5840 return 0;
5841if (sizeof (off_t))
5842 return 0;
5843 ;
5844 return 0;
5845}
5846_ACEOF
5847rm -f conftest.$ac_objext
5848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005849 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005851 grep -v '^ *+' conftest.er1 >conftest.err
5852 rm -f conftest.er1
5853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5855 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005856 { ac_try='test -z "$ac_c_werror_flag"
5857 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5859 (eval $ac_try) 2>&5
5860 ac_status=$?
5861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5862 (exit $ac_status); }; } &&
5863 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5865 (eval $ac_try) 2>&5
5866 ac_status=$?
5867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5868 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005869 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005870else
Martin v. Löwis11437992002-04-12 09:54:03 +00005871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005872sed 's/^/| /' conftest.$ac_ext >&5
5873
Martin v. Löwis11437992002-04-12 09:54:03 +00005874ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005875fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005876rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005878echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5879echo "${ECHO_T}$ac_cv_type_off_t" >&6
5880if test $ac_cv_type_off_t = yes; then
5881 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005882else
Martin v. Löwis11437992002-04-12 09:54:03 +00005883
5884cat >>confdefs.h <<_ACEOF
5885#define off_t long
5886_ACEOF
5887
5888fi
5889
5890echo "$as_me:$LINENO: checking for pid_t" >&5
5891echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5892if test "${ac_cv_type_pid_t+set}" = set; then
5893 echo $ECHO_N "(cached) $ECHO_C" >&6
5894else
5895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005896/* confdefs.h. */
5897_ACEOF
5898cat confdefs.h >>conftest.$ac_ext
5899cat >>conftest.$ac_ext <<_ACEOF
5900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005901$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005902int
5903main ()
5904{
5905if ((pid_t *) 0)
5906 return 0;
5907if (sizeof (pid_t))
5908 return 0;
5909 ;
5910 return 0;
5911}
5912_ACEOF
5913rm -f conftest.$ac_objext
5914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005915 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005917 grep -v '^ *+' conftest.er1 >conftest.err
5918 rm -f conftest.er1
5919 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5921 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005922 { ac_try='test -z "$ac_c_werror_flag"
5923 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5925 (eval $ac_try) 2>&5
5926 ac_status=$?
5927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5928 (exit $ac_status); }; } &&
5929 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5931 (eval $ac_try) 2>&5
5932 ac_status=$?
5933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005935 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005936else
Martin v. Löwis11437992002-04-12 09:54:03 +00005937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005938sed 's/^/| /' conftest.$ac_ext >&5
5939
Martin v. Löwis11437992002-04-12 09:54:03 +00005940ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005941fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005942rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005944echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5945echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5946if test $ac_cv_type_pid_t = yes; then
5947 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948else
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
5950cat >>confdefs.h <<_ACEOF
5951#define pid_t int
5952_ACEOF
5953
5954fi
5955
5956echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5957echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5958if test "${ac_cv_type_signal+set}" = set; then
5959 echo $ECHO_N "(cached) $ECHO_C" >&6
5960else
5961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005962/* confdefs.h. */
5963_ACEOF
5964cat confdefs.h >>conftest.$ac_ext
5965cat >>conftest.$ac_ext <<_ACEOF
5966/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005967#include <sys/types.h>
5968#include <signal.h>
5969#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005970# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005971#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005972#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005973extern "C" void (*signal (int, void (*)(int)))(int);
5974#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005975void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005976#endif
5977
Martin v. Löwis11437992002-04-12 09:54:03 +00005978int
5979main ()
5980{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005981int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005982 ;
5983 return 0;
5984}
5985_ACEOF
5986rm -f conftest.$ac_objext
5987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005988 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005990 grep -v '^ *+' conftest.er1 >conftest.err
5991 rm -f conftest.er1
5992 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5994 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005995 { ac_try='test -z "$ac_c_werror_flag"
5996 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5998 (eval $ac_try) 2>&5
5999 ac_status=$?
6000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6001 (exit $ac_status); }; } &&
6002 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6004 (eval $ac_try) 2>&5
6005 ac_status=$?
6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006008 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006009else
Martin v. Löwis11437992002-04-12 09:54:03 +00006010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006011sed 's/^/| /' conftest.$ac_ext >&5
6012
Martin v. Löwis11437992002-04-12 09:54:03 +00006013ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006014fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006016fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006017echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6018echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006019
Martin v. Löwis11437992002-04-12 09:54:03 +00006020cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006021#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006022_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006023
Michael W. Hudson54241132001-12-07 15:38:26 +00006024
Martin v. Löwis11437992002-04-12 09:54:03 +00006025echo "$as_me:$LINENO: checking for size_t" >&5
6026echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6027if test "${ac_cv_type_size_t+set}" = set; then
6028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006029else
Martin v. Löwis11437992002-04-12 09:54:03 +00006030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006031/* confdefs.h. */
6032_ACEOF
6033cat confdefs.h >>conftest.$ac_ext
6034cat >>conftest.$ac_ext <<_ACEOF
6035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006036$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006037int
6038main ()
6039{
6040if ((size_t *) 0)
6041 return 0;
6042if (sizeof (size_t))
6043 return 0;
6044 ;
6045 return 0;
6046}
6047_ACEOF
6048rm -f conftest.$ac_objext
6049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006050 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006052 grep -v '^ *+' conftest.er1 >conftest.err
6053 rm -f conftest.er1
6054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6056 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006057 { ac_try='test -z "$ac_c_werror_flag"
6058 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6060 (eval $ac_try) 2>&5
6061 ac_status=$?
6062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6063 (exit $ac_status); }; } &&
6064 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6066 (eval $ac_try) 2>&5
6067 ac_status=$?
6068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6069 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006070 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006071else
Martin v. Löwis11437992002-04-12 09:54:03 +00006072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006073sed 's/^/| /' conftest.$ac_ext >&5
6074
Martin v. Löwis11437992002-04-12 09:54:03 +00006075ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006076fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006077rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006078fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006079echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6080echo "${ECHO_T}$ac_cv_type_size_t" >&6
6081if test $ac_cv_type_size_t = yes; then
6082 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006083else
Martin v. Löwis11437992002-04-12 09:54:03 +00006084
6085cat >>confdefs.h <<_ACEOF
6086#define size_t unsigned
6087_ACEOF
6088
6089fi
6090
6091echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6092echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6093if test "${ac_cv_type_uid_t+set}" = set; then
6094 echo $ECHO_N "(cached) $ECHO_C" >&6
6095else
6096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006097/* confdefs.h. */
6098_ACEOF
6099cat confdefs.h >>conftest.$ac_ext
6100cat >>conftest.$ac_ext <<_ACEOF
6101/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006102#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006103
6104_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006106 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107 ac_cv_type_uid_t=yes
6108else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006109 ac_cv_type_uid_t=no
6110fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006111rm -f conftest*
6112
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006113fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006114echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6115echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006116if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117
Martin v. Löwis11437992002-04-12 09:54:03 +00006118cat >>confdefs.h <<\_ACEOF
6119#define uid_t int
6120_ACEOF
6121
6122
6123cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006124#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006125_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126
6127fi
6128
Jack Jansendd19cf82001-12-06 22:36:17 +00006129
Michael W. Hudson54241132001-12-07 15:38:26 +00006130# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006131# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006132echo "$as_me:$LINENO: checking for int" >&5
6133echo $ECHO_N "checking for int... $ECHO_C" >&6
6134if test "${ac_cv_type_int+set}" = set; then
6135 echo $ECHO_N "(cached) $ECHO_C" >&6
6136else
6137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006138/* confdefs.h. */
6139_ACEOF
6140cat confdefs.h >>conftest.$ac_ext
6141cat >>conftest.$ac_ext <<_ACEOF
6142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006143$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006144int
6145main ()
6146{
6147if ((int *) 0)
6148 return 0;
6149if (sizeof (int))
6150 return 0;
6151 ;
6152 return 0;
6153}
6154_ACEOF
6155rm -f conftest.$ac_objext
6156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006157 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006159 grep -v '^ *+' conftest.er1 >conftest.err
6160 rm -f conftest.er1
6161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6163 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006164 { ac_try='test -z "$ac_c_werror_flag"
6165 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6167 (eval $ac_try) 2>&5
6168 ac_status=$?
6169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6170 (exit $ac_status); }; } &&
6171 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6173 (eval $ac_try) 2>&5
6174 ac_status=$?
6175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6176 (exit $ac_status); }; }; then
6177 ac_cv_type_int=yes
6178else
6179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006180sed 's/^/| /' conftest.$ac_ext >&5
6181
Martin v. Löwis11437992002-04-12 09:54:03 +00006182ac_cv_type_int=no
6183fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006184rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006185fi
6186echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6187echo "${ECHO_T}$ac_cv_type_int" >&6
6188
6189echo "$as_me:$LINENO: checking size of int" >&5
6190echo $ECHO_N "checking size of int... $ECHO_C" >&6
6191if test "${ac_cv_sizeof_int+set}" = set; then
6192 echo $ECHO_N "(cached) $ECHO_C" >&6
6193else
6194 if test "$ac_cv_type_int" = yes; then
6195 # The cast to unsigned long works around a bug in the HP C Compiler
6196 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6197 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6198 # This bug is HP SR number 8606223364.
6199 if test "$cross_compiling" = yes; then
6200 # Depending upon the size, compute the lo and hi bounds.
6201cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006202/* confdefs.h. */
6203_ACEOF
6204cat confdefs.h >>conftest.$ac_ext
6205cat >>conftest.$ac_ext <<_ACEOF
6206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006207$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006208int
6209main ()
6210{
6211static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6212test_array [0] = 0
6213
6214 ;
6215 return 0;
6216}
6217_ACEOF
6218rm -f conftest.$ac_objext
6219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006220 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006222 grep -v '^ *+' conftest.er1 >conftest.err
6223 rm -f conftest.er1
6224 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6226 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006227 { ac_try='test -z "$ac_c_werror_flag"
6228 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6230 (eval $ac_try) 2>&5
6231 ac_status=$?
6232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6233 (exit $ac_status); }; } &&
6234 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6236 (eval $ac_try) 2>&5
6237 ac_status=$?
6238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6239 (exit $ac_status); }; }; then
6240 ac_lo=0 ac_mid=0
6241 while :; do
6242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006243/* confdefs.h. */
6244_ACEOF
6245cat confdefs.h >>conftest.$ac_ext
6246cat >>conftest.$ac_ext <<_ACEOF
6247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006248$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006249int
6250main ()
6251{
6252static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6253test_array [0] = 0
6254
6255 ;
6256 return 0;
6257}
6258_ACEOF
6259rm -f conftest.$ac_objext
6260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006261 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263 grep -v '^ *+' conftest.er1 >conftest.err
6264 rm -f conftest.er1
6265 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006268 { ac_try='test -z "$ac_c_werror_flag"
6269 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6271 (eval $ac_try) 2>&5
6272 ac_status=$?
6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274 (exit $ac_status); }; } &&
6275 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6277 (eval $ac_try) 2>&5
6278 ac_status=$?
6279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6280 (exit $ac_status); }; }; then
6281 ac_hi=$ac_mid; break
6282else
6283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006284sed 's/^/| /' conftest.$ac_ext >&5
6285
Martin v. Löwis11437992002-04-12 09:54:03 +00006286ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006287 if test $ac_lo -le $ac_mid; then
6288 ac_lo= ac_hi=
6289 break
6290 fi
6291 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006292fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006294 done
6295else
6296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006297sed 's/^/| /' conftest.$ac_ext >&5
6298
Martin v. Löwis11437992002-04-12 09:54:03 +00006299cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006300/* confdefs.h. */
6301_ACEOF
6302cat confdefs.h >>conftest.$ac_ext
6303cat >>conftest.$ac_ext <<_ACEOF
6304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006305$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006306int
6307main ()
6308{
6309static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6310test_array [0] = 0
6311
6312 ;
6313 return 0;
6314}
6315_ACEOF
6316rm -f conftest.$ac_objext
6317if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006318 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006320 grep -v '^ *+' conftest.er1 >conftest.err
6321 rm -f conftest.er1
6322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6324 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006325 { ac_try='test -z "$ac_c_werror_flag"
6326 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6328 (eval $ac_try) 2>&5
6329 ac_status=$?
6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331 (exit $ac_status); }; } &&
6332 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6334 (eval $ac_try) 2>&5
6335 ac_status=$?
6336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6337 (exit $ac_status); }; }; then
6338 ac_hi=-1 ac_mid=-1
6339 while :; do
6340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006341/* confdefs.h. */
6342_ACEOF
6343cat confdefs.h >>conftest.$ac_ext
6344cat >>conftest.$ac_ext <<_ACEOF
6345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006346$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006347int
6348main ()
6349{
6350static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6351test_array [0] = 0
6352
6353 ;
6354 return 0;
6355}
6356_ACEOF
6357rm -f conftest.$ac_objext
6358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006359 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006361 grep -v '^ *+' conftest.er1 >conftest.err
6362 rm -f conftest.er1
6363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6365 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006366 { ac_try='test -z "$ac_c_werror_flag"
6367 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6369 (eval $ac_try) 2>&5
6370 ac_status=$?
6371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6372 (exit $ac_status); }; } &&
6373 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6375 (eval $ac_try) 2>&5
6376 ac_status=$?
6377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6378 (exit $ac_status); }; }; then
6379 ac_lo=$ac_mid; break
6380else
6381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006382sed 's/^/| /' conftest.$ac_ext >&5
6383
Martin v. Löwis11437992002-04-12 09:54:03 +00006384ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006385 if test $ac_mid -le $ac_hi; then
6386 ac_lo= ac_hi=
6387 break
6388 fi
6389 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006390fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006391rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006392 done
6393else
6394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006395sed 's/^/| /' conftest.$ac_ext >&5
6396
Martin v. Löwis11437992002-04-12 09:54:03 +00006397ac_lo= ac_hi=
6398fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006399rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006400fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006402# Binary search between lo and hi bounds.
6403while test "x$ac_lo" != "x$ac_hi"; do
6404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006406/* confdefs.h. */
6407_ACEOF
6408cat confdefs.h >>conftest.$ac_ext
6409cat >>conftest.$ac_ext <<_ACEOF
6410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006411$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006412int
6413main ()
6414{
6415static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6416test_array [0] = 0
6417
6418 ;
6419 return 0;
6420}
6421_ACEOF
6422rm -f conftest.$ac_objext
6423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006424 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006426 grep -v '^ *+' conftest.er1 >conftest.err
6427 rm -f conftest.er1
6428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006431 { ac_try='test -z "$ac_c_werror_flag"
6432 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6434 (eval $ac_try) 2>&5
6435 ac_status=$?
6436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437 (exit $ac_status); }; } &&
6438 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6440 (eval $ac_try) 2>&5
6441 ac_status=$?
6442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443 (exit $ac_status); }; }; then
6444 ac_hi=$ac_mid
6445else
6446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006447sed 's/^/| /' conftest.$ac_ext >&5
6448
Martin v. Löwis11437992002-04-12 09:54:03 +00006449ac_lo=`expr '(' $ac_mid ')' + 1`
6450fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006452done
6453case $ac_lo in
6454?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006455'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6456See \`config.log' for more details." >&5
6457echo "$as_me: error: cannot compute sizeof (int), 77
6458See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006459 { (exit 1); exit 1; }; } ;;
6460esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006461else
6462 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006463 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6464See \`config.log' for more details." >&5
6465echo "$as_me: error: cannot run test program while cross compiling
6466See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006467 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006468else
Martin v. Löwis11437992002-04-12 09:54:03 +00006469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006470/* confdefs.h. */
6471_ACEOF
6472cat confdefs.h >>conftest.$ac_ext
6473cat >>conftest.$ac_ext <<_ACEOF
6474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006475$ac_includes_default
6476long longval () { return (long) (sizeof (int)); }
6477unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006478#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006479#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006480int
6481main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006482{
Martin v. Löwis11437992002-04-12 09:54:03 +00006483
6484 FILE *f = fopen ("conftest.val", "w");
6485 if (! f)
6486 exit (1);
6487 if (((long) (sizeof (int))) < 0)
6488 {
6489 long i = longval ();
6490 if (i != ((long) (sizeof (int))))
6491 exit (1);
6492 fprintf (f, "%ld\n", i);
6493 }
6494 else
6495 {
6496 unsigned long i = ulongval ();
6497 if (i != ((long) (sizeof (int))))
6498 exit (1);
6499 fprintf (f, "%lu\n", i);
6500 }
6501 exit (ferror (f) || fclose (f) != 0);
6502
6503 ;
6504 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006505}
Martin v. Löwis11437992002-04-12 09:54:03 +00006506_ACEOF
6507rm -f conftest$ac_exeext
6508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6509 (eval $ac_link) 2>&5
6510 ac_status=$?
6511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6514 (eval $ac_try) 2>&5
6515 ac_status=$?
6516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517 (exit $ac_status); }; }; then
6518 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006519else
Martin v. Löwis11437992002-04-12 09:54:03 +00006520 echo "$as_me: program exited with status $ac_status" >&5
6521echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006522sed 's/^/| /' conftest.$ac_ext >&5
6523
Martin v. Löwis11437992002-04-12 09:54:03 +00006524( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006525{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6526See \`config.log' for more details." >&5
6527echo "$as_me: error: cannot compute sizeof (int), 77
6528See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006529 { (exit 1); exit 1; }; }
6530fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006531rm -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 +00006532fi
6533fi
6534rm -f conftest.val
6535else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006536 ac_cv_sizeof_int=0
6537fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006539echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6540echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6541cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006542#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006543_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006544
6545
Martin v. Löwis11437992002-04-12 09:54:03 +00006546echo "$as_me:$LINENO: checking for long" >&5
6547echo $ECHO_N "checking for long... $ECHO_C" >&6
6548if test "${ac_cv_type_long+set}" = set; then
6549 echo $ECHO_N "(cached) $ECHO_C" >&6
6550else
6551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006552/* confdefs.h. */
6553_ACEOF
6554cat confdefs.h >>conftest.$ac_ext
6555cat >>conftest.$ac_ext <<_ACEOF
6556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006557$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006558int
6559main ()
6560{
6561if ((long *) 0)
6562 return 0;
6563if (sizeof (long))
6564 return 0;
6565 ;
6566 return 0;
6567}
6568_ACEOF
6569rm -f conftest.$ac_objext
6570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006571 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006573 grep -v '^ *+' conftest.er1 >conftest.err
6574 rm -f conftest.er1
6575 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006578 { ac_try='test -z "$ac_c_werror_flag"
6579 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6581 (eval $ac_try) 2>&5
6582 ac_status=$?
6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584 (exit $ac_status); }; } &&
6585 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6587 (eval $ac_try) 2>&5
6588 ac_status=$?
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590 (exit $ac_status); }; }; then
6591 ac_cv_type_long=yes
6592else
6593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006594sed 's/^/| /' conftest.$ac_ext >&5
6595
Martin v. Löwis11437992002-04-12 09:54:03 +00006596ac_cv_type_long=no
6597fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006598rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006599fi
6600echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6601echo "${ECHO_T}$ac_cv_type_long" >&6
6602
6603echo "$as_me:$LINENO: checking size of long" >&5
6604echo $ECHO_N "checking size of long... $ECHO_C" >&6
6605if test "${ac_cv_sizeof_long+set}" = set; then
6606 echo $ECHO_N "(cached) $ECHO_C" >&6
6607else
6608 if test "$ac_cv_type_long" = yes; then
6609 # The cast to unsigned long works around a bug in the HP C Compiler
6610 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6611 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6612 # This bug is HP SR number 8606223364.
6613 if test "$cross_compiling" = yes; then
6614 # Depending upon the size, compute the lo and hi bounds.
6615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006616/* confdefs.h. */
6617_ACEOF
6618cat confdefs.h >>conftest.$ac_ext
6619cat >>conftest.$ac_ext <<_ACEOF
6620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006621$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006622int
6623main ()
6624{
6625static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6626test_array [0] = 0
6627
6628 ;
6629 return 0;
6630}
6631_ACEOF
6632rm -f conftest.$ac_objext
6633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006634 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006636 grep -v '^ *+' conftest.er1 >conftest.err
6637 rm -f conftest.er1
6638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6640 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006641 { ac_try='test -z "$ac_c_werror_flag"
6642 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6644 (eval $ac_try) 2>&5
6645 ac_status=$?
6646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647 (exit $ac_status); }; } &&
6648 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6650 (eval $ac_try) 2>&5
6651 ac_status=$?
6652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6653 (exit $ac_status); }; }; then
6654 ac_lo=0 ac_mid=0
6655 while :; do
6656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006657/* confdefs.h. */
6658_ACEOF
6659cat confdefs.h >>conftest.$ac_ext
6660cat >>conftest.$ac_ext <<_ACEOF
6661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006662$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006663int
6664main ()
6665{
6666static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6667test_array [0] = 0
6668
6669 ;
6670 return 0;
6671}
6672_ACEOF
6673rm -f conftest.$ac_objext
6674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006675 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006677 grep -v '^ *+' conftest.er1 >conftest.err
6678 rm -f conftest.er1
6679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006682 { ac_try='test -z "$ac_c_werror_flag"
6683 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6685 (eval $ac_try) 2>&5
6686 ac_status=$?
6687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688 (exit $ac_status); }; } &&
6689 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6691 (eval $ac_try) 2>&5
6692 ac_status=$?
6693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6694 (exit $ac_status); }; }; then
6695 ac_hi=$ac_mid; break
6696else
6697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006698sed 's/^/| /' conftest.$ac_ext >&5
6699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006701 if test $ac_lo -le $ac_mid; then
6702 ac_lo= ac_hi=
6703 break
6704 fi
6705 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006706fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006707rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 done
6709else
6710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006711sed 's/^/| /' conftest.$ac_ext >&5
6712
Martin v. Löwis11437992002-04-12 09:54:03 +00006713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006714/* confdefs.h. */
6715_ACEOF
6716cat confdefs.h >>conftest.$ac_ext
6717cat >>conftest.$ac_ext <<_ACEOF
6718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006719$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006720int
6721main ()
6722{
6723static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6724test_array [0] = 0
6725
6726 ;
6727 return 0;
6728}
6729_ACEOF
6730rm -f conftest.$ac_objext
6731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006732 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006734 grep -v '^ *+' conftest.er1 >conftest.err
6735 rm -f conftest.er1
6736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6738 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006739 { ac_try='test -z "$ac_c_werror_flag"
6740 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6742 (eval $ac_try) 2>&5
6743 ac_status=$?
6744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6745 (exit $ac_status); }; } &&
6746 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6748 (eval $ac_try) 2>&5
6749 ac_status=$?
6750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6751 (exit $ac_status); }; }; then
6752 ac_hi=-1 ac_mid=-1
6753 while :; do
6754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006755/* confdefs.h. */
6756_ACEOF
6757cat confdefs.h >>conftest.$ac_ext
6758cat >>conftest.$ac_ext <<_ACEOF
6759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006760$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006761int
6762main ()
6763{
6764static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6765test_array [0] = 0
6766
6767 ;
6768 return 0;
6769}
6770_ACEOF
6771rm -f conftest.$ac_objext
6772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006773 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006775 grep -v '^ *+' conftest.er1 >conftest.err
6776 rm -f conftest.er1
6777 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6779 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006780 { ac_try='test -z "$ac_c_werror_flag"
6781 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6783 (eval $ac_try) 2>&5
6784 ac_status=$?
6785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786 (exit $ac_status); }; } &&
6787 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6789 (eval $ac_try) 2>&5
6790 ac_status=$?
6791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792 (exit $ac_status); }; }; then
6793 ac_lo=$ac_mid; break
6794else
6795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006796sed 's/^/| /' conftest.$ac_ext >&5
6797
Martin v. Löwis11437992002-04-12 09:54:03 +00006798ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006799 if test $ac_mid -le $ac_hi; then
6800 ac_lo= ac_hi=
6801 break
6802 fi
6803 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006804fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006805rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006806 done
6807else
6808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006809sed 's/^/| /' conftest.$ac_ext >&5
6810
Martin v. Löwis11437992002-04-12 09:54:03 +00006811ac_lo= ac_hi=
6812fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006813rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006814fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006815rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006816# Binary search between lo and hi bounds.
6817while test "x$ac_lo" != "x$ac_hi"; do
6818 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006820/* confdefs.h. */
6821_ACEOF
6822cat confdefs.h >>conftest.$ac_ext
6823cat >>conftest.$ac_ext <<_ACEOF
6824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006825$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006826int
6827main ()
6828{
6829static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6830test_array [0] = 0
6831
6832 ;
6833 return 0;
6834}
6835_ACEOF
6836rm -f conftest.$ac_objext
6837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006838 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006840 grep -v '^ *+' conftest.er1 >conftest.err
6841 rm -f conftest.er1
6842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6844 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006845 { ac_try='test -z "$ac_c_werror_flag"
6846 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6848 (eval $ac_try) 2>&5
6849 ac_status=$?
6850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851 (exit $ac_status); }; } &&
6852 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6854 (eval $ac_try) 2>&5
6855 ac_status=$?
6856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6857 (exit $ac_status); }; }; then
6858 ac_hi=$ac_mid
6859else
6860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006861sed 's/^/| /' conftest.$ac_ext >&5
6862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863ac_lo=`expr '(' $ac_mid ')' + 1`
6864fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006865rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006866done
6867case $ac_lo in
6868?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006869'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6870See \`config.log' for more details." >&5
6871echo "$as_me: error: cannot compute sizeof (long), 77
6872See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006873 { (exit 1); exit 1; }; } ;;
6874esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006875else
6876 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006877 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6878See \`config.log' for more details." >&5
6879echo "$as_me: error: cannot run test program while cross compiling
6880See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006881 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006882else
Martin v. Löwis11437992002-04-12 09:54:03 +00006883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006884/* confdefs.h. */
6885_ACEOF
6886cat confdefs.h >>conftest.$ac_ext
6887cat >>conftest.$ac_ext <<_ACEOF
6888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006889$ac_includes_default
6890long longval () { return (long) (sizeof (long)); }
6891unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006892#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006893#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006894int
6895main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006896{
Martin v. Löwis11437992002-04-12 09:54:03 +00006897
6898 FILE *f = fopen ("conftest.val", "w");
6899 if (! f)
6900 exit (1);
6901 if (((long) (sizeof (long))) < 0)
6902 {
6903 long i = longval ();
6904 if (i != ((long) (sizeof (long))))
6905 exit (1);
6906 fprintf (f, "%ld\n", i);
6907 }
6908 else
6909 {
6910 unsigned long i = ulongval ();
6911 if (i != ((long) (sizeof (long))))
6912 exit (1);
6913 fprintf (f, "%lu\n", i);
6914 }
6915 exit (ferror (f) || fclose (f) != 0);
6916
6917 ;
6918 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006919}
Martin v. Löwis11437992002-04-12 09:54:03 +00006920_ACEOF
6921rm -f conftest$ac_exeext
6922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6923 (eval $ac_link) 2>&5
6924 ac_status=$?
6925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6928 (eval $ac_try) 2>&5
6929 ac_status=$?
6930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6931 (exit $ac_status); }; }; then
6932 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006933else
Martin v. Löwis11437992002-04-12 09:54:03 +00006934 echo "$as_me: program exited with status $ac_status" >&5
6935echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006936sed 's/^/| /' conftest.$ac_ext >&5
6937
Martin v. Löwis11437992002-04-12 09:54:03 +00006938( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006939{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6940See \`config.log' for more details." >&5
6941echo "$as_me: error: cannot compute sizeof (long), 77
6942See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 { (exit 1); exit 1; }; }
6944fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006945rm -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 +00006946fi
6947fi
6948rm -f conftest.val
6949else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006950 ac_cv_sizeof_long=0
6951fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006953echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6954echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6955cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006956#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006957_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006958
6959
Martin v. Löwis11437992002-04-12 09:54:03 +00006960echo "$as_me:$LINENO: checking for void *" >&5
6961echo $ECHO_N "checking for void *... $ECHO_C" >&6
6962if test "${ac_cv_type_void_p+set}" = set; then
6963 echo $ECHO_N "(cached) $ECHO_C" >&6
6964else
6965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006966/* confdefs.h. */
6967_ACEOF
6968cat confdefs.h >>conftest.$ac_ext
6969cat >>conftest.$ac_ext <<_ACEOF
6970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006971$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006972int
6973main ()
6974{
6975if ((void * *) 0)
6976 return 0;
6977if (sizeof (void *))
6978 return 0;
6979 ;
6980 return 0;
6981}
6982_ACEOF
6983rm -f conftest.$ac_objext
6984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006985 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006987 grep -v '^ *+' conftest.er1 >conftest.err
6988 rm -f conftest.er1
6989 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6991 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006992 { ac_try='test -z "$ac_c_werror_flag"
6993 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6995 (eval $ac_try) 2>&5
6996 ac_status=$?
6997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6998 (exit $ac_status); }; } &&
6999 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7001 (eval $ac_try) 2>&5
7002 ac_status=$?
7003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7004 (exit $ac_status); }; }; then
7005 ac_cv_type_void_p=yes
7006else
7007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007008sed 's/^/| /' conftest.$ac_ext >&5
7009
Martin v. Löwis11437992002-04-12 09:54:03 +00007010ac_cv_type_void_p=no
7011fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007013fi
7014echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7015echo "${ECHO_T}$ac_cv_type_void_p" >&6
7016
7017echo "$as_me:$LINENO: checking size of void *" >&5
7018echo $ECHO_N "checking size of void *... $ECHO_C" >&6
7019if test "${ac_cv_sizeof_void_p+set}" = set; then
7020 echo $ECHO_N "(cached) $ECHO_C" >&6
7021else
7022 if test "$ac_cv_type_void_p" = yes; then
7023 # The cast to unsigned long works around a bug in the HP C Compiler
7024 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7025 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7026 # This bug is HP SR number 8606223364.
7027 if test "$cross_compiling" = yes; then
7028 # Depending upon the size, compute the lo and hi bounds.
7029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007030/* confdefs.h. */
7031_ACEOF
7032cat confdefs.h >>conftest.$ac_ext
7033cat >>conftest.$ac_ext <<_ACEOF
7034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007035$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007036int
7037main ()
7038{
7039static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
7040test_array [0] = 0
7041
7042 ;
7043 return 0;
7044}
7045_ACEOF
7046rm -f conftest.$ac_objext
7047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007048 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007050 grep -v '^ *+' conftest.er1 >conftest.err
7051 rm -f conftest.er1
7052 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007055 { ac_try='test -z "$ac_c_werror_flag"
7056 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7058 (eval $ac_try) 2>&5
7059 ac_status=$?
7060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7061 (exit $ac_status); }; } &&
7062 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7064 (eval $ac_try) 2>&5
7065 ac_status=$?
7066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7067 (exit $ac_status); }; }; then
7068 ac_lo=0 ac_mid=0
7069 while :; do
7070 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007071/* confdefs.h. */
7072_ACEOF
7073cat confdefs.h >>conftest.$ac_ext
7074cat >>conftest.$ac_ext <<_ACEOF
7075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007076$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007077int
7078main ()
7079{
7080static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7081test_array [0] = 0
7082
7083 ;
7084 return 0;
7085}
7086_ACEOF
7087rm -f conftest.$ac_objext
7088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007089 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007091 grep -v '^ *+' conftest.er1 >conftest.err
7092 rm -f conftest.er1
7093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7095 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007096 { ac_try='test -z "$ac_c_werror_flag"
7097 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7099 (eval $ac_try) 2>&5
7100 ac_status=$?
7101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7102 (exit $ac_status); }; } &&
7103 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7105 (eval $ac_try) 2>&5
7106 ac_status=$?
7107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7108 (exit $ac_status); }; }; then
7109 ac_hi=$ac_mid; break
7110else
7111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007112sed 's/^/| /' conftest.$ac_ext >&5
7113
Martin v. Löwis11437992002-04-12 09:54:03 +00007114ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007115 if test $ac_lo -le $ac_mid; then
7116 ac_lo= ac_hi=
7117 break
7118 fi
7119 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007120fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007121rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007122 done
7123else
7124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007125sed 's/^/| /' conftest.$ac_ext >&5
7126
Martin v. Löwis11437992002-04-12 09:54:03 +00007127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007128/* confdefs.h. */
7129_ACEOF
7130cat confdefs.h >>conftest.$ac_ext
7131cat >>conftest.$ac_ext <<_ACEOF
7132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007133$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007134int
7135main ()
7136{
7137static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7138test_array [0] = 0
7139
7140 ;
7141 return 0;
7142}
7143_ACEOF
7144rm -f conftest.$ac_objext
7145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007146 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007148 grep -v '^ *+' conftest.er1 >conftest.err
7149 rm -f conftest.er1
7150 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7152 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007153 { ac_try='test -z "$ac_c_werror_flag"
7154 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7156 (eval $ac_try) 2>&5
7157 ac_status=$?
7158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7159 (exit $ac_status); }; } &&
7160 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7162 (eval $ac_try) 2>&5
7163 ac_status=$?
7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7165 (exit $ac_status); }; }; then
7166 ac_hi=-1 ac_mid=-1
7167 while :; do
7168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007169/* confdefs.h. */
7170_ACEOF
7171cat confdefs.h >>conftest.$ac_ext
7172cat >>conftest.$ac_ext <<_ACEOF
7173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007174$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007175int
7176main ()
7177{
7178static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7179test_array [0] = 0
7180
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185rm -f conftest.$ac_objext
7186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007187 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007189 grep -v '^ *+' conftest.er1 >conftest.err
7190 rm -f conftest.er1
7191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7193 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007194 { ac_try='test -z "$ac_c_werror_flag"
7195 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7197 (eval $ac_try) 2>&5
7198 ac_status=$?
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); }; } &&
7201 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7203 (eval $ac_try) 2>&5
7204 ac_status=$?
7205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7206 (exit $ac_status); }; }; then
7207 ac_lo=$ac_mid; break
7208else
7209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007210sed 's/^/| /' conftest.$ac_ext >&5
7211
Martin v. Löwis11437992002-04-12 09:54:03 +00007212ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007213 if test $ac_mid -le $ac_hi; then
7214 ac_lo= ac_hi=
7215 break
7216 fi
7217 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007218fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007219rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007220 done
7221else
7222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007223sed 's/^/| /' conftest.$ac_ext >&5
7224
Martin v. Löwis11437992002-04-12 09:54:03 +00007225ac_lo= ac_hi=
7226fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007228fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007229rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007230# Binary search between lo and hi bounds.
7231while test "x$ac_lo" != "x$ac_hi"; do
7232 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007234/* confdefs.h. */
7235_ACEOF
7236cat confdefs.h >>conftest.$ac_ext
7237cat >>conftest.$ac_ext <<_ACEOF
7238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007239$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007240int
7241main ()
7242{
7243static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7244test_array [0] = 0
7245
7246 ;
7247 return 0;
7248}
7249_ACEOF
7250rm -f conftest.$ac_objext
7251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007252 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007254 grep -v '^ *+' conftest.er1 >conftest.err
7255 rm -f conftest.er1
7256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7258 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007259 { ac_try='test -z "$ac_c_werror_flag"
7260 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7262 (eval $ac_try) 2>&5
7263 ac_status=$?
7264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7265 (exit $ac_status); }; } &&
7266 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7268 (eval $ac_try) 2>&5
7269 ac_status=$?
7270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271 (exit $ac_status); }; }; then
7272 ac_hi=$ac_mid
7273else
7274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007275sed 's/^/| /' conftest.$ac_ext >&5
7276
Martin v. Löwis11437992002-04-12 09:54:03 +00007277ac_lo=`expr '(' $ac_mid ')' + 1`
7278fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007280done
7281case $ac_lo in
7282?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007283'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7284See \`config.log' for more details." >&5
7285echo "$as_me: error: cannot compute sizeof (void *), 77
7286See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007287 { (exit 1); exit 1; }; } ;;
7288esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007289else
7290 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007291 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7292See \`config.log' for more details." >&5
7293echo "$as_me: error: cannot run test program while cross compiling
7294See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007295 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007296else
Martin v. Löwis11437992002-04-12 09:54:03 +00007297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* confdefs.h. */
7299_ACEOF
7300cat confdefs.h >>conftest.$ac_ext
7301cat >>conftest.$ac_ext <<_ACEOF
7302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007303$ac_includes_default
7304long longval () { return (long) (sizeof (void *)); }
7305unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007306#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007307#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007308int
7309main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007310{
Martin v. Löwis11437992002-04-12 09:54:03 +00007311
7312 FILE *f = fopen ("conftest.val", "w");
7313 if (! f)
7314 exit (1);
7315 if (((long) (sizeof (void *))) < 0)
7316 {
7317 long i = longval ();
7318 if (i != ((long) (sizeof (void *))))
7319 exit (1);
7320 fprintf (f, "%ld\n", i);
7321 }
7322 else
7323 {
7324 unsigned long i = ulongval ();
7325 if (i != ((long) (sizeof (void *))))
7326 exit (1);
7327 fprintf (f, "%lu\n", i);
7328 }
7329 exit (ferror (f) || fclose (f) != 0);
7330
7331 ;
7332 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007333}
Martin v. Löwis11437992002-04-12 09:54:03 +00007334_ACEOF
7335rm -f conftest$ac_exeext
7336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7337 (eval $ac_link) 2>&5
7338 ac_status=$?
7339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7340 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7342 (eval $ac_try) 2>&5
7343 ac_status=$?
7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); }; }; then
7346 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007347else
Martin v. Löwis11437992002-04-12 09:54:03 +00007348 echo "$as_me: program exited with status $ac_status" >&5
7349echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007350sed 's/^/| /' conftest.$ac_ext >&5
7351
Martin v. Löwis11437992002-04-12 09:54:03 +00007352( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007353{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7354See \`config.log' for more details." >&5
7355echo "$as_me: error: cannot compute sizeof (void *), 77
7356See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007357 { (exit 1); exit 1; }; }
7358fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007359rm -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 +00007360fi
7361fi
7362rm -f conftest.val
7363else
Guido van Rossumad678af1998-10-02 14:42:15 +00007364 ac_cv_sizeof_void_p=0
7365fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007367echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7368echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7369cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007370#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007371_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007372
7373
Martin v. Löwis11437992002-04-12 09:54:03 +00007374echo "$as_me:$LINENO: checking for short" >&5
7375echo $ECHO_N "checking for short... $ECHO_C" >&6
7376if test "${ac_cv_type_short+set}" = set; then
7377 echo $ECHO_N "(cached) $ECHO_C" >&6
7378else
7379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007380/* confdefs.h. */
7381_ACEOF
7382cat confdefs.h >>conftest.$ac_ext
7383cat >>conftest.$ac_ext <<_ACEOF
7384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007385$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007386int
7387main ()
7388{
7389if ((short *) 0)
7390 return 0;
7391if (sizeof (short))
7392 return 0;
7393 ;
7394 return 0;
7395}
7396_ACEOF
7397rm -f conftest.$ac_objext
7398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007399 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007401 grep -v '^ *+' conftest.er1 >conftest.err
7402 rm -f conftest.er1
7403 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7405 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007406 { ac_try='test -z "$ac_c_werror_flag"
7407 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7409 (eval $ac_try) 2>&5
7410 ac_status=$?
7411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7412 (exit $ac_status); }; } &&
7413 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7415 (eval $ac_try) 2>&5
7416 ac_status=$?
7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7418 (exit $ac_status); }; }; then
7419 ac_cv_type_short=yes
7420else
7421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007422sed 's/^/| /' conftest.$ac_ext >&5
7423
Martin v. Löwis11437992002-04-12 09:54:03 +00007424ac_cv_type_short=no
7425fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007426rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007427fi
7428echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7429echo "${ECHO_T}$ac_cv_type_short" >&6
7430
7431echo "$as_me:$LINENO: checking size of short" >&5
7432echo $ECHO_N "checking size of short... $ECHO_C" >&6
7433if test "${ac_cv_sizeof_short+set}" = set; then
7434 echo $ECHO_N "(cached) $ECHO_C" >&6
7435else
7436 if test "$ac_cv_type_short" = yes; then
7437 # The cast to unsigned long works around a bug in the HP C Compiler
7438 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7439 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7440 # This bug is HP SR number 8606223364.
7441 if test "$cross_compiling" = yes; then
7442 # Depending upon the size, compute the lo and hi bounds.
7443cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007444/* confdefs.h. */
7445_ACEOF
7446cat confdefs.h >>conftest.$ac_ext
7447cat >>conftest.$ac_ext <<_ACEOF
7448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007449$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007450int
7451main ()
7452{
7453static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7454test_array [0] = 0
7455
7456 ;
7457 return 0;
7458}
7459_ACEOF
7460rm -f conftest.$ac_objext
7461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007462 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007464 grep -v '^ *+' conftest.er1 >conftest.err
7465 rm -f conftest.er1
7466 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007469 { ac_try='test -z "$ac_c_werror_flag"
7470 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7472 (eval $ac_try) 2>&5
7473 ac_status=$?
7474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7475 (exit $ac_status); }; } &&
7476 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7478 (eval $ac_try) 2>&5
7479 ac_status=$?
7480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7481 (exit $ac_status); }; }; then
7482 ac_lo=0 ac_mid=0
7483 while :; do
7484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007485/* confdefs.h. */
7486_ACEOF
7487cat confdefs.h >>conftest.$ac_ext
7488cat >>conftest.$ac_ext <<_ACEOF
7489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007490$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007491int
7492main ()
7493{
7494static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7495test_array [0] = 0
7496
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
7502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007503 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007505 grep -v '^ *+' conftest.er1 >conftest.err
7506 rm -f conftest.er1
7507 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007510 { ac_try='test -z "$ac_c_werror_flag"
7511 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7513 (eval $ac_try) 2>&5
7514 ac_status=$?
7515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516 (exit $ac_status); }; } &&
7517 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7519 (eval $ac_try) 2>&5
7520 ac_status=$?
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); }; }; then
7523 ac_hi=$ac_mid; break
7524else
7525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007526sed 's/^/| /' conftest.$ac_ext >&5
7527
Martin v. Löwis11437992002-04-12 09:54:03 +00007528ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007529 if test $ac_lo -le $ac_mid; then
7530 ac_lo= ac_hi=
7531 break
7532 fi
7533 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007534fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007535rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007536 done
7537else
7538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007539sed 's/^/| /' conftest.$ac_ext >&5
7540
Martin v. Löwis11437992002-04-12 09:54:03 +00007541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007542/* confdefs.h. */
7543_ACEOF
7544cat confdefs.h >>conftest.$ac_ext
7545cat >>conftest.$ac_ext <<_ACEOF
7546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007547$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007548int
7549main ()
7550{
7551static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7552test_array [0] = 0
7553
7554 ;
7555 return 0;
7556}
7557_ACEOF
7558rm -f conftest.$ac_objext
7559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007560 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007562 grep -v '^ *+' conftest.er1 >conftest.err
7563 rm -f conftest.er1
7564 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7566 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007567 { ac_try='test -z "$ac_c_werror_flag"
7568 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7570 (eval $ac_try) 2>&5
7571 ac_status=$?
7572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7573 (exit $ac_status); }; } &&
7574 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7576 (eval $ac_try) 2>&5
7577 ac_status=$?
7578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7579 (exit $ac_status); }; }; then
7580 ac_hi=-1 ac_mid=-1
7581 while :; do
7582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007583/* confdefs.h. */
7584_ACEOF
7585cat confdefs.h >>conftest.$ac_ext
7586cat >>conftest.$ac_ext <<_ACEOF
7587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007588$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007589int
7590main ()
7591{
7592static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7593test_array [0] = 0
7594
7595 ;
7596 return 0;
7597}
7598_ACEOF
7599rm -f conftest.$ac_objext
7600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007601 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007603 grep -v '^ *+' conftest.er1 >conftest.err
7604 rm -f conftest.er1
7605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7607 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007608 { ac_try='test -z "$ac_c_werror_flag"
7609 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7611 (eval $ac_try) 2>&5
7612 ac_status=$?
7613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614 (exit $ac_status); }; } &&
7615 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7617 (eval $ac_try) 2>&5
7618 ac_status=$?
7619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620 (exit $ac_status); }; }; then
7621 ac_lo=$ac_mid; break
7622else
7623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007624sed 's/^/| /' conftest.$ac_ext >&5
7625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007627 if test $ac_mid -le $ac_hi; then
7628 ac_lo= ac_hi=
7629 break
7630 fi
7631 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007632fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007633rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 done
7635else
7636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007637sed 's/^/| /' conftest.$ac_ext >&5
7638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639ac_lo= ac_hi=
7640fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007641rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007642fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007644# Binary search between lo and hi bounds.
7645while test "x$ac_lo" != "x$ac_hi"; do
7646 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007648/* confdefs.h. */
7649_ACEOF
7650cat confdefs.h >>conftest.$ac_ext
7651cat >>conftest.$ac_ext <<_ACEOF
7652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007653$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007654int
7655main ()
7656{
7657static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7658test_array [0] = 0
7659
7660 ;
7661 return 0;
7662}
7663_ACEOF
7664rm -f conftest.$ac_objext
7665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007666 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007668 grep -v '^ *+' conftest.er1 >conftest.err
7669 rm -f conftest.er1
7670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7672 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007673 { ac_try='test -z "$ac_c_werror_flag"
7674 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676 (eval $ac_try) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); }; } &&
7680 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7682 (eval $ac_try) 2>&5
7683 ac_status=$?
7684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); }; }; then
7686 ac_hi=$ac_mid
7687else
7688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007689sed 's/^/| /' conftest.$ac_ext >&5
7690
Martin v. Löwis11437992002-04-12 09:54:03 +00007691ac_lo=`expr '(' $ac_mid ')' + 1`
7692fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007693rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007694done
7695case $ac_lo in
7696?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007697'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7698See \`config.log' for more details." >&5
7699echo "$as_me: error: cannot compute sizeof (short), 77
7700See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007701 { (exit 1); exit 1; }; } ;;
7702esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007703else
7704 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007705 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7706See \`config.log' for more details." >&5
7707echo "$as_me: error: cannot run test program while cross compiling
7708See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007710else
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007712/* confdefs.h. */
7713_ACEOF
7714cat confdefs.h >>conftest.$ac_ext
7715cat >>conftest.$ac_ext <<_ACEOF
7716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007717$ac_includes_default
7718long longval () { return (long) (sizeof (short)); }
7719unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007720#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007721#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007722int
7723main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007724{
Martin v. Löwis11437992002-04-12 09:54:03 +00007725
7726 FILE *f = fopen ("conftest.val", "w");
7727 if (! f)
7728 exit (1);
7729 if (((long) (sizeof (short))) < 0)
7730 {
7731 long i = longval ();
7732 if (i != ((long) (sizeof (short))))
7733 exit (1);
7734 fprintf (f, "%ld\n", i);
7735 }
7736 else
7737 {
7738 unsigned long i = ulongval ();
7739 if (i != ((long) (sizeof (short))))
7740 exit (1);
7741 fprintf (f, "%lu\n", i);
7742 }
7743 exit (ferror (f) || fclose (f) != 0);
7744
7745 ;
7746 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007747}
Martin v. Löwis11437992002-04-12 09:54:03 +00007748_ACEOF
7749rm -f conftest$ac_exeext
7750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7751 (eval $ac_link) 2>&5
7752 ac_status=$?
7753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7754 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7756 (eval $ac_try) 2>&5
7757 ac_status=$?
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); }; }; then
7760 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007761else
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 echo "$as_me: program exited with status $ac_status" >&5
7763echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007764sed 's/^/| /' conftest.$ac_ext >&5
7765
Martin v. Löwis11437992002-04-12 09:54:03 +00007766( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007767{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7768See \`config.log' for more details." >&5
7769echo "$as_me: error: cannot compute sizeof (short), 77
7770See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007771 { (exit 1); exit 1; }; }
7772fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007773rm -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 +00007774fi
7775fi
7776rm -f conftest.val
7777else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007778 ac_cv_sizeof_short=0
7779fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007780fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007781echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7782echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7783cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007784#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007785_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007786
7787
Martin v. Löwis11437992002-04-12 09:54:03 +00007788echo "$as_me:$LINENO: checking for float" >&5
7789echo $ECHO_N "checking for float... $ECHO_C" >&6
7790if test "${ac_cv_type_float+set}" = set; then
7791 echo $ECHO_N "(cached) $ECHO_C" >&6
7792else
7793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007794/* confdefs.h. */
7795_ACEOF
7796cat confdefs.h >>conftest.$ac_ext
7797cat >>conftest.$ac_ext <<_ACEOF
7798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007799$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007800int
7801main ()
7802{
7803if ((float *) 0)
7804 return 0;
7805if (sizeof (float))
7806 return 0;
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811rm -f conftest.$ac_objext
7812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007813 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007815 grep -v '^ *+' conftest.er1 >conftest.err
7816 rm -f conftest.er1
7817 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7819 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007820 { ac_try='test -z "$ac_c_werror_flag"
7821 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7823 (eval $ac_try) 2>&5
7824 ac_status=$?
7825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7826 (exit $ac_status); }; } &&
7827 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7829 (eval $ac_try) 2>&5
7830 ac_status=$?
7831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7832 (exit $ac_status); }; }; then
7833 ac_cv_type_float=yes
7834else
7835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007836sed 's/^/| /' conftest.$ac_ext >&5
7837
Martin v. Löwis11437992002-04-12 09:54:03 +00007838ac_cv_type_float=no
7839fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007840rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
7842echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7843echo "${ECHO_T}$ac_cv_type_float" >&6
7844
7845echo "$as_me:$LINENO: checking size of float" >&5
7846echo $ECHO_N "checking size of float... $ECHO_C" >&6
7847if test "${ac_cv_sizeof_float+set}" = set; then
7848 echo $ECHO_N "(cached) $ECHO_C" >&6
7849else
7850 if test "$ac_cv_type_float" = yes; then
7851 # The cast to unsigned long works around a bug in the HP C Compiler
7852 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7853 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7854 # This bug is HP SR number 8606223364.
7855 if test "$cross_compiling" = yes; then
7856 # Depending upon the size, compute the lo and hi bounds.
7857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007858/* confdefs.h. */
7859_ACEOF
7860cat confdefs.h >>conftest.$ac_ext
7861cat >>conftest.$ac_ext <<_ACEOF
7862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007863$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007864int
7865main ()
7866{
7867static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7868test_array [0] = 0
7869
7870 ;
7871 return 0;
7872}
7873_ACEOF
7874rm -f conftest.$ac_objext
7875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007876 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007878 grep -v '^ *+' conftest.er1 >conftest.err
7879 rm -f conftest.er1
7880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007883 { ac_try='test -z "$ac_c_werror_flag"
7884 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7886 (eval $ac_try) 2>&5
7887 ac_status=$?
7888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7889 (exit $ac_status); }; } &&
7890 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7892 (eval $ac_try) 2>&5
7893 ac_status=$?
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); }; }; then
7896 ac_lo=0 ac_mid=0
7897 while :; do
7898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007899/* confdefs.h. */
7900_ACEOF
7901cat confdefs.h >>conftest.$ac_ext
7902cat >>conftest.$ac_ext <<_ACEOF
7903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007904$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007905int
7906main ()
7907{
7908static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7909test_array [0] = 0
7910
7911 ;
7912 return 0;
7913}
7914_ACEOF
7915rm -f conftest.$ac_objext
7916if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007917 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007919 grep -v '^ *+' conftest.er1 >conftest.err
7920 rm -f conftest.er1
7921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7923 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007924 { ac_try='test -z "$ac_c_werror_flag"
7925 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7927 (eval $ac_try) 2>&5
7928 ac_status=$?
7929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 (exit $ac_status); }; } &&
7931 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7933 (eval $ac_try) 2>&5
7934 ac_status=$?
7935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936 (exit $ac_status); }; }; then
7937 ac_hi=$ac_mid; break
7938else
7939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007940sed 's/^/| /' conftest.$ac_ext >&5
7941
Martin v. Löwis11437992002-04-12 09:54:03 +00007942ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007943 if test $ac_lo -le $ac_mid; then
7944 ac_lo= ac_hi=
7945 break
7946 fi
7947 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007948fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007949rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 done
7951else
7952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007953sed 's/^/| /' conftest.$ac_ext >&5
7954
Martin v. Löwis11437992002-04-12 09:54:03 +00007955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007956/* confdefs.h. */
7957_ACEOF
7958cat confdefs.h >>conftest.$ac_ext
7959cat >>conftest.$ac_ext <<_ACEOF
7960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007961$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007962int
7963main ()
7964{
7965static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7966test_array [0] = 0
7967
7968 ;
7969 return 0;
7970}
7971_ACEOF
7972rm -f conftest.$ac_objext
7973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007974 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007976 grep -v '^ *+' conftest.er1 >conftest.err
7977 rm -f conftest.er1
7978 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007981 { ac_try='test -z "$ac_c_werror_flag"
7982 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7984 (eval $ac_try) 2>&5
7985 ac_status=$?
7986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7987 (exit $ac_status); }; } &&
7988 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7990 (eval $ac_try) 2>&5
7991 ac_status=$?
7992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7993 (exit $ac_status); }; }; then
7994 ac_hi=-1 ac_mid=-1
7995 while :; do
7996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007997/* confdefs.h. */
7998_ACEOF
7999cat confdefs.h >>conftest.$ac_ext
8000cat >>conftest.$ac_ext <<_ACEOF
8001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008002$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008003int
8004main ()
8005{
8006static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
8007test_array [0] = 0
8008
8009 ;
8010 return 0;
8011}
8012_ACEOF
8013rm -f conftest.$ac_objext
8014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008015 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008017 grep -v '^ *+' conftest.er1 >conftest.err
8018 rm -f conftest.er1
8019 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8021 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008022 { ac_try='test -z "$ac_c_werror_flag"
8023 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025 (eval $ac_try) 2>&5
8026 ac_status=$?
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); }; } &&
8029 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8031 (eval $ac_try) 2>&5
8032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); }; }; then
8035 ac_lo=$ac_mid; break
8036else
8037 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008038sed 's/^/| /' conftest.$ac_ext >&5
8039
Martin v. Löwis11437992002-04-12 09:54:03 +00008040ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008041 if test $ac_mid -le $ac_hi; then
8042 ac_lo= ac_hi=
8043 break
8044 fi
8045 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008046fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008047rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 done
8049else
8050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008051sed 's/^/| /' conftest.$ac_ext >&5
8052
Martin v. Löwis11437992002-04-12 09:54:03 +00008053ac_lo= ac_hi=
8054fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008055rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008056fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008057rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008058# Binary search between lo and hi bounds.
8059while test "x$ac_lo" != "x$ac_hi"; do
8060 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008062/* confdefs.h. */
8063_ACEOF
8064cat confdefs.h >>conftest.$ac_ext
8065cat >>conftest.$ac_ext <<_ACEOF
8066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008067$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008068int
8069main ()
8070{
8071static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8072test_array [0] = 0
8073
8074 ;
8075 return 0;
8076}
8077_ACEOF
8078rm -f conftest.$ac_objext
8079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008080 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008082 grep -v '^ *+' conftest.er1 >conftest.err
8083 rm -f conftest.er1
8084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008087 { ac_try='test -z "$ac_c_werror_flag"
8088 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8090 (eval $ac_try) 2>&5
8091 ac_status=$?
8092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8093 (exit $ac_status); }; } &&
8094 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8096 (eval $ac_try) 2>&5
8097 ac_status=$?
8098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8099 (exit $ac_status); }; }; then
8100 ac_hi=$ac_mid
8101else
8102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008103sed 's/^/| /' conftest.$ac_ext >&5
8104
Martin v. Löwis11437992002-04-12 09:54:03 +00008105ac_lo=`expr '(' $ac_mid ')' + 1`
8106fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008107rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008108done
8109case $ac_lo in
8110?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008111'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8112See \`config.log' for more details." >&5
8113echo "$as_me: error: cannot compute sizeof (float), 77
8114See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 { (exit 1); exit 1; }; } ;;
8116esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008117else
8118 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008119 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8120See \`config.log' for more details." >&5
8121echo "$as_me: error: cannot run test program while cross compiling
8122See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008124else
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008126/* confdefs.h. */
8127_ACEOF
8128cat confdefs.h >>conftest.$ac_ext
8129cat >>conftest.$ac_ext <<_ACEOF
8130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008131$ac_includes_default
8132long longval () { return (long) (sizeof (float)); }
8133unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008134#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008135#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008136int
8137main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008138{
Martin v. Löwis11437992002-04-12 09:54:03 +00008139
8140 FILE *f = fopen ("conftest.val", "w");
8141 if (! f)
8142 exit (1);
8143 if (((long) (sizeof (float))) < 0)
8144 {
8145 long i = longval ();
8146 if (i != ((long) (sizeof (float))))
8147 exit (1);
8148 fprintf (f, "%ld\n", i);
8149 }
8150 else
8151 {
8152 unsigned long i = ulongval ();
8153 if (i != ((long) (sizeof (float))))
8154 exit (1);
8155 fprintf (f, "%lu\n", i);
8156 }
8157 exit (ferror (f) || fclose (f) != 0);
8158
8159 ;
8160 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008161}
Martin v. Löwis11437992002-04-12 09:54:03 +00008162_ACEOF
8163rm -f conftest$ac_exeext
8164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8165 (eval $ac_link) 2>&5
8166 ac_status=$?
8167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8168 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8170 (eval $ac_try) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); }; }; then
8174 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008175else
Martin v. Löwis11437992002-04-12 09:54:03 +00008176 echo "$as_me: program exited with status $ac_status" >&5
8177echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008178sed 's/^/| /' conftest.$ac_ext >&5
8179
Martin v. Löwis11437992002-04-12 09:54:03 +00008180( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008181{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8182See \`config.log' for more details." >&5
8183echo "$as_me: error: cannot compute sizeof (float), 77
8184See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008185 { (exit 1); exit 1; }; }
8186fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008187rm -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 +00008188fi
8189fi
8190rm -f conftest.val
8191else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008192 ac_cv_sizeof_float=0
8193fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008195echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8196echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8197cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008198#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008199_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008200
8201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202echo "$as_me:$LINENO: checking for double" >&5
8203echo $ECHO_N "checking for double... $ECHO_C" >&6
8204if test "${ac_cv_type_double+set}" = set; then
8205 echo $ECHO_N "(cached) $ECHO_C" >&6
8206else
8207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008208/* confdefs.h. */
8209_ACEOF
8210cat confdefs.h >>conftest.$ac_ext
8211cat >>conftest.$ac_ext <<_ACEOF
8212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008213$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008214int
8215main ()
8216{
8217if ((double *) 0)
8218 return 0;
8219if (sizeof (double))
8220 return 0;
8221 ;
8222 return 0;
8223}
8224_ACEOF
8225rm -f conftest.$ac_objext
8226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008227 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008229 grep -v '^ *+' conftest.er1 >conftest.err
8230 rm -f conftest.er1
8231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8233 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008234 { ac_try='test -z "$ac_c_werror_flag"
8235 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8237 (eval $ac_try) 2>&5
8238 ac_status=$?
8239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8240 (exit $ac_status); }; } &&
8241 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8243 (eval $ac_try) 2>&5
8244 ac_status=$?
8245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8246 (exit $ac_status); }; }; then
8247 ac_cv_type_double=yes
8248else
8249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008250sed 's/^/| /' conftest.$ac_ext >&5
8251
Martin v. Löwis11437992002-04-12 09:54:03 +00008252ac_cv_type_double=no
8253fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008254rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008255fi
8256echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8257echo "${ECHO_T}$ac_cv_type_double" >&6
8258
8259echo "$as_me:$LINENO: checking size of double" >&5
8260echo $ECHO_N "checking size of double... $ECHO_C" >&6
8261if test "${ac_cv_sizeof_double+set}" = set; then
8262 echo $ECHO_N "(cached) $ECHO_C" >&6
8263else
8264 if test "$ac_cv_type_double" = yes; then
8265 # The cast to unsigned long works around a bug in the HP C Compiler
8266 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8267 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8268 # This bug is HP SR number 8606223364.
8269 if test "$cross_compiling" = yes; then
8270 # Depending upon the size, compute the lo and hi bounds.
8271cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008272/* confdefs.h. */
8273_ACEOF
8274cat confdefs.h >>conftest.$ac_ext
8275cat >>conftest.$ac_ext <<_ACEOF
8276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008277$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008278int
8279main ()
8280{
8281static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8282test_array [0] = 0
8283
8284 ;
8285 return 0;
8286}
8287_ACEOF
8288rm -f conftest.$ac_objext
8289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008290 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008292 grep -v '^ *+' conftest.er1 >conftest.err
8293 rm -f conftest.er1
8294 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8296 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008297 { ac_try='test -z "$ac_c_werror_flag"
8298 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8300 (eval $ac_try) 2>&5
8301 ac_status=$?
8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303 (exit $ac_status); }; } &&
8304 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8306 (eval $ac_try) 2>&5
8307 ac_status=$?
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 (exit $ac_status); }; }; then
8310 ac_lo=0 ac_mid=0
8311 while :; do
8312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008313/* confdefs.h. */
8314_ACEOF
8315cat confdefs.h >>conftest.$ac_ext
8316cat >>conftest.$ac_ext <<_ACEOF
8317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008318$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008319int
8320main ()
8321{
8322static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8323test_array [0] = 0
8324
8325 ;
8326 return 0;
8327}
8328_ACEOF
8329rm -f conftest.$ac_objext
8330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008331 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008333 grep -v '^ *+' conftest.er1 >conftest.err
8334 rm -f conftest.er1
8335 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008338 { ac_try='test -z "$ac_c_werror_flag"
8339 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8341 (eval $ac_try) 2>&5
8342 ac_status=$?
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); }; } &&
8345 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8347 (eval $ac_try) 2>&5
8348 ac_status=$?
8349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350 (exit $ac_status); }; }; then
8351 ac_hi=$ac_mid; break
8352else
8353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008354sed 's/^/| /' conftest.$ac_ext >&5
8355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008357 if test $ac_lo -le $ac_mid; then
8358 ac_lo= ac_hi=
8359 break
8360 fi
8361 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008362fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008363rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 done
8365else
8366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008367sed 's/^/| /' conftest.$ac_ext >&5
8368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008370/* confdefs.h. */
8371_ACEOF
8372cat confdefs.h >>conftest.$ac_ext
8373cat >>conftest.$ac_ext <<_ACEOF
8374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008375$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008376int
8377main ()
8378{
8379static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8380test_array [0] = 0
8381
8382 ;
8383 return 0;
8384}
8385_ACEOF
8386rm -f conftest.$ac_objext
8387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008388 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008390 grep -v '^ *+' conftest.er1 >conftest.err
8391 rm -f conftest.er1
8392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8394 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008395 { ac_try='test -z "$ac_c_werror_flag"
8396 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8398 (eval $ac_try) 2>&5
8399 ac_status=$?
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); }; } &&
8402 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8404 (eval $ac_try) 2>&5
8405 ac_status=$?
8406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8407 (exit $ac_status); }; }; then
8408 ac_hi=-1 ac_mid=-1
8409 while :; do
8410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008411/* confdefs.h. */
8412_ACEOF
8413cat confdefs.h >>conftest.$ac_ext
8414cat >>conftest.$ac_ext <<_ACEOF
8415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008416$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008417int
8418main ()
8419{
8420static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8421test_array [0] = 0
8422
8423 ;
8424 return 0;
8425}
8426_ACEOF
8427rm -f conftest.$ac_objext
8428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008429 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008431 grep -v '^ *+' conftest.er1 >conftest.err
8432 rm -f conftest.er1
8433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8435 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008436 { ac_try='test -z "$ac_c_werror_flag"
8437 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8439 (eval $ac_try) 2>&5
8440 ac_status=$?
8441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442 (exit $ac_status); }; } &&
8443 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8445 (eval $ac_try) 2>&5
8446 ac_status=$?
8447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8448 (exit $ac_status); }; }; then
8449 ac_lo=$ac_mid; break
8450else
8451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008452sed 's/^/| /' conftest.$ac_ext >&5
8453
Martin v. Löwis11437992002-04-12 09:54:03 +00008454ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008455 if test $ac_mid -le $ac_hi; then
8456 ac_lo= ac_hi=
8457 break
8458 fi
8459 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008460fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008461rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008462 done
8463else
8464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008465sed 's/^/| /' conftest.$ac_ext >&5
8466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467ac_lo= ac_hi=
8468fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008469rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008470fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008471rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008472# Binary search between lo and hi bounds.
8473while test "x$ac_lo" != "x$ac_hi"; do
8474 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008476/* confdefs.h. */
8477_ACEOF
8478cat confdefs.h >>conftest.$ac_ext
8479cat >>conftest.$ac_ext <<_ACEOF
8480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008481$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008482int
8483main ()
8484{
8485static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8486test_array [0] = 0
8487
8488 ;
8489 return 0;
8490}
8491_ACEOF
8492rm -f conftest.$ac_objext
8493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008494 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008496 grep -v '^ *+' conftest.er1 >conftest.err
8497 rm -f conftest.er1
8498 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8500 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008501 { ac_try='test -z "$ac_c_werror_flag"
8502 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8504 (eval $ac_try) 2>&5
8505 ac_status=$?
8506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8507 (exit $ac_status); }; } &&
8508 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8510 (eval $ac_try) 2>&5
8511 ac_status=$?
8512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8513 (exit $ac_status); }; }; then
8514 ac_hi=$ac_mid
8515else
8516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008517sed 's/^/| /' conftest.$ac_ext >&5
8518
Martin v. Löwis11437992002-04-12 09:54:03 +00008519ac_lo=`expr '(' $ac_mid ')' + 1`
8520fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008521rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008522done
8523case $ac_lo in
8524?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008525'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8526See \`config.log' for more details." >&5
8527echo "$as_me: error: cannot compute sizeof (double), 77
8528See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 { (exit 1); exit 1; }; } ;;
8530esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008531else
8532 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008533 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8534See \`config.log' for more details." >&5
8535echo "$as_me: error: cannot run test program while cross compiling
8536See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008538else
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008540/* confdefs.h. */
8541_ACEOF
8542cat confdefs.h >>conftest.$ac_ext
8543cat >>conftest.$ac_ext <<_ACEOF
8544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008545$ac_includes_default
8546long longval () { return (long) (sizeof (double)); }
8547unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008548#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008549#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008550int
8551main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008552{
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
8554 FILE *f = fopen ("conftest.val", "w");
8555 if (! f)
8556 exit (1);
8557 if (((long) (sizeof (double))) < 0)
8558 {
8559 long i = longval ();
8560 if (i != ((long) (sizeof (double))))
8561 exit (1);
8562 fprintf (f, "%ld\n", i);
8563 }
8564 else
8565 {
8566 unsigned long i = ulongval ();
8567 if (i != ((long) (sizeof (double))))
8568 exit (1);
8569 fprintf (f, "%lu\n", i);
8570 }
8571 exit (ferror (f) || fclose (f) != 0);
8572
8573 ;
8574 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575}
Martin v. Löwis11437992002-04-12 09:54:03 +00008576_ACEOF
8577rm -f conftest$ac_exeext
8578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8579 (eval $ac_link) 2>&5
8580 ac_status=$?
8581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8584 (eval $ac_try) 2>&5
8585 ac_status=$?
8586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8587 (exit $ac_status); }; }; then
8588 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008589else
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 echo "$as_me: program exited with status $ac_status" >&5
8591echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008592sed 's/^/| /' conftest.$ac_ext >&5
8593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008595{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8596See \`config.log' for more details." >&5
8597echo "$as_me: error: cannot compute sizeof (double), 77
8598See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 { (exit 1); exit 1; }; }
8600fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008601rm -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 +00008602fi
8603fi
8604rm -f conftest.val
8605else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008606 ac_cv_sizeof_double=0
8607fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008608fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008609echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8610echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8611cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008612#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008613_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008614
8615
Martin v. Löwis11437992002-04-12 09:54:03 +00008616echo "$as_me:$LINENO: checking for fpos_t" >&5
8617echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8618if test "${ac_cv_type_fpos_t+set}" = set; then
8619 echo $ECHO_N "(cached) $ECHO_C" >&6
8620else
8621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008622/* confdefs.h. */
8623_ACEOF
8624cat confdefs.h >>conftest.$ac_ext
8625cat >>conftest.$ac_ext <<_ACEOF
8626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008627$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008628int
8629main ()
8630{
8631if ((fpos_t *) 0)
8632 return 0;
8633if (sizeof (fpos_t))
8634 return 0;
8635 ;
8636 return 0;
8637}
8638_ACEOF
8639rm -f conftest.$ac_objext
8640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008641 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008643 grep -v '^ *+' conftest.er1 >conftest.err
8644 rm -f conftest.er1
8645 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8647 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008648 { ac_try='test -z "$ac_c_werror_flag"
8649 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8651 (eval $ac_try) 2>&5
8652 ac_status=$?
8653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8654 (exit $ac_status); }; } &&
8655 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8657 (eval $ac_try) 2>&5
8658 ac_status=$?
8659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8660 (exit $ac_status); }; }; then
8661 ac_cv_type_fpos_t=yes
8662else
8663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008664sed 's/^/| /' conftest.$ac_ext >&5
8665
Martin v. Löwis11437992002-04-12 09:54:03 +00008666ac_cv_type_fpos_t=no
8667fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008669fi
8670echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8671echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8672
8673echo "$as_me:$LINENO: checking size of fpos_t" >&5
8674echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8675if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8676 echo $ECHO_N "(cached) $ECHO_C" >&6
8677else
8678 if test "$ac_cv_type_fpos_t" = yes; then
8679 # The cast to unsigned long works around a bug in the HP C Compiler
8680 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8681 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8682 # This bug is HP SR number 8606223364.
8683 if test "$cross_compiling" = yes; then
8684 # Depending upon the size, compute the lo and hi bounds.
8685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008686/* confdefs.h. */
8687_ACEOF
8688cat confdefs.h >>conftest.$ac_ext
8689cat >>conftest.$ac_ext <<_ACEOF
8690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008691$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008692int
8693main ()
8694{
8695static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8696test_array [0] = 0
8697
8698 ;
8699 return 0;
8700}
8701_ACEOF
8702rm -f conftest.$ac_objext
8703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008704 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008706 grep -v '^ *+' conftest.er1 >conftest.err
8707 rm -f conftest.er1
8708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8710 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008711 { ac_try='test -z "$ac_c_werror_flag"
8712 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8714 (eval $ac_try) 2>&5
8715 ac_status=$?
8716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8717 (exit $ac_status); }; } &&
8718 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8720 (eval $ac_try) 2>&5
8721 ac_status=$?
8722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723 (exit $ac_status); }; }; then
8724 ac_lo=0 ac_mid=0
8725 while :; do
8726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008727/* confdefs.h. */
8728_ACEOF
8729cat confdefs.h >>conftest.$ac_ext
8730cat >>conftest.$ac_ext <<_ACEOF
8731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008732$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008733int
8734main ()
8735{
8736static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8737test_array [0] = 0
8738
8739 ;
8740 return 0;
8741}
8742_ACEOF
8743rm -f conftest.$ac_objext
8744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008745 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008747 grep -v '^ *+' conftest.er1 >conftest.err
8748 rm -f conftest.er1
8749 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008752 { ac_try='test -z "$ac_c_werror_flag"
8753 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8755 (eval $ac_try) 2>&5
8756 ac_status=$?
8757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8758 (exit $ac_status); }; } &&
8759 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8761 (eval $ac_try) 2>&5
8762 ac_status=$?
8763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8764 (exit $ac_status); }; }; then
8765 ac_hi=$ac_mid; break
8766else
8767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008768sed 's/^/| /' conftest.$ac_ext >&5
8769
Martin v. Löwis11437992002-04-12 09:54:03 +00008770ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008771 if test $ac_lo -le $ac_mid; then
8772 ac_lo= ac_hi=
8773 break
8774 fi
8775 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008776fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 done
8779else
8780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008781sed 's/^/| /' conftest.$ac_ext >&5
8782
Martin v. Löwis11437992002-04-12 09:54:03 +00008783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008784/* confdefs.h. */
8785_ACEOF
8786cat confdefs.h >>conftest.$ac_ext
8787cat >>conftest.$ac_ext <<_ACEOF
8788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008789$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008790int
8791main ()
8792{
8793static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8794test_array [0] = 0
8795
8796 ;
8797 return 0;
8798}
8799_ACEOF
8800rm -f conftest.$ac_objext
8801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008802 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008804 grep -v '^ *+' conftest.er1 >conftest.err
8805 rm -f conftest.er1
8806 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8808 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008809 { ac_try='test -z "$ac_c_werror_flag"
8810 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8812 (eval $ac_try) 2>&5
8813 ac_status=$?
8814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8815 (exit $ac_status); }; } &&
8816 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8818 (eval $ac_try) 2>&5
8819 ac_status=$?
8820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8821 (exit $ac_status); }; }; then
8822 ac_hi=-1 ac_mid=-1
8823 while :; do
8824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* confdefs.h. */
8826_ACEOF
8827cat confdefs.h >>conftest.$ac_ext
8828cat >>conftest.$ac_ext <<_ACEOF
8829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008831int
8832main ()
8833{
8834static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8835test_array [0] = 0
8836
8837 ;
8838 return 0;
8839}
8840_ACEOF
8841rm -f conftest.$ac_objext
8842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008843 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008845 grep -v '^ *+' conftest.er1 >conftest.err
8846 rm -f conftest.er1
8847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8849 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008850 { ac_try='test -z "$ac_c_werror_flag"
8851 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8853 (eval $ac_try) 2>&5
8854 ac_status=$?
8855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8856 (exit $ac_status); }; } &&
8857 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8859 (eval $ac_try) 2>&5
8860 ac_status=$?
8861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862 (exit $ac_status); }; }; then
8863 ac_lo=$ac_mid; break
8864else
8865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008866sed 's/^/| /' conftest.$ac_ext >&5
8867
Martin v. Löwis11437992002-04-12 09:54:03 +00008868ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008869 if test $ac_mid -le $ac_hi; then
8870 ac_lo= ac_hi=
8871 break
8872 fi
8873 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008874fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008875rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 done
8877else
8878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008879sed 's/^/| /' conftest.$ac_ext >&5
8880
Martin v. Löwis11437992002-04-12 09:54:03 +00008881ac_lo= ac_hi=
8882fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008883rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008884fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008885rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008886# Binary search between lo and hi bounds.
8887while test "x$ac_lo" != "x$ac_hi"; do
8888 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* confdefs.h. */
8891_ACEOF
8892cat confdefs.h >>conftest.$ac_ext
8893cat >>conftest.$ac_ext <<_ACEOF
8894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008895$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008896int
8897main ()
8898{
8899static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8900test_array [0] = 0
8901
8902 ;
8903 return 0;
8904}
8905_ACEOF
8906rm -f conftest.$ac_objext
8907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008908 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008910 grep -v '^ *+' conftest.er1 >conftest.err
8911 rm -f conftest.er1
8912 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8914 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008915 { ac_try='test -z "$ac_c_werror_flag"
8916 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8918 (eval $ac_try) 2>&5
8919 ac_status=$?
8920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8921 (exit $ac_status); }; } &&
8922 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8924 (eval $ac_try) 2>&5
8925 ac_status=$?
8926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8927 (exit $ac_status); }; }; then
8928 ac_hi=$ac_mid
8929else
8930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008931sed 's/^/| /' conftest.$ac_ext >&5
8932
Martin v. Löwis11437992002-04-12 09:54:03 +00008933ac_lo=`expr '(' $ac_mid ')' + 1`
8934fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008935rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008936done
8937case $ac_lo in
8938?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008939'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8940See \`config.log' for more details." >&5
8941echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8942See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 { (exit 1); exit 1; }; } ;;
8944esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008945else
8946 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008947 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8948See \`config.log' for more details." >&5
8949echo "$as_me: error: cannot run test program while cross compiling
8950See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008952else
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008954/* confdefs.h. */
8955_ACEOF
8956cat confdefs.h >>conftest.$ac_ext
8957cat >>conftest.$ac_ext <<_ACEOF
8958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008959$ac_includes_default
8960long longval () { return (long) (sizeof (fpos_t)); }
8961unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008962#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008963#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008964int
8965main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008966{
Martin v. Löwis11437992002-04-12 09:54:03 +00008967
8968 FILE *f = fopen ("conftest.val", "w");
8969 if (! f)
8970 exit (1);
8971 if (((long) (sizeof (fpos_t))) < 0)
8972 {
8973 long i = longval ();
8974 if (i != ((long) (sizeof (fpos_t))))
8975 exit (1);
8976 fprintf (f, "%ld\n", i);
8977 }
8978 else
8979 {
8980 unsigned long i = ulongval ();
8981 if (i != ((long) (sizeof (fpos_t))))
8982 exit (1);
8983 fprintf (f, "%lu\n", i);
8984 }
8985 exit (ferror (f) || fclose (f) != 0);
8986
8987 ;
8988 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008989}
Martin v. Löwis11437992002-04-12 09:54:03 +00008990_ACEOF
8991rm -f conftest$ac_exeext
8992if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8993 (eval $ac_link) 2>&5
8994 ac_status=$?
8995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8996 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8998 (eval $ac_try) 2>&5
8999 ac_status=$?
9000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9001 (exit $ac_status); }; }; then
9002 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009003else
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 echo "$as_me: program exited with status $ac_status" >&5
9005echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009006sed 's/^/| /' conftest.$ac_ext >&5
9007
Martin v. Löwis11437992002-04-12 09:54:03 +00009008( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009009{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9010See \`config.log' for more details." >&5
9011echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9012See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 { (exit 1); exit 1; }; }
9014fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009015rm -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 +00009016fi
9017fi
9018rm -f conftest.val
9019else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009020 ac_cv_sizeof_fpos_t=0
9021fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009022fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009023echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9024echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
9025cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009026#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009027_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009028
Michael W. Hudson54241132001-12-07 15:38:26 +00009029
9030
Martin v. Löwis11437992002-04-12 09:54:03 +00009031echo "$as_me:$LINENO: checking for long long support" >&5
9032echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009033have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009035/* confdefs.h. */
9036_ACEOF
9037cat confdefs.h >>conftest.$ac_ext
9038cat >>conftest.$ac_ext <<_ACEOF
9039/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009040
Martin v. Löwis11437992002-04-12 09:54:03 +00009041int
9042main ()
9043{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009044long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009045 ;
9046 return 0;
9047}
9048_ACEOF
9049rm -f conftest.$ac_objext
9050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009051 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009053 grep -v '^ *+' conftest.er1 >conftest.err
9054 rm -f conftest.er1
9055 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9057 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009058 { ac_try='test -z "$ac_c_werror_flag"
9059 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9061 (eval $ac_try) 2>&5
9062 ac_status=$?
9063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9064 (exit $ac_status); }; } &&
9065 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9067 (eval $ac_try) 2>&5
9068 ac_status=$?
9069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9070 (exit $ac_status); }; }; then
9071
9072
9073cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009074#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009075_ACEOF
9076
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009077 have_long_long=yes
9078
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009079else
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009081sed 's/^/| /' conftest.$ac_ext >&5
9082
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009085echo "$as_me:$LINENO: result: $have_long_long" >&5
9086echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009087if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009088echo "$as_me:$LINENO: checking for long long" >&5
9089echo $ECHO_N "checking for long long... $ECHO_C" >&6
9090if test "${ac_cv_type_long_long+set}" = set; then
9091 echo $ECHO_N "(cached) $ECHO_C" >&6
9092else
9093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009094/* confdefs.h. */
9095_ACEOF
9096cat confdefs.h >>conftest.$ac_ext
9097cat >>conftest.$ac_ext <<_ACEOF
9098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009099$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009100int
9101main ()
9102{
9103if ((long long *) 0)
9104 return 0;
9105if (sizeof (long long))
9106 return 0;
9107 ;
9108 return 0;
9109}
9110_ACEOF
9111rm -f conftest.$ac_objext
9112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009113 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009115 grep -v '^ *+' conftest.er1 >conftest.err
9116 rm -f conftest.er1
9117 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9119 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009120 { ac_try='test -z "$ac_c_werror_flag"
9121 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9123 (eval $ac_try) 2>&5
9124 ac_status=$?
9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126 (exit $ac_status); }; } &&
9127 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9129 (eval $ac_try) 2>&5
9130 ac_status=$?
9131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9132 (exit $ac_status); }; }; then
9133 ac_cv_type_long_long=yes
9134else
9135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009136sed 's/^/| /' conftest.$ac_ext >&5
9137
Martin v. Löwis11437992002-04-12 09:54:03 +00009138ac_cv_type_long_long=no
9139fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009140rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009141fi
9142echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9143echo "${ECHO_T}$ac_cv_type_long_long" >&6
9144
9145echo "$as_me:$LINENO: checking size of long long" >&5
9146echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9147if test "${ac_cv_sizeof_long_long+set}" = set; then
9148 echo $ECHO_N "(cached) $ECHO_C" >&6
9149else
9150 if test "$ac_cv_type_long_long" = yes; then
9151 # The cast to unsigned long works around a bug in the HP C Compiler
9152 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9153 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9154 # This bug is HP SR number 8606223364.
9155 if test "$cross_compiling" = yes; then
9156 # Depending upon the size, compute the lo and hi bounds.
9157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009158/* confdefs.h. */
9159_ACEOF
9160cat confdefs.h >>conftest.$ac_ext
9161cat >>conftest.$ac_ext <<_ACEOF
9162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009163$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009164int
9165main ()
9166{
9167static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9168test_array [0] = 0
9169
9170 ;
9171 return 0;
9172}
9173_ACEOF
9174rm -f conftest.$ac_objext
9175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009176 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009178 grep -v '^ *+' conftest.er1 >conftest.err
9179 rm -f conftest.er1
9180 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9182 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009183 { ac_try='test -z "$ac_c_werror_flag"
9184 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9186 (eval $ac_try) 2>&5
9187 ac_status=$?
9188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9189 (exit $ac_status); }; } &&
9190 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9192 (eval $ac_try) 2>&5
9193 ac_status=$?
9194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9195 (exit $ac_status); }; }; then
9196 ac_lo=0 ac_mid=0
9197 while :; do
9198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* confdefs.h. */
9200_ACEOF
9201cat confdefs.h >>conftest.$ac_ext
9202cat >>conftest.$ac_ext <<_ACEOF
9203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009204$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009205int
9206main ()
9207{
9208static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9209test_array [0] = 0
9210
9211 ;
9212 return 0;
9213}
9214_ACEOF
9215rm -f conftest.$ac_objext
9216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009217 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009219 grep -v '^ *+' conftest.er1 >conftest.err
9220 rm -f conftest.er1
9221 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009224 { ac_try='test -z "$ac_c_werror_flag"
9225 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9227 (eval $ac_try) 2>&5
9228 ac_status=$?
9229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9230 (exit $ac_status); }; } &&
9231 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9233 (eval $ac_try) 2>&5
9234 ac_status=$?
9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 (exit $ac_status); }; }; then
9237 ac_hi=$ac_mid; break
9238else
9239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009240sed 's/^/| /' conftest.$ac_ext >&5
9241
Martin v. Löwis11437992002-04-12 09:54:03 +00009242ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009243 if test $ac_lo -le $ac_mid; then
9244 ac_lo= ac_hi=
9245 break
9246 fi
9247 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009248fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009249rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009250 done
9251else
9252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009253sed 's/^/| /' conftest.$ac_ext >&5
9254
Martin v. Löwis11437992002-04-12 09:54:03 +00009255cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009256/* confdefs.h. */
9257_ACEOF
9258cat confdefs.h >>conftest.$ac_ext
9259cat >>conftest.$ac_ext <<_ACEOF
9260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009261$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009262int
9263main ()
9264{
9265static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9266test_array [0] = 0
9267
9268 ;
9269 return 0;
9270}
9271_ACEOF
9272rm -f conftest.$ac_objext
9273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009274 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009276 grep -v '^ *+' conftest.er1 >conftest.err
9277 rm -f conftest.er1
9278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9280 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009281 { ac_try='test -z "$ac_c_werror_flag"
9282 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9284 (eval $ac_try) 2>&5
9285 ac_status=$?
9286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9287 (exit $ac_status); }; } &&
9288 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9290 (eval $ac_try) 2>&5
9291 ac_status=$?
9292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9293 (exit $ac_status); }; }; then
9294 ac_hi=-1 ac_mid=-1
9295 while :; do
9296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009297/* confdefs.h. */
9298_ACEOF
9299cat confdefs.h >>conftest.$ac_ext
9300cat >>conftest.$ac_ext <<_ACEOF
9301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009302$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009303int
9304main ()
9305{
9306static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9307test_array [0] = 0
9308
9309 ;
9310 return 0;
9311}
9312_ACEOF
9313rm -f conftest.$ac_objext
9314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009315 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009317 grep -v '^ *+' conftest.er1 >conftest.err
9318 rm -f conftest.er1
9319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9321 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009322 { ac_try='test -z "$ac_c_werror_flag"
9323 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9325 (eval $ac_try) 2>&5
9326 ac_status=$?
9327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); }; } &&
9329 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9331 (eval $ac_try) 2>&5
9332 ac_status=$?
9333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9334 (exit $ac_status); }; }; then
9335 ac_lo=$ac_mid; break
9336else
9337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009338sed 's/^/| /' conftest.$ac_ext >&5
9339
Martin v. Löwis11437992002-04-12 09:54:03 +00009340ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009341 if test $ac_mid -le $ac_hi; then
9342 ac_lo= ac_hi=
9343 break
9344 fi
9345 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009346fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009347rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 done
9349else
9350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009351sed 's/^/| /' conftest.$ac_ext >&5
9352
Martin v. Löwis11437992002-04-12 09:54:03 +00009353ac_lo= ac_hi=
9354fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009356fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009357rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009358# Binary search between lo and hi bounds.
9359while test "x$ac_lo" != "x$ac_hi"; do
9360 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009362/* confdefs.h. */
9363_ACEOF
9364cat confdefs.h >>conftest.$ac_ext
9365cat >>conftest.$ac_ext <<_ACEOF
9366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009367$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009368int
9369main ()
9370{
9371static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9372test_array [0] = 0
9373
9374 ;
9375 return 0;
9376}
9377_ACEOF
9378rm -f conftest.$ac_objext
9379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009380 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009382 grep -v '^ *+' conftest.er1 >conftest.err
9383 rm -f conftest.er1
9384 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9386 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009387 { ac_try='test -z "$ac_c_werror_flag"
9388 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9390 (eval $ac_try) 2>&5
9391 ac_status=$?
9392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9393 (exit $ac_status); }; } &&
9394 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9396 (eval $ac_try) 2>&5
9397 ac_status=$?
9398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399 (exit $ac_status); }; }; then
9400 ac_hi=$ac_mid
9401else
9402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009403sed 's/^/| /' conftest.$ac_ext >&5
9404
Martin v. Löwis11437992002-04-12 09:54:03 +00009405ac_lo=`expr '(' $ac_mid ')' + 1`
9406fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009408done
9409case $ac_lo in
9410?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009411'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9412See \`config.log' for more details." >&5
9413echo "$as_me: error: cannot compute sizeof (long long), 77
9414See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 { (exit 1); exit 1; }; } ;;
9416esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009417else
9418 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009419 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9420See \`config.log' for more details." >&5
9421echo "$as_me: error: cannot run test program while cross compiling
9422See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009424else
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009426/* confdefs.h. */
9427_ACEOF
9428cat confdefs.h >>conftest.$ac_ext
9429cat >>conftest.$ac_ext <<_ACEOF
9430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009431$ac_includes_default
9432long longval () { return (long) (sizeof (long long)); }
9433unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009434#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009435#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009436int
9437main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009438{
Martin v. Löwis11437992002-04-12 09:54:03 +00009439
9440 FILE *f = fopen ("conftest.val", "w");
9441 if (! f)
9442 exit (1);
9443 if (((long) (sizeof (long long))) < 0)
9444 {
9445 long i = longval ();
9446 if (i != ((long) (sizeof (long long))))
9447 exit (1);
9448 fprintf (f, "%ld\n", i);
9449 }
9450 else
9451 {
9452 unsigned long i = ulongval ();
9453 if (i != ((long) (sizeof (long long))))
9454 exit (1);
9455 fprintf (f, "%lu\n", i);
9456 }
9457 exit (ferror (f) || fclose (f) != 0);
9458
9459 ;
9460 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009461}
Martin v. Löwis11437992002-04-12 09:54:03 +00009462_ACEOF
9463rm -f conftest$ac_exeext
9464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9465 (eval $ac_link) 2>&5
9466 ac_status=$?
9467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9470 (eval $ac_try) 2>&5
9471 ac_status=$?
9472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473 (exit $ac_status); }; }; then
9474 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009475else
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 echo "$as_me: program exited with status $ac_status" >&5
9477echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009478sed 's/^/| /' conftest.$ac_ext >&5
9479
Martin v. Löwis11437992002-04-12 09:54:03 +00009480( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009481{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9482See \`config.log' for more details." >&5
9483echo "$as_me: error: cannot compute sizeof (long long), 77
9484See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 { (exit 1); exit 1; }; }
9486fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009487rm -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 +00009488fi
9489fi
9490rm -f conftest.val
9491else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009492 ac_cv_sizeof_long_long=0
9493fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009494fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009495echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9496echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9497cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009498#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009499_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009500
Michael W. Hudson54241132001-12-07 15:38:26 +00009501
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009502fi
9503
Martin v. Löwis11437992002-04-12 09:54:03 +00009504echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9505echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009506have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009508/* confdefs.h. */
9509_ACEOF
9510cat confdefs.h >>conftest.$ac_ext
9511cat >>conftest.$ac_ext <<_ACEOF
9512/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009513
Martin v. Löwis11437992002-04-12 09:54:03 +00009514int
9515main ()
9516{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009517uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ;
9519 return 0;
9520}
9521_ACEOF
9522rm -f conftest.$ac_objext
9523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009524 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009526 grep -v '^ *+' conftest.er1 >conftest.err
9527 rm -f conftest.er1
9528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9530 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009531 { ac_try='test -z "$ac_c_werror_flag"
9532 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9534 (eval $ac_try) 2>&5
9535 ac_status=$?
9536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9537 (exit $ac_status); }; } &&
9538 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9540 (eval $ac_try) 2>&5
9541 ac_status=$?
9542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9543 (exit $ac_status); }; }; then
9544
9545
9546cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009547#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009548_ACEOF
9549
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009550 have_uintptr_t=yes
9551
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009552else
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009554sed 's/^/| /' conftest.$ac_ext >&5
9555
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009556fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009557rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009558echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9559echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009560if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009561echo "$as_me:$LINENO: checking for uintptr_t" >&5
9562echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9563if test "${ac_cv_type_uintptr_t+set}" = set; then
9564 echo $ECHO_N "(cached) $ECHO_C" >&6
9565else
9566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009567/* confdefs.h. */
9568_ACEOF
9569cat confdefs.h >>conftest.$ac_ext
9570cat >>conftest.$ac_ext <<_ACEOF
9571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009572$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009573int
9574main ()
9575{
9576if ((uintptr_t *) 0)
9577 return 0;
9578if (sizeof (uintptr_t))
9579 return 0;
9580 ;
9581 return 0;
9582}
9583_ACEOF
9584rm -f conftest.$ac_objext
9585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009586 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009588 grep -v '^ *+' conftest.er1 >conftest.err
9589 rm -f conftest.er1
9590 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9592 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009593 { ac_try='test -z "$ac_c_werror_flag"
9594 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9596 (eval $ac_try) 2>&5
9597 ac_status=$?
9598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9599 (exit $ac_status); }; } &&
9600 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9602 (eval $ac_try) 2>&5
9603 ac_status=$?
9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605 (exit $ac_status); }; }; then
9606 ac_cv_type_uintptr_t=yes
9607else
9608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009609sed 's/^/| /' conftest.$ac_ext >&5
9610
Martin v. Löwis11437992002-04-12 09:54:03 +00009611ac_cv_type_uintptr_t=no
9612fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009613rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009614fi
9615echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9616echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9617
9618echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9619echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9620if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9621 echo $ECHO_N "(cached) $ECHO_C" >&6
9622else
9623 if test "$ac_cv_type_uintptr_t" = yes; then
9624 # The cast to unsigned long works around a bug in the HP C Compiler
9625 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9626 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9627 # This bug is HP SR number 8606223364.
9628 if test "$cross_compiling" = yes; then
9629 # Depending upon the size, compute the lo and hi bounds.
9630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009631/* confdefs.h. */
9632_ACEOF
9633cat confdefs.h >>conftest.$ac_ext
9634cat >>conftest.$ac_ext <<_ACEOF
9635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009636$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009637int
9638main ()
9639{
9640static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9641test_array [0] = 0
9642
9643 ;
9644 return 0;
9645}
9646_ACEOF
9647rm -f conftest.$ac_objext
9648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009649 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009651 grep -v '^ *+' conftest.er1 >conftest.err
9652 rm -f conftest.er1
9653 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009656 { ac_try='test -z "$ac_c_werror_flag"
9657 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9659 (eval $ac_try) 2>&5
9660 ac_status=$?
9661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9662 (exit $ac_status); }; } &&
9663 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9665 (eval $ac_try) 2>&5
9666 ac_status=$?
9667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9668 (exit $ac_status); }; }; then
9669 ac_lo=0 ac_mid=0
9670 while :; do
9671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* confdefs.h. */
9673_ACEOF
9674cat confdefs.h >>conftest.$ac_ext
9675cat >>conftest.$ac_ext <<_ACEOF
9676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009678int
9679main ()
9680{
9681static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9682test_array [0] = 0
9683
9684 ;
9685 return 0;
9686}
9687_ACEOF
9688rm -f conftest.$ac_objext
9689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009690 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009692 grep -v '^ *+' conftest.er1 >conftest.err
9693 rm -f conftest.er1
9694 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9696 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009697 { ac_try='test -z "$ac_c_werror_flag"
9698 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9700 (eval $ac_try) 2>&5
9701 ac_status=$?
9702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9703 (exit $ac_status); }; } &&
9704 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9706 (eval $ac_try) 2>&5
9707 ac_status=$?
9708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9709 (exit $ac_status); }; }; then
9710 ac_hi=$ac_mid; break
9711else
9712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009713sed 's/^/| /' conftest.$ac_ext >&5
9714
Martin v. Löwis11437992002-04-12 09:54:03 +00009715ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009716 if test $ac_lo -le $ac_mid; then
9717 ac_lo= ac_hi=
9718 break
9719 fi
9720 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009721fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009722rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 done
9724else
9725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009726sed 's/^/| /' conftest.$ac_ext >&5
9727
Martin v. Löwis11437992002-04-12 09:54:03 +00009728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009729/* confdefs.h. */
9730_ACEOF
9731cat confdefs.h >>conftest.$ac_ext
9732cat >>conftest.$ac_ext <<_ACEOF
9733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009734$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009735int
9736main ()
9737{
9738static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9739test_array [0] = 0
9740
9741 ;
9742 return 0;
9743}
9744_ACEOF
9745rm -f conftest.$ac_objext
9746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009747 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009749 grep -v '^ *+' conftest.er1 >conftest.err
9750 rm -f conftest.er1
9751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9753 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009754 { ac_try='test -z "$ac_c_werror_flag"
9755 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9757 (eval $ac_try) 2>&5
9758 ac_status=$?
9759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9760 (exit $ac_status); }; } &&
9761 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9763 (eval $ac_try) 2>&5
9764 ac_status=$?
9765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766 (exit $ac_status); }; }; then
9767 ac_hi=-1 ac_mid=-1
9768 while :; do
9769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009770/* confdefs.h. */
9771_ACEOF
9772cat confdefs.h >>conftest.$ac_ext
9773cat >>conftest.$ac_ext <<_ACEOF
9774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009775$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009776int
9777main ()
9778{
9779static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9780test_array [0] = 0
9781
9782 ;
9783 return 0;
9784}
9785_ACEOF
9786rm -f conftest.$ac_objext
9787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009788 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009790 grep -v '^ *+' conftest.er1 >conftest.err
9791 rm -f conftest.er1
9792 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9794 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009795 { ac_try='test -z "$ac_c_werror_flag"
9796 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9798 (eval $ac_try) 2>&5
9799 ac_status=$?
9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); }; } &&
9802 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9804 (eval $ac_try) 2>&5
9805 ac_status=$?
9806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9807 (exit $ac_status); }; }; then
9808 ac_lo=$ac_mid; break
9809else
9810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009811sed 's/^/| /' conftest.$ac_ext >&5
9812
Martin v. Löwis11437992002-04-12 09:54:03 +00009813ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009814 if test $ac_mid -le $ac_hi; then
9815 ac_lo= ac_hi=
9816 break
9817 fi
9818 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009819fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009820rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 done
9822else
9823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009824sed 's/^/| /' conftest.$ac_ext >&5
9825
Martin v. Löwis11437992002-04-12 09:54:03 +00009826ac_lo= ac_hi=
9827fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009828rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009829fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009830rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009831# Binary search between lo and hi bounds.
9832while test "x$ac_lo" != "x$ac_hi"; do
9833 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009835/* confdefs.h. */
9836_ACEOF
9837cat confdefs.h >>conftest.$ac_ext
9838cat >>conftest.$ac_ext <<_ACEOF
9839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009840$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009841int
9842main ()
9843{
9844static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9845test_array [0] = 0
9846
9847 ;
9848 return 0;
9849}
9850_ACEOF
9851rm -f conftest.$ac_objext
9852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009853 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009855 grep -v '^ *+' conftest.er1 >conftest.err
9856 rm -f conftest.er1
9857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9859 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009860 { ac_try='test -z "$ac_c_werror_flag"
9861 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9863 (eval $ac_try) 2>&5
9864 ac_status=$?
9865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9866 (exit $ac_status); }; } &&
9867 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9869 (eval $ac_try) 2>&5
9870 ac_status=$?
9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872 (exit $ac_status); }; }; then
9873 ac_hi=$ac_mid
9874else
9875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009876sed 's/^/| /' conftest.$ac_ext >&5
9877
Martin v. Löwis11437992002-04-12 09:54:03 +00009878ac_lo=`expr '(' $ac_mid ')' + 1`
9879fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009880rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009881done
9882case $ac_lo in
9883?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009884'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9885See \`config.log' for more details." >&5
9886echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9887See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 { (exit 1); exit 1; }; } ;;
9889esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009890else
9891 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009892 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9893See \`config.log' for more details." >&5
9894echo "$as_me: error: cannot run test program while cross compiling
9895See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009897else
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009899/* confdefs.h. */
9900_ACEOF
9901cat confdefs.h >>conftest.$ac_ext
9902cat >>conftest.$ac_ext <<_ACEOF
9903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009904$ac_includes_default
9905long longval () { return (long) (sizeof (uintptr_t)); }
9906unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009907#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009908#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009909int
9910main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009911{
Martin v. Löwis11437992002-04-12 09:54:03 +00009912
9913 FILE *f = fopen ("conftest.val", "w");
9914 if (! f)
9915 exit (1);
9916 if (((long) (sizeof (uintptr_t))) < 0)
9917 {
9918 long i = longval ();
9919 if (i != ((long) (sizeof (uintptr_t))))
9920 exit (1);
9921 fprintf (f, "%ld\n", i);
9922 }
9923 else
9924 {
9925 unsigned long i = ulongval ();
9926 if (i != ((long) (sizeof (uintptr_t))))
9927 exit (1);
9928 fprintf (f, "%lu\n", i);
9929 }
9930 exit (ferror (f) || fclose (f) != 0);
9931
9932 ;
9933 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009934}
Martin v. Löwis11437992002-04-12 09:54:03 +00009935_ACEOF
9936rm -f conftest$ac_exeext
9937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9938 (eval $ac_link) 2>&5
9939 ac_status=$?
9940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9943 (eval $ac_try) 2>&5
9944 ac_status=$?
9945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9946 (exit $ac_status); }; }; then
9947 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009948else
Martin v. Löwis11437992002-04-12 09:54:03 +00009949 echo "$as_me: program exited with status $ac_status" >&5
9950echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009951sed 's/^/| /' conftest.$ac_ext >&5
9952
Martin v. Löwis11437992002-04-12 09:54:03 +00009953( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009954{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9955See \`config.log' for more details." >&5
9956echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9957See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009958 { (exit 1); exit 1; }; }
9959fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009960rm -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 +00009961fi
9962fi
9963rm -f conftest.val
9964else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009965 ac_cv_sizeof_uintptr_t=0
9966fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009967fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009968echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9969echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9970cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009971#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009972_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009973
Michael W. Hudson54241132001-12-07 15:38:26 +00009974
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009975fi
9976
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009977# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009978echo "$as_me:$LINENO: checking size of off_t" >&5
9979echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9980if test "${ac_cv_sizeof_off_t+set}" = set; then
9981 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009982else
9983 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009984 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009985else
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009987/* confdefs.h. */
9988_ACEOF
9989cat confdefs.h >>conftest.$ac_ext
9990cat >>conftest.$ac_ext <<_ACEOF
9991/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009992#include <stdio.h>
9993#include <sys/types.h>
9994main()
9995{
9996 FILE *f=fopen("conftestval", "w");
9997 if (!f) exit(1);
9998 fprintf(f, "%d\n", sizeof(off_t));
9999 exit(0);
10000}
Martin v. Löwis11437992002-04-12 09:54:03 +000010001_ACEOF
10002rm -f conftest$ac_exeext
10003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10004 (eval $ac_link) 2>&5
10005 ac_status=$?
10006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10009 (eval $ac_try) 2>&5
10010 ac_status=$?
10011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010013 ac_cv_sizeof_off_t=`cat conftestval`
10014else
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 echo "$as_me: program exited with status $ac_status" >&5
10016echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010017sed 's/^/| /' conftest.$ac_ext >&5
10018
Martin v. Löwis11437992002-04-12 09:54:03 +000010019( exit $ac_status )
10020ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010021fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010022rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010023fi
10024
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010025fi
10026
Martin v. Löwis11437992002-04-12 09:54:03 +000010027echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
10028echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
10029
10030cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010031#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010032_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010033
Michael W. Hudson54241132001-12-07 15:38:26 +000010034
Martin v. Löwis11437992002-04-12 09:54:03 +000010035echo "$as_me:$LINENO: checking whether to enable large file support" >&5
10036echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010037if test "$have_long_long" = yes -a \
10038 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
10039 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010040
Martin v. Löwis11437992002-04-12 09:54:03 +000010041cat >>confdefs.h <<\_ACEOF
10042#define HAVE_LARGEFILE_SUPPORT 1
10043_ACEOF
10044
10045 echo "$as_me:$LINENO: result: yes" >&5
10046echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 echo "$as_me:$LINENO: result: no" >&5
10049echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010050fi
10051
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010052# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010053echo "$as_me:$LINENO: checking size of time_t" >&5
10054echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
10055if test "${ac_cv_sizeof_time_t+set}" = set; then
10056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010057else
10058 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010059 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010060else
Martin v. Löwis11437992002-04-12 09:54:03 +000010061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010062/* confdefs.h. */
10063_ACEOF
10064cat confdefs.h >>conftest.$ac_ext
10065cat >>conftest.$ac_ext <<_ACEOF
10066/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010067#include <stdio.h>
10068#include <time.h>
10069main()
10070{
10071 FILE *f=fopen("conftestval", "w");
10072 if (!f) exit(1);
10073 fprintf(f, "%d\n", sizeof(time_t));
10074 exit(0);
10075}
Martin v. Löwis11437992002-04-12 09:54:03 +000010076_ACEOF
10077rm -f conftest$ac_exeext
10078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10079 (eval $ac_link) 2>&5
10080 ac_status=$?
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10084 (eval $ac_try) 2>&5
10085 ac_status=$?
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010088 ac_cv_sizeof_time_t=`cat conftestval`
10089else
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 echo "$as_me: program exited with status $ac_status" >&5
10091echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010092sed 's/^/| /' conftest.$ac_ext >&5
10093
Martin v. Löwis11437992002-04-12 09:54:03 +000010094( exit $ac_status )
10095ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010096fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010097rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010098fi
10099
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010100fi
10101
Martin v. Löwis11437992002-04-12 09:54:03 +000010102echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10103echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10104
10105cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010106#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010107_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010108
Michael W. Hudson54241132001-12-07 15:38:26 +000010109
10110
Trent Mick635f6fb2000-08-23 21:33:05 +000010111# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010112ac_save_cc="$CC"
10113if test "$ac_cv_kpthread" = "yes"
10114then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010115elif test "$ac_cv_kthread" = "yes"
10116then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010117elif test "$ac_cv_pthread" = "yes"
10118then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010120echo "$as_me:$LINENO: checking for pthread_t" >&5
10121echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010122have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010124/* confdefs.h. */
10125_ACEOF
10126cat confdefs.h >>conftest.$ac_ext
10127cat >>conftest.$ac_ext <<_ACEOF
10128/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010129#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010130int
10131main ()
10132{
Guido van Rossum12580492000-09-24 16:47:19 +000010133pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 ;
10135 return 0;
10136}
10137_ACEOF
10138rm -f conftest.$ac_objext
10139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010140 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010142 grep -v '^ *+' conftest.er1 >conftest.err
10143 rm -f conftest.er1
10144 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10146 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010147 { ac_try='test -z "$ac_c_werror_flag"
10148 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10150 (eval $ac_try) 2>&5
10151 ac_status=$?
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); }; } &&
10154 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10156 (eval $ac_try) 2>&5
10157 ac_status=$?
10158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10159 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010160 have_pthread_t=yes
10161else
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010163sed 's/^/| /' conftest.$ac_ext >&5
10164
Trent Mick635f6fb2000-08-23 21:33:05 +000010165fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010166rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010167echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10168echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010169if test "$have_pthread_t" = yes ; then
10170 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10172echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10173 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10174 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010175else
10176 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010177 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010178else
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010180/* confdefs.h. */
10181_ACEOF
10182cat confdefs.h >>conftest.$ac_ext
10183cat >>conftest.$ac_ext <<_ACEOF
10184/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010185#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010186#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010187 main()
10188 {
10189 FILE *f=fopen("conftestval", "w");
10190 if (!f) exit(1);
10191 fprintf(f, "%d\n", sizeof(pthread_t));
10192 exit(0);
10193 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010194_ACEOF
10195rm -f conftest$ac_exeext
10196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10197 (eval $ac_link) 2>&5
10198 ac_status=$?
10199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10202 (eval $ac_try) 2>&5
10203 ac_status=$?
10204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10205 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010206 ac_cv_sizeof_pthread_t=`cat conftestval`
10207else
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 echo "$as_me: program exited with status $ac_status" >&5
10209echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010210sed 's/^/| /' conftest.$ac_ext >&5
10211
Martin v. Löwis11437992002-04-12 09:54:03 +000010212( exit $ac_status )
10213ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010214fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010215rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010216fi
10217
Trent Mick635f6fb2000-08-23 21:33:05 +000010218fi
10219
Martin v. Löwis11437992002-04-12 09:54:03 +000010220 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10221echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10222
10223cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010224#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010225_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010226
10227fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010228CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010229
Martin v. Löwis11437992002-04-12 09:54:03 +000010230echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10231echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010232# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10233if test "${enable_toolbox_glue+set}" = set; then
10234 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010235
Martin v. Löwis11437992002-04-12 09:54:03 +000010236fi;
Jack Jansene578a632001-08-15 01:27:14 +000010237
10238if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010239then
Jack Jansene578a632001-08-15 01:27:14 +000010240 case $ac_sys_system/$ac_sys_release in
10241 Darwin/*)
10242 enable_toolbox_glue="yes";;
10243 *)
10244 enable_toolbox_glue="no";;
10245 esac
10246fi
10247case "$enable_toolbox_glue" in
10248yes)
Jack Jansene578a632001-08-15 01:27:14 +000010249 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010250 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010251
10252cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010253#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010254_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010255
10256 ;;
10257*)
Jack Jansene578a632001-08-15 01:27:14 +000010258 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010259 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010260 ;;
10261esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010262echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10263echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010264
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010265
10266case $ac_sys_system/$ac_sys_release in
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010267 Darwin/[01234567].*)
10268 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10269 ;;
10270 Darwin/*)
10271 OTHER_LIBTOOL_OPT=""
10272 ;;
10273esac
10274
10275
10276case $ac_sys_system/$ac_sys_release in
10277 Darwin/[01234567].*)
10278 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only ppc"
Jack Jansenb36687a2004-07-16 08:43:47 +000010279 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010280 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010281 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010282 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10283 if test ${gcc_version} '<' 4.0
10284 then
10285 LIBTOOL_CRUFT="-lcc_dynamic"
10286 else
10287 LIBTOOL_CRUFT=""
10288 fi
10289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
Jack Jansenb36687a2004-07-16 08:43:47 +000010290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010292esac
10293
Martin v. Löwis11437992002-04-12 09:54:03 +000010294echo "$as_me:$LINENO: checking for --enable-framework" >&5
10295echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010296if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010297then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010298 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010300 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010301
Martin v. Löwis11437992002-04-12 09:54:03 +000010302cat >>confdefs.h <<\_ACEOF
10303#define WITH_NEXT_FRAMEWORK 1
10304_ACEOF
10305
10306 echo "$as_me:$LINENO: result: yes" >&5
10307echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010308else
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 echo "$as_me:$LINENO: result: no" >&5
10310echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010311fi
10312
Martin v. Löwis11437992002-04-12 09:54:03 +000010313echo "$as_me:$LINENO: checking for dyld" >&5
10314echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010315case $ac_sys_system/$ac_sys_release in
10316 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010317
Martin v. Löwis11437992002-04-12 09:54:03 +000010318cat >>confdefs.h <<\_ACEOF
10319#define WITH_DYLD 1
10320_ACEOF
10321
10322 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10323echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010324 ;;
10325 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 echo "$as_me:$LINENO: result: no" >&5
10327echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010328 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010329esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010330
Guido van Rossum0a516c91994-09-12 10:58:40 +000010331# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010332
Michael W. Hudson54241132001-12-07 15:38:26 +000010333
10334
10335
10336
Guido van Rossum0a516c91994-09-12 10:58:40 +000010337# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010338# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010339echo "$as_me:$LINENO: checking SO" >&5
10340echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010341if test -z "$SO"
10342then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010343 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010344 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010345 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010346 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010347 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010348else
10349 # this might also be a termcap variable, see #610332
10350 echo
10351 echo '====================================================================='
10352 echo '+ +'
10353 echo '+ WARNING: You have set SO in your environment. +'
10354 echo '+ Do you really mean to change the extension for shared libraries? +'
10355 echo '+ Continuing in 10 seconds to let you to ponder. +'
10356 echo '+ +'
10357 echo '====================================================================='
10358 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010359fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010360echo "$as_me:$LINENO: result: $SO" >&5
10361echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010362# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010363# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010364# (Shared libraries in this instance are shared modules to be loaded into
10365# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010366echo "$as_me:$LINENO: checking LDSHARED" >&5
10367echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010368if test -z "$LDSHARED"
10369then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010370 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010371 AIX*)
10372 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010373 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010374 ;;
10375 BeOS*)
10376 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010377 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010378 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010379 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010380 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000010382 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010383 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010384 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000010385 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010386 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010387 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010388 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010389 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10390 if test "$enable_framework" ; then
10391 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010392 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10393 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010394 else
10395 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010396 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010397 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010398 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010399 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10400 if test "$enable_framework" ; then
10401 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010402 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10403 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010404 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010405 # No framework, use the Python app as bundle-loader
10406 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010407 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010408 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010409 Darwin/*)
10410 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10411 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010412 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010413 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010414 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010415 then
10416 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10417 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010418 else
10419 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10420 if test "$enable_framework" ; then
10421 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010422 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10423 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010424 else
10425 # No framework, use the Python app as bundle-loader
10426 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10427 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10428 fi
10429 fi
10430 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010431 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010432 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010433 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010434 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010435 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010436 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010437 else
10438 LDSHARED="ld -Bshareable ${LDFLAGS}"
10439 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010440 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010441 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010442 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010443 then LDSHARED='$(CC) -shared'
10444 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010445 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010446 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010447 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010448 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010449 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010450 *) LDSHARED="ld";;
10451 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010452fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010453echo "$as_me:$LINENO: result: $LDSHARED" >&5
10454echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010455BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010456# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010457# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010458echo "$as_me:$LINENO: checking CCSHARED" >&5
10459echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010460if test -z "$CCSHARED"
10461then
Guido van Rossum07397971997-04-29 21:49:50 +000010462 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010463 SunOS*) if test "$GCC" = yes;
10464 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000010465 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010466 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010467 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010468 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010469 else CCSHARED="+z";
10470 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010471 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010472 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010473 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010474 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010475 if test "$GCC" = "yes"
10476 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010477 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010478 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010479 SCO_SV*)
10480 if test "$GCC" = "yes"
10481 then CCSHARED="-fPIC"
10482 else CCSHARED="-Kpic -belf"
10483 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010484 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010485 IRIX*/6*) case $CC in
10486 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010487 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010488 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010489 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010490 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010491fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010492echo "$as_me:$LINENO: result: $CCSHARED" >&5
10493echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010494# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010495# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010496echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10497echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010498if test -z "$LINKFORSHARED"
10499then
Guido van Rossum07397971997-04-29 21:49:50 +000010500 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010501 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010502 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010503 LINKFORSHARED="-Wl,-E -Wl,+s";;
10504# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010505 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010506 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010507 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010508 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010509 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
10510 # which is
Jack Jansene578a632001-08-15 01:27:14 +000010511 # not used by the core itself but which needs to be in the core so
10512 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010513 # -prebind is no longer used, because it actually seems to give a
10514 # slowdown in stead of a speedup, maybe due to the large number of
10515 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010516
10517 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000010518 if test "$enable_framework"
10519 then
Jack Jansenda49e192005-01-07 13:08:22 +000010520 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010521 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010522 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010523 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010524 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010525 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010527 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10528 then
10529 LINKFORSHARED="-Wl,--export-dynamic"
10530 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010531 SunOS/5*) case $CC in
10532 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010533 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010534 then
10535 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010536 fi;;
10537 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010538 CYGWIN*)
10539 if test $enable_shared = "no"
10540 then
10541 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10542 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010543 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010545echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10546echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010547
Michael W. Hudson54241132001-12-07 15:38:26 +000010548
Martin v. Löwis11437992002-04-12 09:54:03 +000010549echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10550echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010551if test ! "$LIBRARY" = "$LDLIBRARY"
10552then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010553 case $ac_sys_system in
10554 CYGWIN*)
10555 # Cygwin needs CCSHARED when building extension DLLs
10556 # but not when building the interpreter DLL.
10557 CFLAGSFORSHARED='';;
10558 *)
10559 CFLAGSFORSHARED='$(CCSHARED)'
10560 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010562echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10563echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010564
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010565# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10566# library (with --enable-shared).
10567# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010568# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10569# if it is not required, since it creates a dependency of the shared library
10570# to LIBS. This, in turn, means that applications linking the shared libpython
10571# don't need to link LIBS explicitly. The default should be only changed
10572# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010573
10574echo "$as_me:$LINENO: checking SHLIBS" >&5
10575echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10576case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010577 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010578 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010579esac
10580echo "$as_me:$LINENO: result: $SHLIBS" >&5
10581echo "${ECHO_T}$SHLIBS" >&6
10582
10583
Guido van Rossum627b2d71993-12-24 10:39:16 +000010584# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010585
10586echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10587echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10588if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590else
Martin v. Löwis11437992002-04-12 09:54:03 +000010591 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010592LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* confdefs.h. */
10595_ACEOF
10596cat confdefs.h >>conftest.$ac_ext
10597cat >>conftest.$ac_ext <<_ACEOF
10598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010599
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010600/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010601#ifdef __cplusplus
10602extern "C"
10603#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010604/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 builtin and then its argument prototype would still apply. */
10606char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010607int
10608main ()
10609{
10610dlopen ();
10611 ;
10612 return 0;
10613}
10614_ACEOF
10615rm -f conftest.$ac_objext conftest$ac_exeext
10616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010617 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010619 grep -v '^ *+' conftest.er1 >conftest.err
10620 rm -f conftest.er1
10621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10623 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010624 { ac_try='test -z "$ac_c_werror_flag"
10625 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10627 (eval $ac_try) 2>&5
10628 ac_status=$?
10629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10630 (exit $ac_status); }; } &&
10631 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10633 (eval $ac_try) 2>&5
10634 ac_status=$?
10635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10636 (exit $ac_status); }; }; then
10637 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010638else
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010640sed 's/^/| /' conftest.$ac_ext >&5
10641
Martin v. Löwis11437992002-04-12 09:54:03 +000010642ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010643fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010644rm -f conftest.err conftest.$ac_objext \
10645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010648echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10649echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10650if test $ac_cv_lib_dl_dlopen = yes; then
10651 cat >>confdefs.h <<_ACEOF
10652#define HAVE_LIBDL 1
10653_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010654
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010655 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010656
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010657fi
10658 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010659
10660echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10661echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10662if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010664else
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010666LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010668/* confdefs.h. */
10669_ACEOF
10670cat confdefs.h >>conftest.$ac_ext
10671cat >>conftest.$ac_ext <<_ACEOF
10672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010673
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010674/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010675#ifdef __cplusplus
10676extern "C"
10677#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010678/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 builtin and then its argument prototype would still apply. */
10680char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010681int
10682main ()
10683{
10684shl_load ();
10685 ;
10686 return 0;
10687}
10688_ACEOF
10689rm -f conftest.$ac_objext conftest$ac_exeext
10690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010691 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010693 grep -v '^ *+' conftest.er1 >conftest.err
10694 rm -f conftest.er1
10695 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10697 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010698 { ac_try='test -z "$ac_c_werror_flag"
10699 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10701 (eval $ac_try) 2>&5
10702 ac_status=$?
10703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10704 (exit $ac_status); }; } &&
10705 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10707 (eval $ac_try) 2>&5
10708 ac_status=$?
10709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10710 (exit $ac_status); }; }; then
10711 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010712else
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010714sed 's/^/| /' conftest.$ac_ext >&5
10715
Martin v. Löwis11437992002-04-12 09:54:03 +000010716ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010717fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010718rm -f conftest.err conftest.$ac_objext \
10719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010720LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010722echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10723echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10724if test $ac_cv_lib_dld_shl_load = yes; then
10725 cat >>confdefs.h <<_ACEOF
10726#define HAVE_LIBDLD 1
10727_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010728
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010729 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010730
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010731fi
10732 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010733
10734# only check for sem_ini if thread support is requested
10735if test "$with_threads" = "yes" -o -z "$with_threads"; then
10736 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010737echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10738if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010740else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010741 ac_func_search_save_LIBS=$LIBS
10742ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010744/* confdefs.h. */
10745_ACEOF
10746cat confdefs.h >>conftest.$ac_ext
10747cat >>conftest.$ac_ext <<_ACEOF
10748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010749
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010750/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751#ifdef __cplusplus
10752extern "C"
10753#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010754/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 builtin and then its argument prototype would still apply. */
10756char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010757int
10758main ()
10759{
10760sem_init ();
10761 ;
10762 return 0;
10763}
10764_ACEOF
10765rm -f conftest.$ac_objext conftest$ac_exeext
10766if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010767 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010769 grep -v '^ *+' conftest.er1 >conftest.err
10770 rm -f conftest.er1
10771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10773 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010774 { ac_try='test -z "$ac_c_werror_flag"
10775 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10777 (eval $ac_try) 2>&5
10778 ac_status=$?
10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10780 (exit $ac_status); }; } &&
10781 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10783 (eval $ac_try) 2>&5
10784 ac_status=$?
10785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10786 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010787 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010788else
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010790sed 's/^/| /' conftest.$ac_ext >&5
10791
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010792fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010793rm -f conftest.err conftest.$ac_objext \
10794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010795if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010796 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010797 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* confdefs.h. */
10800_ACEOF
10801cat confdefs.h >>conftest.$ac_ext
10802cat >>conftest.$ac_ext <<_ACEOF
10803/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010804
10805/* Override any gcc2 internal prototype to avoid an error. */
10806#ifdef __cplusplus
10807extern "C"
10808#endif
10809/* We use char because int might match the return type of a gcc2
10810 builtin and then its argument prototype would still apply. */
10811char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010812int
10813main ()
10814{
10815sem_init ();
10816 ;
10817 return 0;
10818}
Martin v. Löwis11437992002-04-12 09:54:03 +000010819_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010820rm -f conftest.$ac_objext conftest$ac_exeext
10821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010822 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010824 grep -v '^ *+' conftest.er1 >conftest.err
10825 rm -f conftest.er1
10826 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10828 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010829 { ac_try='test -z "$ac_c_werror_flag"
10830 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10832 (eval $ac_try) 2>&5
10833 ac_status=$?
10834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10835 (exit $ac_status); }; } &&
10836 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10838 (eval $ac_try) 2>&5
10839 ac_status=$?
10840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10841 (exit $ac_status); }; }; then
10842 ac_cv_search_sem_init="-l$ac_lib"
10843break
10844else
10845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010846sed 's/^/| /' conftest.$ac_ext >&5
10847
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010848fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010849rm -f conftest.err conftest.$ac_objext \
10850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010851 done
10852fi
10853LIBS=$ac_func_search_save_LIBS
10854fi
10855echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10856echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10857if test "$ac_cv_search_sem_init" != no; then
10858 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010859
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010860fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010861 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010862 # posix4 on Solaris 2.6
10863 # pthread (first!) on Linux
10864fi
10865
Martin v. Löwis19d17342003-06-14 21:03:05 +000010866# check if we need libintl for locale functions
10867echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10868echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10869if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10870 echo $ECHO_N "(cached) $ECHO_C" >&6
10871else
10872 ac_check_lib_save_LIBS=$LIBS
10873LIBS="-lintl $LIBS"
10874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010875/* confdefs.h. */
10876_ACEOF
10877cat confdefs.h >>conftest.$ac_ext
10878cat >>conftest.$ac_ext <<_ACEOF
10879/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010880
10881/* Override any gcc2 internal prototype to avoid an error. */
10882#ifdef __cplusplus
10883extern "C"
10884#endif
10885/* We use char because int might match the return type of a gcc2
10886 builtin and then its argument prototype would still apply. */
10887char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010888int
10889main ()
10890{
10891textdomain ();
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896rm -f conftest.$ac_objext conftest$ac_exeext
10897if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010898 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000010899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010900 grep -v '^ *+' conftest.er1 >conftest.err
10901 rm -f conftest.er1
10902 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10904 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010905 { ac_try='test -z "$ac_c_werror_flag"
10906 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10908 (eval $ac_try) 2>&5
10909 ac_status=$?
10910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10911 (exit $ac_status); }; } &&
10912 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000010913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10914 (eval $ac_try) 2>&5
10915 ac_status=$?
10916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10917 (exit $ac_status); }; }; then
10918 ac_cv_lib_intl_textdomain=yes
10919else
10920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010921sed 's/^/| /' conftest.$ac_ext >&5
10922
Martin v. Löwis19d17342003-06-14 21:03:05 +000010923ac_cv_lib_intl_textdomain=no
10924fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010925rm -f conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010927LIBS=$ac_check_lib_save_LIBS
10928fi
10929echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10930echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10931if test $ac_cv_lib_intl_textdomain = yes; then
10932
10933cat >>confdefs.h <<\_ACEOF
10934#define WITH_LIBINTL 1
10935_ACEOF
10936
10937fi
10938
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010939
10940# checks for system dependent C++ extensions support
10941case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010942 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10943echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010945/* confdefs.h. */
10946_ACEOF
10947cat confdefs.h >>conftest.$ac_ext
10948cat >>conftest.$ac_ext <<_ACEOF
10949/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010950#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010951int
10952main ()
10953{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010954loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 ;
10956 return 0;
10957}
10958_ACEOF
10959rm -f conftest.$ac_objext conftest$ac_exeext
10960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010961 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010963 grep -v '^ *+' conftest.er1 >conftest.err
10964 rm -f conftest.er1
10965 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10967 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010968 { ac_try='test -z "$ac_c_werror_flag"
10969 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10971 (eval $ac_try) 2>&5
10972 ac_status=$?
10973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10974 (exit $ac_status); }; } &&
10975 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10977 (eval $ac_try) 2>&5
10978 ac_status=$?
10979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10980 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982cat >>confdefs.h <<\_ACEOF
10983#define AIX_GENUINE_CPLUSPLUS 1
10984_ACEOF
10985
10986 echo "$as_me:$LINENO: result: yes" >&5
10987echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010988else
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010990sed 's/^/| /' conftest.$ac_ext >&5
10991
Martin v. Löwis11437992002-04-12 09:54:03 +000010992echo "$as_me:$LINENO: result: no" >&5
10993echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010994fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010995rm -f conftest.err conftest.$ac_objext \
10996 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010997 *) ;;
10998esac
10999
Guido van Rossum70c7f481998-03-26 18:44:10 +000011000# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011001# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000011002echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
11003echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
11004if test "${ac_cv_lib_nsl_t_open+set}" = set; then
11005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011006else
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011008LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011010/* confdefs.h. */
11011_ACEOF
11012cat confdefs.h >>conftest.$ac_ext
11013cat >>conftest.$ac_ext <<_ACEOF
11014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011015
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011016/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011017#ifdef __cplusplus
11018extern "C"
11019#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011020/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 builtin and then its argument prototype would still apply. */
11022char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011023int
11024main ()
11025{
11026t_open ();
11027 ;
11028 return 0;
11029}
11030_ACEOF
11031rm -f conftest.$ac_objext conftest$ac_exeext
11032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011033 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011035 grep -v '^ *+' conftest.er1 >conftest.err
11036 rm -f conftest.er1
11037 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011040 { ac_try='test -z "$ac_c_werror_flag"
11041 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11043 (eval $ac_try) 2>&5
11044 ac_status=$?
11045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11046 (exit $ac_status); }; } &&
11047 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11049 (eval $ac_try) 2>&5
11050 ac_status=$?
11051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11052 (exit $ac_status); }; }; then
11053 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011054else
Martin v. Löwis11437992002-04-12 09:54:03 +000011055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011056sed 's/^/| /' conftest.$ac_ext >&5
11057
Martin v. Löwis11437992002-04-12 09:54:03 +000011058ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011059fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011060rm -f conftest.err conftest.$ac_objext \
11061 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011062LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011064echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11065echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11066if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011067 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011068fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011069 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011070echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11071echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11072if test "${ac_cv_lib_socket_socket+set}" = set; then
11073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011074else
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011076LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011078/* confdefs.h. */
11079_ACEOF
11080cat confdefs.h >>conftest.$ac_ext
11081cat >>conftest.$ac_ext <<_ACEOF
11082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011083
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011084/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011085#ifdef __cplusplus
11086extern "C"
11087#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011088/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 builtin and then its argument prototype would still apply. */
11090char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011091int
11092main ()
11093{
11094socket ();
11095 ;
11096 return 0;
11097}
11098_ACEOF
11099rm -f conftest.$ac_objext conftest$ac_exeext
11100if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011101 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011103 grep -v '^ *+' conftest.er1 >conftest.err
11104 rm -f conftest.er1
11105 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11107 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011108 { ac_try='test -z "$ac_c_werror_flag"
11109 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11111 (eval $ac_try) 2>&5
11112 ac_status=$?
11113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11114 (exit $ac_status); }; } &&
11115 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11117 (eval $ac_try) 2>&5
11118 ac_status=$?
11119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11120 (exit $ac_status); }; }; then
11121 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011122else
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011124sed 's/^/| /' conftest.$ac_ext >&5
11125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011127fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011128rm -f conftest.err conftest.$ac_objext \
11129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011130LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011131fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011132echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11133echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11134if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011135 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011136fi
11137 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011138
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011139case "$ac_sys_system" in
11140BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011141echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11142echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11143if test "${ac_cv_lib_net_socket+set}" = set; then
11144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011145else
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011147LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011149/* confdefs.h. */
11150_ACEOF
11151cat confdefs.h >>conftest.$ac_ext
11152cat >>conftest.$ac_ext <<_ACEOF
11153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011154
Guido van Rossumad678af1998-10-02 14:42:15 +000011155/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011156#ifdef __cplusplus
11157extern "C"
11158#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011159/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 builtin and then its argument prototype would still apply. */
11161char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011162int
11163main ()
11164{
11165socket ();
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170rm -f conftest.$ac_objext conftest$ac_exeext
11171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011172 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011174 grep -v '^ *+' conftest.er1 >conftest.err
11175 rm -f conftest.er1
11176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11178 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011179 { ac_try='test -z "$ac_c_werror_flag"
11180 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11182 (eval $ac_try) 2>&5
11183 ac_status=$?
11184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185 (exit $ac_status); }; } &&
11186 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11188 (eval $ac_try) 2>&5
11189 ac_status=$?
11190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191 (exit $ac_status); }; }; then
11192 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011193else
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011195sed 's/^/| /' conftest.$ac_ext >&5
11196
Martin v. Löwis11437992002-04-12 09:54:03 +000011197ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011198fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011199rm -f conftest.err conftest.$ac_objext \
11200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011201LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011202fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011203echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11204echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11205if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011206 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011207fi
11208 # BeOS
11209;;
11210esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011211
Martin v. Löwis11437992002-04-12 09:54:03 +000011212echo "$as_me:$LINENO: checking for --with-libs" >&5
11213echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11214
Guido van Rossuma68acba1996-07-31 17:36:39 +000011215# Check whether --with-libs or --without-libs was given.
11216if test "${with_libs+set}" = set; then
11217 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
11219echo "$as_me:$LINENO: result: $withval" >&5
11220echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011221LIBS="$withval $LIBS"
11222
11223else
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 echo "$as_me:$LINENO: result: no" >&5
11225echo "${ECHO_T}no" >&6
11226fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011227
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011228# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011229
11230
Martin v. Löwis11437992002-04-12 09:54:03 +000011231echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11232echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11233
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011234# Check whether --with-signal-module or --without-signal-module was given.
11235if test "${with_signal_module+set}" = set; then
11236 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011237
Martin v. Löwis11437992002-04-12 09:54:03 +000011238fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011239
11240if test -z "$with_signal_module"
11241then with_signal_module="yes"
11242fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011243echo "$as_me:$LINENO: result: $with_signal_module" >&5
11244echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011245
11246if test "${with_signal_module}" = "yes"; then
11247 USE_SIGNAL_MODULE=""
11248 SIGNAL_OBJS=""
11249else
11250 USE_SIGNAL_MODULE="#"
11251 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11252fi
11253
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011254# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011255
Barry Warsawc0d24d82000-06-29 16:12:00 +000011256USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011257
Martin v. Löwis11437992002-04-12 09:54:03 +000011258echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11259echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11260
Guido van Rossumec2f0731997-01-22 20:54:01 +000011261
11262# Check whether --with-dec-threads or --without-dec-threads was given.
11263if test "${with_dec_threads+set}" = set; then
11264 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011265
11266echo "$as_me:$LINENO: result: $withval" >&5
11267echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011268LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011269if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011270 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011271fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011272else
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 echo "$as_me:$LINENO: result: no" >&5
11274echo "${ECHO_T}no" >&6
11275fi;
11276
11277# Templates for things AC_DEFINEd more than once.
11278# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011279
11280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281
11282
11283
11284
11285
11286echo "$as_me:$LINENO: checking for --with-threads" >&5
11287echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11288
Guido van Rossumec2f0731997-01-22 20:54:01 +000011289# Check whether --with-threads or --without-threads was given.
11290if test "${with_threads+set}" = set; then
11291 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011292
Martin v. Löwis11437992002-04-12 09:54:03 +000011293fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011294
Barry Warsawc0d24d82000-06-29 16:12:00 +000011295# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011296
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011298if test "${with_thread+set}" = set; then
11299 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011300 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011301fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000011302
11303if test -z "$with_threads"
11304then with_threads="yes"
11305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011306echo "$as_me:$LINENO: result: $with_threads" >&5
11307echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000011308
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011309
Barry Warsawc0d24d82000-06-29 16:12:00 +000011310if test "$with_threads" = "no"
11311then
11312 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011313elif test "$ac_cv_pthread_is_default" = yes
11314then
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011316#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011317_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011318
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011319 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011321#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011322_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011323
11324 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011326elif test "$ac_cv_kpthread" = "yes"
11327then
11328 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011329 if test "$ac_cv_cxx_thread" = "yes"; then
11330 CXX="$CXX -Kpthread"
11331 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011333#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011334_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011335
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011336 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011337 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011338elif test "$ac_cv_kthread" = "yes"
11339then
11340 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011341 if test "$ac_cv_cxx_thread" = "yes"; then
11342 CXX="$CXX -Kthread"
11343 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011344 cat >>confdefs.h <<\_ACEOF
11345#define WITH_THREAD 1
11346_ACEOF
11347
11348 posix_threads=yes
11349 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011350elif test "$ac_cv_pthread" = "yes"
11351then
11352 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011353 if test "$ac_cv_cxx_thread" = "yes"; then
11354 CXX="$CXX -pthread"
11355 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011356 cat >>confdefs.h <<\_ACEOF
11357#define WITH_THREAD 1
11358_ACEOF
11359
11360 posix_threads=yes
11361 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011362else
11363 if test ! -z "$with_threads" -a -d "$with_threads"
11364 then LDFLAGS="$LDFLAGS -L$with_threads"
11365 fi
11366 if test ! -z "$withval" -a -d "$withval"
11367 then LDFLAGS="$LDFLAGS -L$withval"
11368 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011369
11370 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011371 # define _POSIX_THREADS in unistd.h. Some apparently don't
11372 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11374echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011376/* confdefs.h. */
11377_ACEOF
11378cat confdefs.h >>conftest.$ac_ext
11379cat >>conftest.$ac_ext <<_ACEOF
11380/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011381
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011382#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011383#ifdef _POSIX_THREADS
11384yes
11385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
11387_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011389 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011390 unistd_defines_pthreads=yes
11391else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011392 unistd_defines_pthreads=no
11393fi
11394rm -f conftest*
11395
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11397echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011398
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011400#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011401_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011402
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 if test "${ac_cv_header_cthreads_h+set}" = set; then
11404 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11405echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11406if test "${ac_cv_header_cthreads_h+set}" = set; then
11407 echo $ECHO_N "(cached) $ECHO_C" >&6
11408fi
11409echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11410echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011411else
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 # Is the header compilable?
11413echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11414echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* confdefs.h. */
11417_ACEOF
11418cat confdefs.h >>conftest.$ac_ext
11419cat >>conftest.$ac_ext <<_ACEOF
11420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011421$ac_includes_default
11422#include <cthreads.h>
11423_ACEOF
11424rm -f conftest.$ac_objext
11425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011426 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011428 grep -v '^ *+' conftest.er1 >conftest.err
11429 rm -f conftest.er1
11430 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11432 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011433 { ac_try='test -z "$ac_c_werror_flag"
11434 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11436 (eval $ac_try) 2>&5
11437 ac_status=$?
11438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11439 (exit $ac_status); }; } &&
11440 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11442 (eval $ac_try) 2>&5
11443 ac_status=$?
11444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11445 (exit $ac_status); }; }; then
11446 ac_header_compiler=yes
11447else
11448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011449sed 's/^/| /' conftest.$ac_ext >&5
11450
Martin v. Löwis11437992002-04-12 09:54:03 +000011451ac_header_compiler=no
11452fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011453rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011454echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11455echo "${ECHO_T}$ac_header_compiler" >&6
11456
11457# Is the header present?
11458echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11459echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11460cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011461/* confdefs.h. */
11462_ACEOF
11463cat confdefs.h >>conftest.$ac_ext
11464cat >>conftest.$ac_ext <<_ACEOF
11465/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011466#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011467_ACEOF
11468if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11469 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11470 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011471 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 rm -f conftest.er1
11473 cat conftest.err >&5
11474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475 (exit $ac_status); } >/dev/null; then
11476 if test -s conftest.err; then
11477 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011478 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 else
11480 ac_cpp_err=
11481 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011482else
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 ac_cpp_err=yes
11484fi
11485if test -z "$ac_cpp_err"; then
11486 ac_header_preproc=yes
11487else
11488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011489sed 's/^/| /' conftest.$ac_ext >&5
11490
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011492fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011493rm -f conftest.err conftest.$ac_ext
11494echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11495echo "${ECHO_T}$ac_header_preproc" >&6
11496
11497# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011498case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11499 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11501echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011502 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11503echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11504 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011505 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011506 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011507 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11508echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011509 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11510echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11511 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11512echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11513 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11514echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011515 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11516echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011517 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11518echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011519 (
11520 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011521## ------------------------------------------------ ##
11522## Report this to http://www.python.org/python-bugs ##
11523## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011524_ASBOX
11525 ) |
11526 sed "s/^/$as_me: WARNING: /" >&2
11527 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011528esac
11529echo "$as_me:$LINENO: checking for cthreads.h" >&5
11530echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11531if test "${ac_cv_header_cthreads_h+set}" = set; then
11532 echo $ECHO_N "(cached) $ECHO_C" >&6
11533else
11534 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011536echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11537echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11538
11539fi
11540if test $ac_cv_header_cthreads_h = yes; then
11541 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011542#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011543_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011544
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011546#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011547_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011548
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
11550cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011551#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011552_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011553
11554 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011555 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011556else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011557
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11559 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11560echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11561if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11562 echo $ECHO_N "(cached) $ECHO_C" >&6
11563fi
11564echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11565echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011566else
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 # Is the header compilable?
11568echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11569echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* confdefs.h. */
11572_ACEOF
11573cat confdefs.h >>conftest.$ac_ext
11574cat >>conftest.$ac_ext <<_ACEOF
11575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011576$ac_includes_default
11577#include <mach/cthreads.h>
11578_ACEOF
11579rm -f conftest.$ac_objext
11580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011581 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011583 grep -v '^ *+' conftest.er1 >conftest.err
11584 rm -f conftest.er1
11585 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011588 { ac_try='test -z "$ac_c_werror_flag"
11589 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11591 (eval $ac_try) 2>&5
11592 ac_status=$?
11593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11594 (exit $ac_status); }; } &&
11595 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11597 (eval $ac_try) 2>&5
11598 ac_status=$?
11599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11600 (exit $ac_status); }; }; then
11601 ac_header_compiler=yes
11602else
11603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011604sed 's/^/| /' conftest.$ac_ext >&5
11605
Martin v. Löwis11437992002-04-12 09:54:03 +000011606ac_header_compiler=no
11607fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011609echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11610echo "${ECHO_T}$ac_header_compiler" >&6
11611
11612# Is the header present?
11613echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11614echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011616/* confdefs.h. */
11617_ACEOF
11618cat confdefs.h >>conftest.$ac_ext
11619cat >>conftest.$ac_ext <<_ACEOF
11620/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011621#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011622_ACEOF
11623if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11624 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11625 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011626 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 rm -f conftest.er1
11628 cat conftest.err >&5
11629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11630 (exit $ac_status); } >/dev/null; then
11631 if test -s conftest.err; then
11632 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011633 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 else
11635 ac_cpp_err=
11636 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011637else
Martin v. Löwis11437992002-04-12 09:54:03 +000011638 ac_cpp_err=yes
11639fi
11640if test -z "$ac_cpp_err"; then
11641 ac_header_preproc=yes
11642else
11643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011644sed 's/^/| /' conftest.$ac_ext >&5
11645
Martin v. Löwis11437992002-04-12 09:54:03 +000011646 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011648rm -f conftest.err conftest.$ac_ext
11649echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11650echo "${ECHO_T}$ac_header_preproc" >&6
11651
11652# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011653case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11654 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011655 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11656echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011657 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
11658echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
11659 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011660 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011661 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011662 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11663echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011664 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11665echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11666 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
11667echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
11668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11669echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011670 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
11671echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011672 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
11673echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011674 (
11675 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011676## ------------------------------------------------ ##
11677## Report this to http://www.python.org/python-bugs ##
11678## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011679_ASBOX
11680 ) |
11681 sed "s/^/$as_me: WARNING: /" >&2
11682 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011683esac
11684echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11685echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11686if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11687 echo $ECHO_N "(cached) $ECHO_C" >&6
11688else
11689 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011691echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11692echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11693
11694fi
11695if test $ac_cv_header_mach_cthreads_h = yes; then
11696 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011697#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011698_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011699
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011701#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011702_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011703
Martin v. Löwis11437992002-04-12 09:54:03 +000011704
11705cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011706#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011707_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011708
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011709 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011710else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011711
Martin v. Löwis11437992002-04-12 09:54:03 +000011712 echo "$as_me:$LINENO: checking for --with-pth" >&5
11713echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11714
11715# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011716if test "${with_pth+set}" = set; then
11717 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011718 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011719echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011720 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011721#define WITH_THREAD 1
11722_ACEOF
11723
11724
11725cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011726#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011727_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011728
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011729 LIBS="-lpth $LIBS"
11730 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011731else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011732 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011733echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011734
11735 # Just looking for pthread_create in libpthread is not enough:
11736 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11737 # So we really have to include pthread.h, and then link.
11738 _libs=$LIBS
11739 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011740 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11741echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011743/* confdefs.h. */
11744_ACEOF
11745cat confdefs.h >>conftest.$ac_ext
11746cat >>conftest.$ac_ext <<_ACEOF
11747/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011748#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011749
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011750void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011751int
11752main ()
11753{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011754
11755pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 ;
11757 return 0;
11758}
11759_ACEOF
11760rm -f conftest.$ac_objext conftest$ac_exeext
11761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011762 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011764 grep -v '^ *+' conftest.er1 >conftest.err
11765 rm -f conftest.er1
11766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011769 { ac_try='test -z "$ac_c_werror_flag"
11770 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11772 (eval $ac_try) 2>&5
11773 ac_status=$?
11774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775 (exit $ac_status); }; } &&
11776 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11778 (eval $ac_try) 2>&5
11779 ac_status=$?
11780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781 (exit $ac_status); }; }; then
11782
11783 echo "$as_me:$LINENO: result: yes" >&5
11784echo "${ECHO_T}yes" >&6
11785 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011786#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011787_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011788
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011789 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011790 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011791else
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011793sed 's/^/| /' conftest.$ac_ext >&5
11794
Martin v. Löwis11437992002-04-12 09:54:03 +000011795
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011796 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11798echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11799if test "${ac_cv_func_pthread_detach+set}" = set; then
11800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011801else
Martin v. Löwis11437992002-04-12 09:54:03 +000011802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011803/* confdefs.h. */
11804_ACEOF
11805cat confdefs.h >>conftest.$ac_ext
11806cat >>conftest.$ac_ext <<_ACEOF
11807/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011808/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011809 which can conflict with char pthread_detach (); below.
11810 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011811 <limits.h> exists even on freestanding compilers. Under hpux,
11812 including <limits.h> includes <sys/time.h> and causes problems
11813 checking for functions defined therein. */
11814#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011815# include <limits.h>
11816#else
11817# include <assert.h>
11818#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011819/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011820#ifdef __cplusplus
11821extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011822{
Martin v. Löwis11437992002-04-12 09:54:03 +000011823#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011824/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 builtin and then its argument prototype would still apply. */
11826char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011827/* The GNU C library defines this for functions which it implements
11828 to always fail with ENOSYS. Some functions are actually named
11829 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011830#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011831choke me
11832#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011833char (*f) () = pthread_detach;
11834#endif
11835#ifdef __cplusplus
11836}
Guido van Rossumad678af1998-10-02 14:42:15 +000011837#endif
11838
Skip Montanaro6dead952003-09-25 14:50:04 +000011839int
11840main ()
11841{
11842return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 ;
11844 return 0;
11845}
11846_ACEOF
11847rm -f conftest.$ac_objext conftest$ac_exeext
11848if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011849 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011851 grep -v '^ *+' conftest.er1 >conftest.err
11852 rm -f conftest.er1
11853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11855 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011856 { ac_try='test -z "$ac_c_werror_flag"
11857 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11859 (eval $ac_try) 2>&5
11860 ac_status=$?
11861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11862 (exit $ac_status); }; } &&
11863 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11865 (eval $ac_try) 2>&5
11866 ac_status=$?
11867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11868 (exit $ac_status); }; }; then
11869 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011870else
Martin v. Löwis11437992002-04-12 09:54:03 +000011871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011872sed 's/^/| /' conftest.$ac_ext >&5
11873
Martin v. Löwis11437992002-04-12 09:54:03 +000011874ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011875fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011876rm -f conftest.err conftest.$ac_objext \
11877 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011878fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011879echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11880echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11881if test $ac_cv_func_pthread_detach = yes; then
11882 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011883#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011884_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011885
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011886 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011887 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011888else
Guido van Rossumad678af1998-10-02 14:42:15 +000011889
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011890 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11891 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11892echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11893if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11894 echo $ECHO_N "(cached) $ECHO_C" >&6
11895fi
11896echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11897echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11898else
11899 # Is the header compilable?
11900echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11901echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011903/* confdefs.h. */
11904_ACEOF
11905cat confdefs.h >>conftest.$ac_ext
11906cat >>conftest.$ac_ext <<_ACEOF
11907/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011908$ac_includes_default
11909#include <atheos/threads.h>
11910_ACEOF
11911rm -f conftest.$ac_objext
11912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011913 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011915 grep -v '^ *+' conftest.er1 >conftest.err
11916 rm -f conftest.er1
11917 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11919 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011920 { ac_try='test -z "$ac_c_werror_flag"
11921 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11923 (eval $ac_try) 2>&5
11924 ac_status=$?
11925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926 (exit $ac_status); }; } &&
11927 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11929 (eval $ac_try) 2>&5
11930 ac_status=$?
11931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11932 (exit $ac_status); }; }; then
11933 ac_header_compiler=yes
11934else
11935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011936sed 's/^/| /' conftest.$ac_ext >&5
11937
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011938ac_header_compiler=no
11939fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011940rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011941echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11942echo "${ECHO_T}$ac_header_compiler" >&6
11943
11944# Is the header present?
11945echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11946echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011948/* confdefs.h. */
11949_ACEOF
11950cat confdefs.h >>conftest.$ac_ext
11951cat >>conftest.$ac_ext <<_ACEOF
11952/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011953#include <atheos/threads.h>
11954_ACEOF
11955if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11956 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11957 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011958 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011959 rm -f conftest.er1
11960 cat conftest.err >&5
11961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11962 (exit $ac_status); } >/dev/null; then
11963 if test -s conftest.err; then
11964 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011965 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011966 else
11967 ac_cpp_err=
11968 fi
11969else
11970 ac_cpp_err=yes
11971fi
11972if test -z "$ac_cpp_err"; then
11973 ac_header_preproc=yes
11974else
11975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011976sed 's/^/| /' conftest.$ac_ext >&5
11977
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011978 ac_header_preproc=no
11979fi
11980rm -f conftest.err conftest.$ac_ext
11981echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11982echo "${ECHO_T}$ac_header_preproc" >&6
11983
11984# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011985case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11986 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011987 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11988echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011989 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
11990echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
11991 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011992 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011993 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011994 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11995echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011996 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11997echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11998 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
11999echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
12000 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
12001echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012002 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
12003echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012004 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
12005echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012006 (
12007 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012008## ------------------------------------------------ ##
12009## Report this to http://www.python.org/python-bugs ##
12010## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012011_ASBOX
12012 ) |
12013 sed "s/^/$as_me: WARNING: /" >&2
12014 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012015esac
12016echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12017echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12018if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12019 echo $ECHO_N "(cached) $ECHO_C" >&6
12020else
12021 ac_cv_header_atheos_threads_h=$ac_header_preproc
12022fi
12023echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12024echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12025
12026fi
12027if test $ac_cv_header_atheos_threads_h = yes; then
12028 cat >>confdefs.h <<\_ACEOF
12029#define WITH_THREAD 1
12030_ACEOF
12031
12032
12033cat >>confdefs.h <<\_ACEOF
12034#define ATHEOS_THREADS 1
12035_ACEOF
12036
12037 THREADOBJ="Python/thread.o"
12038else
12039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12041 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12042echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12043if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12044 echo $ECHO_N "(cached) $ECHO_C" >&6
12045fi
12046echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12047echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012048else
Martin v. Löwis11437992002-04-12 09:54:03 +000012049 # Is the header compilable?
12050echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
12051echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
12052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012053/* confdefs.h. */
12054_ACEOF
12055cat confdefs.h >>conftest.$ac_ext
12056cat >>conftest.$ac_ext <<_ACEOF
12057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012058$ac_includes_default
12059#include <kernel/OS.h>
12060_ACEOF
12061rm -f conftest.$ac_objext
12062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012063 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012065 grep -v '^ *+' conftest.er1 >conftest.err
12066 rm -f conftest.er1
12067 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12069 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012070 { ac_try='test -z "$ac_c_werror_flag"
12071 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12073 (eval $ac_try) 2>&5
12074 ac_status=$?
12075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12076 (exit $ac_status); }; } &&
12077 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12079 (eval $ac_try) 2>&5
12080 ac_status=$?
12081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12082 (exit $ac_status); }; }; then
12083 ac_header_compiler=yes
12084else
12085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012086sed 's/^/| /' conftest.$ac_ext >&5
12087
Martin v. Löwis11437992002-04-12 09:54:03 +000012088ac_header_compiler=no
12089fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012090rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012091echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12092echo "${ECHO_T}$ac_header_compiler" >&6
12093
12094# Is the header present?
12095echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12096echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012098/* confdefs.h. */
12099_ACEOF
12100cat confdefs.h >>conftest.$ac_ext
12101cat >>conftest.$ac_ext <<_ACEOF
12102/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012103#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012104_ACEOF
12105if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12106 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12107 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012108 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 rm -f conftest.er1
12110 cat conftest.err >&5
12111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12112 (exit $ac_status); } >/dev/null; then
12113 if test -s conftest.err; then
12114 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012115 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012116 else
12117 ac_cpp_err=
12118 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012119else
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 ac_cpp_err=yes
12121fi
12122if test -z "$ac_cpp_err"; then
12123 ac_header_preproc=yes
12124else
12125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012126sed 's/^/| /' conftest.$ac_ext >&5
12127
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012130rm -f conftest.err conftest.$ac_ext
12131echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12132echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012133
Martin v. Löwis11437992002-04-12 09:54:03 +000012134# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012135case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12136 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12138echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012139 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12140echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12141 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012142 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012143 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012144 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12145echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012146 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12147echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12148 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12149echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12150 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12151echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012152 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12153echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012154 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12155echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012156 (
12157 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012158## ------------------------------------------------ ##
12159## Report this to http://www.python.org/python-bugs ##
12160## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012161_ASBOX
12162 ) |
12163 sed "s/^/$as_me: WARNING: /" >&2
12164 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012165esac
12166echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12167echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12168if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12169 echo $ECHO_N "(cached) $ECHO_C" >&6
12170else
12171 ac_cv_header_kernel_OS_h=$ac_header_preproc
12172fi
12173echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12174echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12175
12176fi
12177if test $ac_cv_header_kernel_OS_h = yes; then
12178 cat >>confdefs.h <<\_ACEOF
12179#define WITH_THREAD 1
12180_ACEOF
12181
12182
12183cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012184#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012185_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012186
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012187 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012188else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012189
Martin v. Löwis11437992002-04-12 09:54:03 +000012190 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12191echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12192if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12193 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012194else
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012196LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012197cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012198/* confdefs.h. */
12199_ACEOF
12200cat confdefs.h >>conftest.$ac_ext
12201cat >>conftest.$ac_ext <<_ACEOF
12202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012203
Greg Steinadf63d62000-07-05 10:38:09 +000012204/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012205#ifdef __cplusplus
12206extern "C"
12207#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012208/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 builtin and then its argument prototype would still apply. */
12210char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012211int
12212main ()
12213{
12214pthread_create ();
12215 ;
12216 return 0;
12217}
12218_ACEOF
12219rm -f conftest.$ac_objext conftest$ac_exeext
12220if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012221 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012223 grep -v '^ *+' conftest.er1 >conftest.err
12224 rm -f conftest.er1
12225 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12227 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012228 { ac_try='test -z "$ac_c_werror_flag"
12229 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12231 (eval $ac_try) 2>&5
12232 ac_status=$?
12233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12234 (exit $ac_status); }; } &&
12235 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12237 (eval $ac_try) 2>&5
12238 ac_status=$?
12239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12240 (exit $ac_status); }; }; then
12241 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012242else
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012244sed 's/^/| /' conftest.$ac_ext >&5
12245
Martin v. Löwis11437992002-04-12 09:54:03 +000012246ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012247fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012248rm -f conftest.err conftest.$ac_objext \
12249 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012250LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012251fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012252echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12253echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12254if test $ac_cv_lib_pthreads_pthread_create = yes; then
12255 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012256#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012257_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012258
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012259 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012260 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012261 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012262else
Greg Steinadf63d62000-07-05 10:38:09 +000012263
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12265echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12266if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12267 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012268else
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012270LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012271cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012272/* confdefs.h. */
12273_ACEOF
12274cat confdefs.h >>conftest.$ac_ext
12275cat >>conftest.$ac_ext <<_ACEOF
12276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012277
Guido van Rossum49545951997-12-02 19:28:29 +000012278/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012279#ifdef __cplusplus
12280extern "C"
12281#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012282/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 builtin and then its argument prototype would still apply. */
12284char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012285int
12286main ()
12287{
12288pthread_create ();
12289 ;
12290 return 0;
12291}
12292_ACEOF
12293rm -f conftest.$ac_objext conftest$ac_exeext
12294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012295 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012297 grep -v '^ *+' conftest.er1 >conftest.err
12298 rm -f conftest.er1
12299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12301 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012302 { ac_try='test -z "$ac_c_werror_flag"
12303 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12305 (eval $ac_try) 2>&5
12306 ac_status=$?
12307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308 (exit $ac_status); }; } &&
12309 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12311 (eval $ac_try) 2>&5
12312 ac_status=$?
12313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314 (exit $ac_status); }; }; then
12315 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012316else
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012318sed 's/^/| /' conftest.$ac_ext >&5
12319
Martin v. Löwis11437992002-04-12 09:54:03 +000012320ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012321fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012322rm -f conftest.err conftest.$ac_objext \
12323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012324LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012326echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12327echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12328if test $ac_cv_lib_c_r_pthread_create = yes; then
12329 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012330#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012331_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012332
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012333 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012334 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012335 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012336else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012337
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12339echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12340if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12341 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012342else
Martin v. Löwis11437992002-04-12 09:54:03 +000012343 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012344LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012345cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* confdefs.h. */
12347_ACEOF
12348cat confdefs.h >>conftest.$ac_ext
12349cat >>conftest.$ac_ext <<_ACEOF
12350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012351
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012352/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012353#ifdef __cplusplus
12354extern "C"
12355#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012356/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 builtin and then its argument prototype would still apply. */
12358char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012359int
12360main ()
12361{
12362__pthread_create_system ();
12363 ;
12364 return 0;
12365}
12366_ACEOF
12367rm -f conftest.$ac_objext conftest$ac_exeext
12368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012369 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012371 grep -v '^ *+' conftest.er1 >conftest.err
12372 rm -f conftest.er1
12373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012376 { ac_try='test -z "$ac_c_werror_flag"
12377 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12379 (eval $ac_try) 2>&5
12380 ac_status=$?
12381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12382 (exit $ac_status); }; } &&
12383 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12385 (eval $ac_try) 2>&5
12386 ac_status=$?
12387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12388 (exit $ac_status); }; }; then
12389 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012390else
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012392sed 's/^/| /' conftest.$ac_ext >&5
12393
Martin v. Löwis11437992002-04-12 09:54:03 +000012394ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012395fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012396rm -f conftest.err conftest.$ac_objext \
12397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012398LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012400echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12401echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12402if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12403 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012404#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012405_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012407 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012408 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012409 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012410else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012411
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12413echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12414if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12415 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012416else
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012418LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012420/* confdefs.h. */
12421_ACEOF
12422cat confdefs.h >>conftest.$ac_ext
12423cat >>conftest.$ac_ext <<_ACEOF
12424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Guido van Rossumb93a8621998-05-07 13:27:32 +000012426/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012427#ifdef __cplusplus
12428extern "C"
12429#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012430/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012431 builtin and then its argument prototype would still apply. */
12432char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012433int
12434main ()
12435{
12436pthread_create ();
12437 ;
12438 return 0;
12439}
12440_ACEOF
12441rm -f conftest.$ac_objext conftest$ac_exeext
12442if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012443 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012445 grep -v '^ *+' conftest.er1 >conftest.err
12446 rm -f conftest.er1
12447 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12449 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012450 { ac_try='test -z "$ac_c_werror_flag"
12451 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12453 (eval $ac_try) 2>&5
12454 ac_status=$?
12455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12456 (exit $ac_status); }; } &&
12457 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12459 (eval $ac_try) 2>&5
12460 ac_status=$?
12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462 (exit $ac_status); }; }; then
12463 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012464else
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012466sed 's/^/| /' conftest.$ac_ext >&5
12467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012469fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012470rm -f conftest.err conftest.$ac_objext \
12471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012472LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012474echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12475echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12476if test $ac_cv_lib_cma_pthread_create = yes; then
12477 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012478#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012479_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012480
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012481 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012482 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012483 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012484else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012485
Martin v. Löwis130fb172001-07-19 11:00:41 +000012486 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012487fi
12488
Guido van Rossum627b2d71993-12-24 10:39:16 +000012489
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012490fi
12491
Guido van Rossum0be3e491997-05-22 20:33:33 +000012492fi
12493
Guido van Rossum49545951997-12-02 19:28:29 +000012494fi
12495
Guido van Rossumb93a8621998-05-07 13:27:32 +000012496fi
12497
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012498
Michael W. Hudson54241132001-12-07 15:38:26 +000012499fi
12500
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012501
12502fi
12503
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012504fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012505rm -f conftest.err conftest.$ac_objext \
12506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012507fi;
12508fi
12509
12510
12511fi
12512
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012513
Michael W. Hudson54241132001-12-07 15:38:26 +000012514
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12516echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12517if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012519else
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012521LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012523/* confdefs.h. */
12524_ACEOF
12525cat confdefs.h >>conftest.$ac_ext
12526cat >>conftest.$ac_ext <<_ACEOF
12527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012528
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012529/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012530#ifdef __cplusplus
12531extern "C"
12532#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012533/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 builtin and then its argument prototype would still apply. */
12535char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012536int
12537main ()
12538{
12539usconfig ();
12540 ;
12541 return 0;
12542}
12543_ACEOF
12544rm -f conftest.$ac_objext conftest$ac_exeext
12545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012546 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012548 grep -v '^ *+' conftest.er1 >conftest.err
12549 rm -f conftest.er1
12550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012553 { ac_try='test -z "$ac_c_werror_flag"
12554 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556 (eval $ac_try) 2>&5
12557 ac_status=$?
12558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559 (exit $ac_status); }; } &&
12560 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12562 (eval $ac_try) 2>&5
12563 ac_status=$?
12564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565 (exit $ac_status); }; }; then
12566 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012567else
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012569sed 's/^/| /' conftest.$ac_ext >&5
12570
Martin v. Löwis11437992002-04-12 09:54:03 +000012571ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012572fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012573rm -f conftest.err conftest.$ac_objext \
12574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012575LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012577echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12578echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12579if test $ac_cv_lib_mpc_usconfig = yes; then
12580 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012581#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012582_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012583
Martin v. Löwis130fb172001-07-19 11:00:41 +000012584 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012585 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012586 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012587fi
12588
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012589
Neal Norwitza978ab02002-11-02 16:58:05 +000012590 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12592echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12593if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12594 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012595else
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012597LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012598cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012599/* confdefs.h. */
12600_ACEOF
12601cat confdefs.h >>conftest.$ac_ext
12602cat >>conftest.$ac_ext <<_ACEOF
12603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012604
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012605/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012606#ifdef __cplusplus
12607extern "C"
12608#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012609/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 builtin and then its argument prototype would still apply. */
12611char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012612int
12613main ()
12614{
12615thr_create ();
12616 ;
12617 return 0;
12618}
12619_ACEOF
12620rm -f conftest.$ac_objext conftest$ac_exeext
12621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012622 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012624 grep -v '^ *+' conftest.er1 >conftest.err
12625 rm -f conftest.er1
12626 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12628 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012629 { ac_try='test -z "$ac_c_werror_flag"
12630 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12632 (eval $ac_try) 2>&5
12633 ac_status=$?
12634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12635 (exit $ac_status); }; } &&
12636 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12638 (eval $ac_try) 2>&5
12639 ac_status=$?
12640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641 (exit $ac_status); }; }; then
12642 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012643else
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012645sed 's/^/| /' conftest.$ac_ext >&5
12646
Martin v. Löwis11437992002-04-12 09:54:03 +000012647ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012648fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012649rm -f conftest.err conftest.$ac_objext \
12650 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012651LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012653echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12654echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12655if test $ac_cv_lib_thread_thr_create = yes; then
12656 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012657#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012658_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012659
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012660 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012661 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012662 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012663fi
12664
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012665 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012666
Martin v. Löwis130fb172001-07-19 11:00:41 +000012667 if test "$USE_THREAD_MODULE" != "#"
12668 then
12669 # If the above checks didn't disable threads, (at least) OSF1
12670 # needs this '-threads' argument during linking.
12671 case $ac_sys_system in
12672 OSF1) LDLAST=-threads;;
12673 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012674 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012675fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012676
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012677if test "$posix_threads" = "yes"; then
12678 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012679
12680cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012681#define _POSIX_THREADS 1
12682_ACEOF
12683
12684 fi
12685
12686 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12687 case $ac_sys_system/$ac_sys_release in
12688 SunOS/5.6)
12689cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012690#define HAVE_PTHREAD_DESTRUCTOR 1
12691_ACEOF
12692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012693 ;;
12694 SunOS/5.8)
12695cat >>confdefs.h <<\_ACEOF
12696#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12697_ACEOF
12698
12699 ;;
12700 esac
12701
12702 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12703echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12704 if test "${ac_cv_pthread_system_supported+set}" = set; then
12705 echo $ECHO_N "(cached) $ECHO_C" >&6
12706else
12707 if test "$cross_compiling" = yes; then
12708 ac_cv_pthread_system_supported=no
12709else
12710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012711/* confdefs.h. */
12712_ACEOF
12713cat confdefs.h >>conftest.$ac_ext
12714cat >>conftest.$ac_ext <<_ACEOF
12715/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012716#include <pthread.h>
12717 void *foo(void *parm) {
12718 return NULL;
12719 }
12720 main() {
12721 pthread_attr_t attr;
12722 pthread_t id;
12723 if (pthread_attr_init(&attr)) exit(-1);
12724 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12725 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12726 exit(0);
12727 }
12728_ACEOF
12729rm -f conftest$ac_exeext
12730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12731 (eval $ac_link) 2>&5
12732 ac_status=$?
12733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12734 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12736 (eval $ac_try) 2>&5
12737 ac_status=$?
12738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12739 (exit $ac_status); }; }; then
12740 ac_cv_pthread_system_supported=yes
12741else
12742 echo "$as_me: program exited with status $ac_status" >&5
12743echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012744sed 's/^/| /' conftest.$ac_ext >&5
12745
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012746( exit $ac_status )
12747ac_cv_pthread_system_supported=no
12748fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012749rm -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 +000012750fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012751
Guido van Rossum627b2d71993-12-24 10:39:16 +000012752fi
12753
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012754 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12755echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12756 if test "$ac_cv_pthread_system_supported" = "yes"; then
12757
12758cat >>confdefs.h <<\_ACEOF
12759#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12760_ACEOF
12761
12762 fi
12763
12764for ac_func in pthread_sigmask
12765do
12766as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12767echo "$as_me:$LINENO: checking for $ac_func" >&5
12768echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12769if eval "test \"\${$as_ac_var+set}\" = set"; then
12770 echo $ECHO_N "(cached) $ECHO_C" >&6
12771else
12772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* confdefs.h. */
12774_ACEOF
12775cat confdefs.h >>conftest.$ac_ext
12776cat >>conftest.$ac_ext <<_ACEOF
12777/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012778/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012779 which can conflict with char $ac_func (); below.
12780 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012781 <limits.h> exists even on freestanding compilers. Under hpux,
12782 including <limits.h> includes <sys/time.h> and causes problems
12783 checking for functions defined therein. */
12784#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012785# include <limits.h>
12786#else
12787# include <assert.h>
12788#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012789/* Override any gcc2 internal prototype to avoid an error. */
12790#ifdef __cplusplus
12791extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012792{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012793#endif
12794/* We use char because int might match the return type of a gcc2
12795 builtin and then its argument prototype would still apply. */
12796char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012797/* The GNU C library defines this for functions which it implements
12798 to always fail with ENOSYS. Some functions are actually named
12799 something starting with __ and the normal name is an alias. */
12800#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12801choke me
12802#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012803char (*f) () = $ac_func;
12804#endif
12805#ifdef __cplusplus
12806}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012807#endif
12808
Skip Montanaro6dead952003-09-25 14:50:04 +000012809int
12810main ()
12811{
12812return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012813 ;
12814 return 0;
12815}
12816_ACEOF
12817rm -f conftest.$ac_objext conftest$ac_exeext
12818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012819 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012821 grep -v '^ *+' conftest.er1 >conftest.err
12822 rm -f conftest.er1
12823 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12825 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012826 { ac_try='test -z "$ac_c_werror_flag"
12827 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12829 (eval $ac_try) 2>&5
12830 ac_status=$?
12831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12832 (exit $ac_status); }; } &&
12833 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12835 (eval $ac_try) 2>&5
12836 ac_status=$?
12837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12838 (exit $ac_status); }; }; then
12839 eval "$as_ac_var=yes"
12840else
12841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012842sed 's/^/| /' conftest.$ac_ext >&5
12843
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012844eval "$as_ac_var=no"
12845fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012846rm -f conftest.err conftest.$ac_objext \
12847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012848fi
12849echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12850echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12851if test `eval echo '${'$as_ac_var'}'` = yes; then
12852 cat >>confdefs.h <<_ACEOF
12853#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12854_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012855 case $ac_sys_system in
12856 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012857
Jason Tishlerfac083d2003-07-22 15:20:49 +000012858cat >>confdefs.h <<\_ACEOF
12859#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12860_ACEOF
12861
12862 ;;
12863 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012864fi
12865done
12866
12867fi
12868
12869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012870# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
12872
12873echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12874echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012875# Check whether --enable-ipv6 or --disable-ipv6 was given.
12876if test "${enable_ipv6+set}" = set; then
12877 enableval="$enable_ipv6"
12878 case "$enableval" in
12879 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 echo "$as_me:$LINENO: result: no" >&5
12881echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012882 ipv6=no
12883 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 *) echo "$as_me:$LINENO: result: yes" >&5
12885echo "${ECHO_T}yes" >&6
12886 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012887#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012888_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012889
12890 ipv6=yes
12891 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012893else
Martin v. Löwis11437992002-04-12 09:54:03 +000012894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012895 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 echo "$as_me:$LINENO: result: no" >&5
12897echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012898 ipv6=no
12899
12900else
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012902/* confdefs.h. */
12903_ACEOF
12904cat confdefs.h >>conftest.$ac_ext
12905cat >>conftest.$ac_ext <<_ACEOF
12906/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012907 /* AF_INET6 available check */
12908#include <sys/types.h>
12909#include <sys/socket.h>
12910main()
12911{
12912 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12913 exit(1);
12914 else
12915 exit(0);
12916}
12917
Martin v. Löwis11437992002-04-12 09:54:03 +000012918_ACEOF
12919rm -f conftest$ac_exeext
12920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12921 (eval $ac_link) 2>&5
12922 ac_status=$?
12923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12926 (eval $ac_try) 2>&5
12927 ac_status=$?
12928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929 (exit $ac_status); }; }; then
12930 echo "$as_me:$LINENO: result: yes" >&5
12931echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012932 ipv6=yes
12933else
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 echo "$as_me: program exited with status $ac_status" >&5
12935echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012936sed 's/^/| /' conftest.$ac_ext >&5
12937
Martin v. Löwis11437992002-04-12 09:54:03 +000012938( exit $ac_status )
12939echo "$as_me:$LINENO: result: no" >&5
12940echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012941 ipv6=no
12942fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012943rm -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 +000012944fi
12945
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012946if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12948echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012950/* confdefs.h. */
12951_ACEOF
12952cat confdefs.h >>conftest.$ac_ext
12953cat >>conftest.$ac_ext <<_ACEOF
12954/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012955#include <sys/types.h>
12956#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012957int
12958main ()
12959{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012960struct sockaddr_in6 x;
12961x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 ;
12963 return 0;
12964}
12965_ACEOF
12966rm -f conftest.$ac_objext
12967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012968 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012970 grep -v '^ *+' conftest.er1 >conftest.err
12971 rm -f conftest.er1
12972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12974 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012975 { ac_try='test -z "$ac_c_werror_flag"
12976 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12978 (eval $ac_try) 2>&5
12979 ac_status=$?
12980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12981 (exit $ac_status); }; } &&
12982 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12984 (eval $ac_try) 2>&5
12985 ac_status=$?
12986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12987 (exit $ac_status); }; }; then
12988 echo "$as_me:$LINENO: result: yes" >&5
12989echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012990 ipv6=yes
12991else
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012993sed 's/^/| /' conftest.$ac_ext >&5
12994
Martin v. Löwis11437992002-04-12 09:54:03 +000012995echo "$as_me:$LINENO: result: no" >&5
12996echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012997 ipv6=no
12998fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013000fi
13001
13002if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013003 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013004#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013005_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013006
13007fi
13008
Martin v. Löwis11437992002-04-12 09:54:03 +000013009fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013010
13011ipv6type=unknown
13012ipv6lib=none
13013ipv6trylibc=no
13014
13015if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
13017echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000013018 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
13019 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013020 case $i in
13021 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013023/* confdefs.h. */
13024_ACEOF
13025cat confdefs.h >>conftest.$ac_ext
13026cat >>conftest.$ac_ext <<_ACEOF
13027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013029#include <netinet/in.h>
13030#ifdef IPV6_INRIA_VERSION
13031yes
13032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013035 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013036 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013037fi
13038rm -f conftest*
13039
13040 ;;
13041 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013043/* confdefs.h. */
13044_ACEOF
13045cat confdefs.h >>conftest.$ac_ext
13046cat >>conftest.$ac_ext <<_ACEOF
13047/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013048
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013049#include <netinet/in.h>
13050#ifdef __KAME__
13051yes
13052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013053_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013055 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013056 ipv6type=$i;
13057 ipv6lib=inet6
13058 ipv6libdir=/usr/local/v6/lib
13059 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013060fi
13061rm -f conftest*
13062
13063 ;;
13064 linux-glibc)
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 <features.h>
13073#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
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 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013081fi
13082rm -f conftest*
13083
13084 ;;
13085 linux-inet6)
13086 if test -d /usr/inet6; then
13087 ipv6type=$i
13088 ipv6lib=inet6
13089 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013090 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013091 fi
13092 ;;
13093 solaris)
13094 if test -f /etc/netconfig; then
13095 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13096 ipv6type=$i
13097 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013098 fi
13099 fi
13100 ;;
13101 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013103/* confdefs.h. */
13104_ACEOF
13105cat confdefs.h >>conftest.$ac_ext
13106cat >>conftest.$ac_ext <<_ACEOF
13107/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013108
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013109#include <sys/param.h>
13110#ifdef _TOSHIBA_INET6
13111yes
13112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013113_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013115 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013116 ipv6type=$i;
13117 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013118 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013119fi
13120rm -f conftest*
13121
13122 ;;
13123 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013125/* confdefs.h. */
13126_ACEOF
13127cat confdefs.h >>conftest.$ac_ext
13128cat >>conftest.$ac_ext <<_ACEOF
13129/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013131#include </usr/local/v6/include/sys/v6config.h>
13132#ifdef __V6D__
13133yes
13134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013135_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013137 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013138 ipv6type=$i;
13139 ipv6lib=v6;
13140 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013141 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013142fi
13143rm -f conftest*
13144
13145 ;;
13146 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013148/* confdefs.h. */
13149_ACEOF
13150cat confdefs.h >>conftest.$ac_ext
13151cat >>conftest.$ac_ext <<_ACEOF
13152/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013153
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013154#include <sys/param.h>
13155#ifdef _ZETA_MINAMI_INET6
13156yes
13157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013158_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013160 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013161 ipv6type=$i;
13162 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013163 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013164fi
13165rm -f conftest*
13166
13167 ;;
13168 esac
13169 if test "$ipv6type" != "unknown"; then
13170 break
13171 fi
13172 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 echo "$as_me:$LINENO: result: $ipv6type" >&5
13174echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013175fi
13176
13177if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13178 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13179 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13180 echo "using lib$ipv6lib"
13181 else
13182 if test $ipv6trylibc = "yes"; then
13183 echo "using libc"
13184 else
13185 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13186 echo "You need to fetch lib$ipv6lib.a from appropriate"
13187 echo 'ipv6 kit and compile beforehand.'
13188 exit 1
13189 fi
13190 fi
13191fi
13192
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013193# Check for --with-doc-strings
13194echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13195echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13196
13197# Check whether --with-doc-strings or --without-doc-strings was given.
13198if test "${with_doc_strings+set}" = set; then
13199 withval="$with_doc_strings"
13200
13201fi;
13202
13203if test -z "$with_doc_strings"
13204then with_doc_strings="yes"
13205fi
13206if test "$with_doc_strings" != "no"
13207then
13208
13209cat >>confdefs.h <<\_ACEOF
13210#define WITH_DOC_STRINGS 1
13211_ACEOF
13212
13213fi
13214echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13215echo "${ECHO_T}$with_doc_strings" >&6
13216
Neil Schemenauera35c6882001-02-27 04:45:05 +000013217# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013218echo "$as_me:$LINENO: checking for --with-tsc" >&5
13219echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13220
13221# Check whether --with-tsc or --without-tsc was given.
13222if test "${with_tsc+set}" = set; then
13223 withval="$with_tsc"
13224
13225if test "$withval" != no
13226then
13227
13228cat >>confdefs.h <<\_ACEOF
13229#define WITH_TSC 1
13230_ACEOF
13231
13232 echo "$as_me:$LINENO: result: yes" >&5
13233echo "${ECHO_T}yes" >&6
13234else echo "$as_me:$LINENO: result: no" >&5
13235echo "${ECHO_T}no" >&6
13236fi
13237else
13238 echo "$as_me:$LINENO: result: no" >&5
13239echo "${ECHO_T}no" >&6
13240fi;
13241
13242# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013243echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13244echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13245
Neil Schemenauera35c6882001-02-27 04:45:05 +000013246# Check whether --with-pymalloc or --without-pymalloc was given.
13247if test "${with_pymalloc+set}" = set; then
13248 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013249
Martin v. Löwis11437992002-04-12 09:54:03 +000013250fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013251
Neil Schemenauer16c22972002-03-22 15:34:49 +000013252if test -z "$with_pymalloc"
13253then with_pymalloc="yes"
13254fi
13255if test "$with_pymalloc" != "no"
13256then
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
13258cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013259#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013260_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013261
13262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013263echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13264echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013265
Barry Warsawef82cd72000-06-30 16:21:01 +000013266# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013267echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13268echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13269
Barry Warsawef82cd72000-06-30 16:21:01 +000013270# Check whether --with-wctype-functions or --without-wctype-functions was given.
13271if test "${with_wctype_functions+set}" = set; then
13272 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Barry Warsawef82cd72000-06-30 16:21:01 +000013274if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013275then
13276
13277cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013278#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013279_ACEOF
13280
13281 echo "$as_me:$LINENO: result: yes" >&5
13282echo "${ECHO_T}yes" >&6
13283else echo "$as_me:$LINENO: result: no" >&5
13284echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013285fi
13286else
Martin v. Löwis11437992002-04-12 09:54:03 +000013287 echo "$as_me:$LINENO: result: no" >&5
13288echo "${ECHO_T}no" >&6
13289fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013290
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013291# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013292
Guido van Rossum98935bf2001-09-05 19:13:16 +000013293DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013294
Guido van Rossume97ee181999-12-20 21:27:22 +000013295# the dlopen() function means we might want to use dynload_shlib.o. some
13296# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013297
Thomas Wouters3a584202000-08-05 23:28:51 +000013298for ac_func in dlopen
13299do
Martin v. Löwis11437992002-04-12 09:54:03 +000013300as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13301echo "$as_me:$LINENO: checking for $ac_func" >&5
13302echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13303if eval "test \"\${$as_ac_var+set}\" = set"; then
13304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013305else
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013307/* confdefs.h. */
13308_ACEOF
13309cat confdefs.h >>conftest.$ac_ext
13310cat >>conftest.$ac_ext <<_ACEOF
13311/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000013312/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013313 which can conflict with char $ac_func (); below.
13314 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013315 <limits.h> exists even on freestanding compilers. Under hpux,
13316 including <limits.h> includes <sys/time.h> and causes problems
13317 checking for functions defined therein. */
13318#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013319# include <limits.h>
13320#else
13321# include <assert.h>
13322#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013323/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013324#ifdef __cplusplus
13325extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013326{
Martin v. Löwis11437992002-04-12 09:54:03 +000013327#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013328/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 builtin and then its argument prototype would still apply. */
13330char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013331/* The GNU C library defines this for functions which it implements
13332 to always fail with ENOSYS. Some functions are actually named
13333 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013334#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013335choke me
13336#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013337char (*f) () = $ac_func;
13338#endif
13339#ifdef __cplusplus
13340}
Guido van Rossume97ee181999-12-20 21:27:22 +000013341#endif
13342
Skip Montanaro6dead952003-09-25 14:50:04 +000013343int
13344main ()
13345{
13346return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013347 ;
13348 return 0;
13349}
13350_ACEOF
13351rm -f conftest.$ac_objext conftest$ac_exeext
13352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013353 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013355 grep -v '^ *+' conftest.er1 >conftest.err
13356 rm -f conftest.er1
13357 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13359 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013360 { ac_try='test -z "$ac_c_werror_flag"
13361 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13363 (eval $ac_try) 2>&5
13364 ac_status=$?
13365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13366 (exit $ac_status); }; } &&
13367 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13369 (eval $ac_try) 2>&5
13370 ac_status=$?
13371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13372 (exit $ac_status); }; }; then
13373 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013374else
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013376sed 's/^/| /' conftest.$ac_ext >&5
13377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013379fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013380rm -f conftest.err conftest.$ac_objext \
13381 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013383echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13384echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13385if test `eval echo '${'$as_ac_var'}'` = yes; then
13386 cat >>confdefs.h <<_ACEOF
13387#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13388_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013389
Guido van Rossume97ee181999-12-20 21:27:22 +000013390fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013391done
Guido van Rossume97ee181999-12-20 21:27:22 +000013392
Michael W. Hudson54241132001-12-07 15:38:26 +000013393
Guido van Rossume97ee181999-12-20 21:27:22 +000013394# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13395# loading of modules.
13396
Martin v. Löwis11437992002-04-12 09:54:03 +000013397echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13398echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013399if test -z "$DYNLOADFILE"
13400then
13401 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013402 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13403 if test "$ac_cv_func_dlopen" = yes
13404 then DYNLOADFILE="dynload_shlib.o"
13405 else DYNLOADFILE="dynload_aix.o"
13406 fi
13407 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013408 BeOS*) DYNLOADFILE="dynload_beos.o";;
13409 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013410 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013411 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013412 *)
13413 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13414 # out any dynamic loading
13415 if test "$ac_cv_func_dlopen" = yes
13416 then DYNLOADFILE="dynload_shlib.o"
13417 else DYNLOADFILE="dynload_stub.o"
13418 fi
13419 ;;
13420 esac
13421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013422echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13423echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013424if test "$DYNLOADFILE" != "dynload_stub.o"
13425then
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
13427cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013428#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013429_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013430
13431fi
13432
Neil Schemenauer4e425612001-06-19 15:44:15 +000013433# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13434
Michael W. Hudson54241132001-12-07 15:38:26 +000013435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13437echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013438if test -z "$MACHDEP_OBJS"
13439then
Jack Jansene578a632001-08-15 01:27:14 +000013440 MACHDEP_OBJS=$extra_machdep_objs
13441else
13442 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013443fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013444echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13445echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013446
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
Martin v. Löwisd6320502004-08-12 13:45:08 +000013519
Martin v. Löwisc3001752005-01-23 09:27:24 +000013520
13521
Martin v. Löwisd6320502004-08-12 13:45:08 +000013522for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13523 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013524 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000013525 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013526 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013527 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013528 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013529 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013530 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013531 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013532 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013533 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013534do
Martin v. Löwis11437992002-04-12 09:54:03 +000013535as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13536echo "$as_me:$LINENO: checking for $ac_func" >&5
13537echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13538if eval "test \"\${$as_ac_var+set}\" = set"; then
13539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013540else
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013542/* confdefs.h. */
13543_ACEOF
13544cat confdefs.h >>conftest.$ac_ext
13545cat >>conftest.$ac_ext <<_ACEOF
13546/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013547/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013548 which can conflict with char $ac_func (); below.
13549 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013550 <limits.h> exists even on freestanding compilers. Under hpux,
13551 including <limits.h> includes <sys/time.h> and causes problems
13552 checking for functions defined therein. */
13553#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013554# include <limits.h>
13555#else
13556# include <assert.h>
13557#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013558/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013559#ifdef __cplusplus
13560extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013561{
Martin v. Löwis11437992002-04-12 09:54:03 +000013562#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013563/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 builtin and then its argument prototype would still apply. */
13565char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013566/* The GNU C library defines this for functions which it implements
13567 to always fail with ENOSYS. Some functions are actually named
13568 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013570choke me
13571#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013572char (*f) () = $ac_func;
13573#endif
13574#ifdef __cplusplus
13575}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013576#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577
Skip Montanaro6dead952003-09-25 14:50:04 +000013578int
13579main ()
13580{
13581return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;
13583 return 0;
13584}
13585_ACEOF
13586rm -f conftest.$ac_objext conftest$ac_exeext
13587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013588 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013590 grep -v '^ *+' conftest.er1 >conftest.err
13591 rm -f conftest.er1
13592 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13594 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013595 { ac_try='test -z "$ac_c_werror_flag"
13596 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13598 (eval $ac_try) 2>&5
13599 ac_status=$?
13600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13601 (exit $ac_status); }; } &&
13602 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13604 (eval $ac_try) 2>&5
13605 ac_status=$?
13606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13607 (exit $ac_status); }; }; then
13608 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013609else
Martin v. Löwis11437992002-04-12 09:54:03 +000013610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013611sed 's/^/| /' conftest.$ac_ext >&5
13612
Martin v. Löwis11437992002-04-12 09:54:03 +000013613eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013614fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013615rm -f conftest.err conftest.$ac_objext \
13616 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013617fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013618echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13619echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13620if test `eval echo '${'$as_ac_var'}'` = yes; then
13621 cat >>confdefs.h <<_ACEOF
13622#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13623_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013624
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013625fi
13626done
13627
Michael W. Hudson54241132001-12-07 15:38:26 +000013628
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013629# For some functions, having a definition is not sufficient, since
13630# we want to take their address.
13631echo "$as_me:$LINENO: checking for chroot" >&5
13632echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013634/* confdefs.h. */
13635_ACEOF
13636cat confdefs.h >>conftest.$ac_ext
13637cat >>conftest.$ac_ext <<_ACEOF
13638/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013639#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013640int
13641main ()
13642{
13643void *x=chroot
13644 ;
13645 return 0;
13646}
13647_ACEOF
13648rm -f conftest.$ac_objext
13649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013650 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013652 grep -v '^ *+' conftest.er1 >conftest.err
13653 rm -f conftest.er1
13654 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13656 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013657 { ac_try='test -z "$ac_c_werror_flag"
13658 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13660 (eval $ac_try) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); }; } &&
13664 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13666 (eval $ac_try) 2>&5
13667 ac_status=$?
13668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13669 (exit $ac_status); }; }; then
13670
13671cat >>confdefs.h <<\_ACEOF
13672#define HAVE_CHROOT 1
13673_ACEOF
13674
13675 echo "$as_me:$LINENO: result: yes" >&5
13676echo "${ECHO_T}yes" >&6
13677else
13678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013679sed 's/^/| /' conftest.$ac_ext >&5
13680
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013681echo "$as_me:$LINENO: result: no" >&5
13682echo "${ECHO_T}no" >&6
13683
13684fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013685rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013686echo "$as_me:$LINENO: checking for link" >&5
13687echo $ECHO_N "checking for link... $ECHO_C" >&6
13688cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013689/* confdefs.h. */
13690_ACEOF
13691cat confdefs.h >>conftest.$ac_ext
13692cat >>conftest.$ac_ext <<_ACEOF
13693/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013694#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013695int
13696main ()
13697{
13698void *x=link
13699 ;
13700 return 0;
13701}
13702_ACEOF
13703rm -f conftest.$ac_objext
13704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013705 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013707 grep -v '^ *+' conftest.er1 >conftest.err
13708 rm -f conftest.er1
13709 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13711 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013712 { ac_try='test -z "$ac_c_werror_flag"
13713 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13715 (eval $ac_try) 2>&5
13716 ac_status=$?
13717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718 (exit $ac_status); }; } &&
13719 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13721 (eval $ac_try) 2>&5
13722 ac_status=$?
13723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13724 (exit $ac_status); }; }; then
13725
13726cat >>confdefs.h <<\_ACEOF
13727#define HAVE_LINK 1
13728_ACEOF
13729
13730 echo "$as_me:$LINENO: result: yes" >&5
13731echo "${ECHO_T}yes" >&6
13732else
13733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013734sed 's/^/| /' conftest.$ac_ext >&5
13735
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013736echo "$as_me:$LINENO: result: no" >&5
13737echo "${ECHO_T}no" >&6
13738
13739fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013741echo "$as_me:$LINENO: checking for symlink" >&5
13742echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013744/* confdefs.h. */
13745_ACEOF
13746cat confdefs.h >>conftest.$ac_ext
13747cat >>conftest.$ac_ext <<_ACEOF
13748/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013749#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013750int
13751main ()
13752{
13753void *x=symlink
13754 ;
13755 return 0;
13756}
13757_ACEOF
13758rm -f conftest.$ac_objext
13759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013760 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013762 grep -v '^ *+' conftest.er1 >conftest.err
13763 rm -f conftest.er1
13764 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013767 { ac_try='test -z "$ac_c_werror_flag"
13768 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13770 (eval $ac_try) 2>&5
13771 ac_status=$?
13772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13773 (exit $ac_status); }; } &&
13774 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13776 (eval $ac_try) 2>&5
13777 ac_status=$?
13778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13779 (exit $ac_status); }; }; then
13780
13781cat >>confdefs.h <<\_ACEOF
13782#define HAVE_SYMLINK 1
13783_ACEOF
13784
13785 echo "$as_me:$LINENO: result: yes" >&5
13786echo "${ECHO_T}yes" >&6
13787else
13788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013789sed 's/^/| /' conftest.$ac_ext >&5
13790
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013791echo "$as_me:$LINENO: result: no" >&5
13792echo "${ECHO_T}no" >&6
13793
13794fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013796echo "$as_me:$LINENO: checking for fchdir" >&5
13797echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013799/* confdefs.h. */
13800_ACEOF
13801cat confdefs.h >>conftest.$ac_ext
13802cat >>conftest.$ac_ext <<_ACEOF
13803/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013804#include <unistd.h>
13805int
13806main ()
13807{
13808void *x=fchdir
13809 ;
13810 return 0;
13811}
13812_ACEOF
13813rm -f conftest.$ac_objext
13814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013815 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013817 grep -v '^ *+' conftest.er1 >conftest.err
13818 rm -f conftest.er1
13819 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13821 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013822 { ac_try='test -z "$ac_c_werror_flag"
13823 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13825 (eval $ac_try) 2>&5
13826 ac_status=$?
13827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13828 (exit $ac_status); }; } &&
13829 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13831 (eval $ac_try) 2>&5
13832 ac_status=$?
13833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13834 (exit $ac_status); }; }; then
13835
13836cat >>confdefs.h <<\_ACEOF
13837#define HAVE_FCHDIR 1
13838_ACEOF
13839
13840 echo "$as_me:$LINENO: result: yes" >&5
13841echo "${ECHO_T}yes" >&6
13842else
13843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013844sed 's/^/| /' conftest.$ac_ext >&5
13845
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013846echo "$as_me:$LINENO: result: no" >&5
13847echo "${ECHO_T}no" >&6
13848
13849fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013851echo "$as_me:$LINENO: checking for fsync" >&5
13852echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* confdefs.h. */
13855_ACEOF
13856cat confdefs.h >>conftest.$ac_ext
13857cat >>conftest.$ac_ext <<_ACEOF
13858/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013859#include <unistd.h>
13860int
13861main ()
13862{
13863void *x=fsync
13864 ;
13865 return 0;
13866}
13867_ACEOF
13868rm -f conftest.$ac_objext
13869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013870 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013872 grep -v '^ *+' conftest.er1 >conftest.err
13873 rm -f conftest.er1
13874 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13876 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013877 { ac_try='test -z "$ac_c_werror_flag"
13878 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13880 (eval $ac_try) 2>&5
13881 ac_status=$?
13882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883 (exit $ac_status); }; } &&
13884 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13886 (eval $ac_try) 2>&5
13887 ac_status=$?
13888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13889 (exit $ac_status); }; }; then
13890
13891cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013892#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013893_ACEOF
13894
13895 echo "$as_me:$LINENO: result: yes" >&5
13896echo "${ECHO_T}yes" >&6
13897else
13898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013899sed 's/^/| /' conftest.$ac_ext >&5
13900
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013901echo "$as_me:$LINENO: result: no" >&5
13902echo "${ECHO_T}no" >&6
13903
13904fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013905rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013906echo "$as_me:$LINENO: checking for fdatasync" >&5
13907echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13908cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013909/* confdefs.h. */
13910_ACEOF
13911cat confdefs.h >>conftest.$ac_ext
13912cat >>conftest.$ac_ext <<_ACEOF
13913/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013914#include <unistd.h>
13915int
13916main ()
13917{
13918void *x=fdatasync
13919 ;
13920 return 0;
13921}
13922_ACEOF
13923rm -f conftest.$ac_objext
13924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013925 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013927 grep -v '^ *+' conftest.er1 >conftest.err
13928 rm -f conftest.er1
13929 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13931 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013932 { ac_try='test -z "$ac_c_werror_flag"
13933 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13935 (eval $ac_try) 2>&5
13936 ac_status=$?
13937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13938 (exit $ac_status); }; } &&
13939 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +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); }; }; then
13945
13946cat >>confdefs.h <<\_ACEOF
13947#define HAVE_FDATASYNC 1
13948_ACEOF
13949
13950 echo "$as_me:$LINENO: result: yes" >&5
13951echo "${ECHO_T}yes" >&6
13952else
13953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013954sed 's/^/| /' conftest.$ac_ext >&5
13955
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013956echo "$as_me:$LINENO: result: no" >&5
13957echo "${ECHO_T}no" >&6
13958
13959fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013960rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013961
Martin v. Löwisd5843682002-11-21 20:41:28 +000013962# On some systems (eg. FreeBSD 5), we would find a definition of the
13963# functions ctermid_r, setgroups in the library, but no prototype
13964# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13965# address to avoid compiler warnings and potential miscompilations
13966# because of the missing prototypes.
13967
13968echo "$as_me:$LINENO: checking for ctermid_r" >&5
13969echo $ECHO_N "checking for ctermid_r... $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öwisd5843682002-11-21 20:41:28 +000013976
13977#include "confdefs.h"
13978#include <stdio.h>
13979
Martin v. Löwisd5843682002-11-21 20:41:28 +000013980int
13981main ()
13982{
13983void* p = ctermid_r
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öwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +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_CTERMID_R 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öwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +000014026
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014027echo "$as_me:$LINENO: checking for flock" >&5
14028echo $ECHO_N "checking for flock... $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 <sys/file.h>
14038
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014039int
14040main ()
14041{
14042void* p = flock
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_FLOCK 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
14086echo "$as_me:$LINENO: checking for getpagesize" >&5
14087echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014089/* confdefs.h. */
14090_ACEOF
14091cat confdefs.h >>conftest.$ac_ext
14092cat >>conftest.$ac_ext <<_ACEOF
14093/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014094
14095#include "confdefs.h"
14096#include <unistd.h>
14097
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014098int
14099main ()
14100{
14101void* p = getpagesize
14102 ;
14103 return 0;
14104}
14105_ACEOF
14106rm -f conftest.$ac_objext
14107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014108 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014110 grep -v '^ *+' conftest.er1 >conftest.err
14111 rm -f conftest.er1
14112 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14114 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014115 { ac_try='test -z "$ac_c_werror_flag"
14116 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14118 (eval $ac_try) 2>&5
14119 ac_status=$?
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); }; } &&
14122 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14124 (eval $ac_try) 2>&5
14125 ac_status=$?
14126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127 (exit $ac_status); }; }; then
14128
14129cat >>confdefs.h <<\_ACEOF
14130#define HAVE_GETPAGESIZE 1
14131_ACEOF
14132
14133 echo "$as_me:$LINENO: result: yes" >&5
14134echo "${ECHO_T}yes" >&6
14135else
14136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014137sed 's/^/| /' conftest.$ac_ext >&5
14138
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014139echo "$as_me:$LINENO: result: no" >&5
14140echo "${ECHO_T}no" >&6
14141
14142fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014143rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014144
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014145for ac_prog in true
14146do
14147 # Extract the first word of "$ac_prog", so it can be a program name with args.
14148set dummy $ac_prog; ac_word=$2
14149echo "$as_me:$LINENO: checking for $ac_word" >&5
14150echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14151if test "${ac_cv_prog_TRUE+set}" = set; then
14152 echo $ECHO_N "(cached) $ECHO_C" >&6
14153else
14154 if test -n "$TRUE"; then
14155 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14156else
14157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14158for as_dir in $PATH
14159do
14160 IFS=$as_save_IFS
14161 test -z "$as_dir" && as_dir=.
14162 for ac_exec_ext in '' $ac_executable_extensions; do
14163 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14164 ac_cv_prog_TRUE="$ac_prog"
14165 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14166 break 2
14167 fi
14168done
14169done
14170
14171fi
14172fi
14173TRUE=$ac_cv_prog_TRUE
14174if test -n "$TRUE"; then
14175 echo "$as_me:$LINENO: result: $TRUE" >&5
14176echo "${ECHO_T}$TRUE" >&6
14177else
14178 echo "$as_me:$LINENO: result: no" >&5
14179echo "${ECHO_T}no" >&6
14180fi
14181
14182 test -n "$TRUE" && break
14183done
14184test -n "$TRUE" || TRUE="/bin/true"
14185
14186
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014187echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14188echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14189if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14190 echo $ECHO_N "(cached) $ECHO_C" >&6
14191else
14192 ac_check_lib_save_LIBS=$LIBS
14193LIBS="-lc $LIBS"
14194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014195/* confdefs.h. */
14196_ACEOF
14197cat confdefs.h >>conftest.$ac_ext
14198cat >>conftest.$ac_ext <<_ACEOF
14199/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014200
14201/* Override any gcc2 internal prototype to avoid an error. */
14202#ifdef __cplusplus
14203extern "C"
14204#endif
14205/* We use char because int might match the return type of a gcc2
14206 builtin and then its argument prototype would still apply. */
14207char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014208int
14209main ()
14210{
14211inet_aton ();
14212 ;
14213 return 0;
14214}
14215_ACEOF
14216rm -f conftest.$ac_objext conftest$ac_exeext
14217if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014218 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014220 grep -v '^ *+' conftest.er1 >conftest.err
14221 rm -f conftest.er1
14222 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14224 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014225 { ac_try='test -z "$ac_c_werror_flag"
14226 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14228 (eval $ac_try) 2>&5
14229 ac_status=$?
14230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14231 (exit $ac_status); }; } &&
14232 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14234 (eval $ac_try) 2>&5
14235 ac_status=$?
14236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237 (exit $ac_status); }; }; then
14238 ac_cv_lib_c_inet_aton=yes
14239else
14240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014241sed 's/^/| /' conftest.$ac_ext >&5
14242
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014243ac_cv_lib_c_inet_aton=no
14244fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014245rm -f conftest.err conftest.$ac_objext \
14246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014247LIBS=$ac_check_lib_save_LIBS
14248fi
14249echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14250echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14251if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014252 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014253else
14254
14255echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14256echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14257if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14258 echo $ECHO_N "(cached) $ECHO_C" >&6
14259else
14260 ac_check_lib_save_LIBS=$LIBS
14261LIBS="-lresolv $LIBS"
14262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014263/* confdefs.h. */
14264_ACEOF
14265cat confdefs.h >>conftest.$ac_ext
14266cat >>conftest.$ac_ext <<_ACEOF
14267/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014268
14269/* Override any gcc2 internal prototype to avoid an error. */
14270#ifdef __cplusplus
14271extern "C"
14272#endif
14273/* We use char because int might match the return type of a gcc2
14274 builtin and then its argument prototype would still apply. */
14275char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014276int
14277main ()
14278{
14279inet_aton ();
14280 ;
14281 return 0;
14282}
14283_ACEOF
14284rm -f conftest.$ac_objext conftest$ac_exeext
14285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014286 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014288 grep -v '^ *+' conftest.er1 >conftest.err
14289 rm -f conftest.er1
14290 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14292 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014293 { ac_try='test -z "$ac_c_werror_flag"
14294 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14296 (eval $ac_try) 2>&5
14297 ac_status=$?
14298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14299 (exit $ac_status); }; } &&
14300 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14302 (eval $ac_try) 2>&5
14303 ac_status=$?
14304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14305 (exit $ac_status); }; }; then
14306 ac_cv_lib_resolv_inet_aton=yes
14307else
14308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014309sed 's/^/| /' conftest.$ac_ext >&5
14310
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014311ac_cv_lib_resolv_inet_aton=no
14312fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014313rm -f conftest.err conftest.$ac_objext \
14314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014315LIBS=$ac_check_lib_save_LIBS
14316fi
14317echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14318echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14319if test $ac_cv_lib_resolv_inet_aton = yes; then
14320 cat >>confdefs.h <<_ACEOF
14321#define HAVE_LIBRESOLV 1
14322_ACEOF
14323
14324 LIBS="-lresolv $LIBS"
14325
14326fi
14327
14328
14329fi
14330
14331
Martin v. Löwise9416172003-05-03 10:12:45 +000014332echo "$as_me:$LINENO: checking for hstrerror" >&5
14333echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14334cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014335/* confdefs.h. */
14336_ACEOF
14337cat confdefs.h >>conftest.$ac_ext
14338cat >>conftest.$ac_ext <<_ACEOF
14339/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014340
14341#include "confdefs.h"
14342#include <netdb.h>
14343
Martin v. Löwise9416172003-05-03 10:12:45 +000014344int
14345main ()
14346{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014347void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014348 ;
14349 return 0;
14350}
14351_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014352rm -f conftest.$ac_objext conftest$ac_exeext
14353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014354 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014356 grep -v '^ *+' conftest.er1 >conftest.err
14357 rm -f conftest.er1
14358 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14360 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014361 { ac_try='test -z "$ac_c_werror_flag"
14362 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14364 (eval $ac_try) 2>&5
14365 ac_status=$?
14366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14367 (exit $ac_status); }; } &&
14368 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14370 (eval $ac_try) 2>&5
14371 ac_status=$?
14372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14373 (exit $ac_status); }; }; then
14374
14375cat >>confdefs.h <<\_ACEOF
14376#define HAVE_HSTRERROR 1
14377_ACEOF
14378
14379 echo "$as_me:$LINENO: result: yes" >&5
14380echo "${ECHO_T}yes" >&6
14381else
14382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014383sed 's/^/| /' conftest.$ac_ext >&5
14384
Martin v. Löwise9416172003-05-03 10:12:45 +000014385echo "$as_me:$LINENO: result: no" >&5
14386echo "${ECHO_T}no" >&6
14387
14388fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014389rm -f conftest.err conftest.$ac_objext \
14390 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014391
14392echo "$as_me:$LINENO: checking for inet_aton" >&5
14393echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014395/* confdefs.h. */
14396_ACEOF
14397cat confdefs.h >>conftest.$ac_ext
14398cat >>conftest.$ac_ext <<_ACEOF
14399/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014400
14401#include "confdefs.h"
14402#include <sys/socket.h>
14403#include <netinet/in.h>
14404#include <arpa/inet.h>
14405
Martin v. Löwise9416172003-05-03 10:12:45 +000014406int
14407main ()
14408{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014409void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014410 ;
14411 return 0;
14412}
14413_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014414rm -f conftest.$ac_objext conftest$ac_exeext
14415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014416 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014418 grep -v '^ *+' conftest.er1 >conftest.err
14419 rm -f conftest.er1
14420 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014423 { ac_try='test -z "$ac_c_werror_flag"
14424 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14426 (eval $ac_try) 2>&5
14427 ac_status=$?
14428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14429 (exit $ac_status); }; } &&
14430 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14432 (eval $ac_try) 2>&5
14433 ac_status=$?
14434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14435 (exit $ac_status); }; }; then
14436
14437cat >>confdefs.h <<\_ACEOF
14438#define HAVE_INET_ATON 1
14439_ACEOF
14440
14441 echo "$as_me:$LINENO: result: yes" >&5
14442echo "${ECHO_T}yes" >&6
14443else
14444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014445sed 's/^/| /' conftest.$ac_ext >&5
14446
Martin v. Löwise9416172003-05-03 10:12:45 +000014447echo "$as_me:$LINENO: result: no" >&5
14448echo "${ECHO_T}no" >&6
14449
14450fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014451rm -f conftest.err conftest.$ac_objext \
14452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014453
14454echo "$as_me:$LINENO: checking for inet_pton" >&5
14455echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014457/* confdefs.h. */
14458_ACEOF
14459cat confdefs.h >>conftest.$ac_ext
14460cat >>conftest.$ac_ext <<_ACEOF
14461/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014462
14463#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014464#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014465#include <sys/socket.h>
14466#include <netinet/in.h>
14467#include <arpa/inet.h>
14468
Martin v. Löwise9416172003-05-03 10:12:45 +000014469int
14470main ()
14471{
14472void* p = inet_pton
14473 ;
14474 return 0;
14475}
14476_ACEOF
14477rm -f conftest.$ac_objext
14478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014479 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014481 grep -v '^ *+' conftest.er1 >conftest.err
14482 rm -f conftest.er1
14483 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14485 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014486 { ac_try='test -z "$ac_c_werror_flag"
14487 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14489 (eval $ac_try) 2>&5
14490 ac_status=$?
14491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14492 (exit $ac_status); }; } &&
14493 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14495 (eval $ac_try) 2>&5
14496 ac_status=$?
14497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14498 (exit $ac_status); }; }; then
14499
14500cat >>confdefs.h <<\_ACEOF
14501#define HAVE_INET_PTON 1
14502_ACEOF
14503
14504 echo "$as_me:$LINENO: result: yes" >&5
14505echo "${ECHO_T}yes" >&6
14506else
14507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014508sed 's/^/| /' conftest.$ac_ext >&5
14509
Martin v. Löwise9416172003-05-03 10:12:45 +000014510echo "$as_me:$LINENO: result: no" >&5
14511echo "${ECHO_T}no" >&6
14512
14513fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014515
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014516# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014517echo "$as_me:$LINENO: checking for setgroups" >&5
14518echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14519cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014520/* confdefs.h. */
14521_ACEOF
14522cat confdefs.h >>conftest.$ac_ext
14523cat >>conftest.$ac_ext <<_ACEOF
14524/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014525
14526#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014527#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014528#ifdef HAVE_GRP_H
14529#include <grp.h>
14530#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014531
Martin v. Löwisd5843682002-11-21 20:41:28 +000014532int
14533main ()
14534{
14535void* p = setgroups
14536 ;
14537 return 0;
14538}
14539_ACEOF
14540rm -f conftest.$ac_objext
14541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014542 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014544 grep -v '^ *+' conftest.er1 >conftest.err
14545 rm -f conftest.er1
14546 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14548 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014549 { ac_try='test -z "$ac_c_werror_flag"
14550 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14552 (eval $ac_try) 2>&5
14553 ac_status=$?
14554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14555 (exit $ac_status); }; } &&
14556 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14558 (eval $ac_try) 2>&5
14559 ac_status=$?
14560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14561 (exit $ac_status); }; }; then
14562
14563cat >>confdefs.h <<\_ACEOF
14564#define HAVE_SETGROUPS 1
14565_ACEOF
14566
14567 echo "$as_me:$LINENO: result: yes" >&5
14568echo "${ECHO_T}yes" >&6
14569else
14570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014571sed 's/^/| /' conftest.$ac_ext >&5
14572
Martin v. Löwisd5843682002-11-21 20:41:28 +000014573echo "$as_me:$LINENO: result: no" >&5
14574echo "${ECHO_T}no" >&6
14575
14576fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014577rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014578
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014579# check for openpty and forkpty
14580
Martin v. Löwis11437992002-04-12 09:54:03 +000014581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014582for ac_func in openpty
14583do
Martin v. Löwis11437992002-04-12 09:54:03 +000014584as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14585echo "$as_me:$LINENO: checking for $ac_func" >&5
14586echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14587if eval "test \"\${$as_ac_var+set}\" = set"; then
14588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014589else
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014591/* confdefs.h. */
14592_ACEOF
14593cat confdefs.h >>conftest.$ac_ext
14594cat >>conftest.$ac_ext <<_ACEOF
14595/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014596/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014597 which can conflict with char $ac_func (); below.
14598 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014599 <limits.h> exists even on freestanding compilers. Under hpux,
14600 including <limits.h> includes <sys/time.h> and causes problems
14601 checking for functions defined therein. */
14602#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014603# include <limits.h>
14604#else
14605# include <assert.h>
14606#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014607/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014608#ifdef __cplusplus
14609extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014610{
Martin v. Löwis11437992002-04-12 09:54:03 +000014611#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014612/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 builtin and then its argument prototype would still apply. */
14614char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014615/* The GNU C library defines this for functions which it implements
14616 to always fail with ENOSYS. Some functions are actually named
14617 something starting with __ and the normal name is an alias. */
14618#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14619choke me
14620#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014621char (*f) () = $ac_func;
14622#endif
14623#ifdef __cplusplus
14624}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014625#endif
14626
Skip Montanaro6dead952003-09-25 14:50:04 +000014627int
14628main ()
14629{
14630return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014631 ;
14632 return 0;
14633}
14634_ACEOF
14635rm -f conftest.$ac_objext conftest$ac_exeext
14636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014637 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014639 grep -v '^ *+' conftest.er1 >conftest.err
14640 rm -f conftest.er1
14641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14643 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014644 { ac_try='test -z "$ac_c_werror_flag"
14645 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14647 (eval $ac_try) 2>&5
14648 ac_status=$?
14649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14650 (exit $ac_status); }; } &&
14651 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14653 (eval $ac_try) 2>&5
14654 ac_status=$?
14655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14656 (exit $ac_status); }; }; then
14657 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014658else
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014660sed 's/^/| /' conftest.$ac_ext >&5
14661
Martin v. Löwis11437992002-04-12 09:54:03 +000014662eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014663fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014664rm -f conftest.err conftest.$ac_objext \
14665 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014667echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14668echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14669if test `eval echo '${'$as_ac_var'}'` = yes; then
14670 cat >>confdefs.h <<_ACEOF
14671#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14672_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014673
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014674else
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14676echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14677if test "${ac_cv_lib_util_openpty+set}" = set; then
14678 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014679else
Martin v. Löwis11437992002-04-12 09:54:03 +000014680 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014681LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014683/* confdefs.h. */
14684_ACEOF
14685cat confdefs.h >>conftest.$ac_ext
14686cat >>conftest.$ac_ext <<_ACEOF
14687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
Fred Drake8cef4cf2000-06-28 16:40:38 +000014689/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014690#ifdef __cplusplus
14691extern "C"
14692#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014693/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014694 builtin and then its argument prototype would still apply. */
14695char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014696int
14697main ()
14698{
14699openpty ();
14700 ;
14701 return 0;
14702}
14703_ACEOF
14704rm -f conftest.$ac_objext conftest$ac_exeext
14705if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014706 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014708 grep -v '^ *+' conftest.er1 >conftest.err
14709 rm -f conftest.er1
14710 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014713 { ac_try='test -z "$ac_c_werror_flag"
14714 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14716 (eval $ac_try) 2>&5
14717 ac_status=$?
14718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14719 (exit $ac_status); }; } &&
14720 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14722 (eval $ac_try) 2>&5
14723 ac_status=$?
14724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14725 (exit $ac_status); }; }; then
14726 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014727else
Martin v. Löwis11437992002-04-12 09:54:03 +000014728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014729sed 's/^/| /' conftest.$ac_ext >&5
14730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014732fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014733rm -f conftest.err conftest.$ac_objext \
14734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014735LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014737echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14738echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14739if test $ac_cv_lib_util_openpty = yes; then
14740 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014741#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014742_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014743 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014744fi
14745
14746fi
14747done
14748
Martin v. Löwis11437992002-04-12 09:54:03 +000014749
Fred Drake8cef4cf2000-06-28 16:40:38 +000014750for ac_func in forkpty
14751do
Martin v. Löwis11437992002-04-12 09:54:03 +000014752as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14753echo "$as_me:$LINENO: checking for $ac_func" >&5
14754echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14755if eval "test \"\${$as_ac_var+set}\" = set"; then
14756 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014757else
Martin v. Löwis11437992002-04-12 09:54:03 +000014758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014759/* confdefs.h. */
14760_ACEOF
14761cat confdefs.h >>conftest.$ac_ext
14762cat >>conftest.$ac_ext <<_ACEOF
14763/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014764/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014765 which can conflict with char $ac_func (); below.
14766 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014767 <limits.h> exists even on freestanding compilers. Under hpux,
14768 including <limits.h> includes <sys/time.h> and causes problems
14769 checking for functions defined therein. */
14770#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014771# include <limits.h>
14772#else
14773# include <assert.h>
14774#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014775/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014776#ifdef __cplusplus
14777extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014778{
Martin v. Löwis11437992002-04-12 09:54:03 +000014779#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014780/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 builtin and then its argument prototype would still apply. */
14782char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014783/* The GNU C library defines this for functions which it implements
14784 to always fail with ENOSYS. Some functions are actually named
14785 something starting with __ and the normal name is an alias. */
14786#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14787choke me
14788#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014789char (*f) () = $ac_func;
14790#endif
14791#ifdef __cplusplus
14792}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014793#endif
14794
Skip Montanaro6dead952003-09-25 14:50:04 +000014795int
14796main ()
14797{
14798return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014799 ;
14800 return 0;
14801}
14802_ACEOF
14803rm -f conftest.$ac_objext conftest$ac_exeext
14804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014805 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014807 grep -v '^ *+' conftest.er1 >conftest.err
14808 rm -f conftest.er1
14809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14811 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014812 { ac_try='test -z "$ac_c_werror_flag"
14813 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14815 (eval $ac_try) 2>&5
14816 ac_status=$?
14817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14818 (exit $ac_status); }; } &&
14819 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14821 (eval $ac_try) 2>&5
14822 ac_status=$?
14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14824 (exit $ac_status); }; }; then
14825 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014826else
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014828sed 's/^/| /' conftest.$ac_ext >&5
14829
Martin v. Löwis11437992002-04-12 09:54:03 +000014830eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014831fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014832rm -f conftest.err conftest.$ac_objext \
14833 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014835echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14836echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14837if test `eval echo '${'$as_ac_var'}'` = yes; then
14838 cat >>confdefs.h <<_ACEOF
14839#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14840_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014841
Fred Drake8cef4cf2000-06-28 16:40:38 +000014842else
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14844echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14845if test "${ac_cv_lib_util_forkpty+set}" = set; then
14846 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014847else
Martin v. Löwis11437992002-04-12 09:54:03 +000014848 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014849LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014850cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014851/* confdefs.h. */
14852_ACEOF
14853cat confdefs.h >>conftest.$ac_ext
14854cat >>conftest.$ac_ext <<_ACEOF
14855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014856
Fred Drake8cef4cf2000-06-28 16:40:38 +000014857/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014858#ifdef __cplusplus
14859extern "C"
14860#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014861/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014862 builtin and then its argument prototype would still apply. */
14863char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014864int
14865main ()
14866{
14867forkpty ();
14868 ;
14869 return 0;
14870}
14871_ACEOF
14872rm -f conftest.$ac_objext conftest$ac_exeext
14873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014874 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014876 grep -v '^ *+' conftest.er1 >conftest.err
14877 rm -f conftest.er1
14878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14880 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014881 { ac_try='test -z "$ac_c_werror_flag"
14882 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14884 (eval $ac_try) 2>&5
14885 ac_status=$?
14886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14887 (exit $ac_status); }; } &&
14888 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14890 (eval $ac_try) 2>&5
14891 ac_status=$?
14892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14893 (exit $ac_status); }; }; then
14894 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014895else
Martin v. Löwis11437992002-04-12 09:54:03 +000014896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014897sed 's/^/| /' conftest.$ac_ext >&5
14898
Martin v. Löwis11437992002-04-12 09:54:03 +000014899ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014900fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014901rm -f conftest.err conftest.$ac_objext \
14902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014903LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014904fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014905echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14906echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14907if test $ac_cv_lib_util_forkpty = yes; then
14908 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014909#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014910_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014911 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014912fi
14913
14914fi
14915done
14916
Jack Jansendd19cf82001-12-06 22:36:17 +000014917
Michael W. Hudson54241132001-12-07 15:38:26 +000014918# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
14920
14921
14922
14923
14924
Fred Drake8cef4cf2000-06-28 16:40:38 +000014925for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14926do
Martin v. Löwis11437992002-04-12 09:54:03 +000014927as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14928echo "$as_me:$LINENO: checking for $ac_func" >&5
14929echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14930if eval "test \"\${$as_ac_var+set}\" = set"; then
14931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014932else
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014934/* confdefs.h. */
14935_ACEOF
14936cat confdefs.h >>conftest.$ac_ext
14937cat >>conftest.$ac_ext <<_ACEOF
14938/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014939/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014940 which can conflict with char $ac_func (); below.
14941 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014942 <limits.h> exists even on freestanding compilers. Under hpux,
14943 including <limits.h> includes <sys/time.h> and causes problems
14944 checking for functions defined therein. */
14945#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014946# include <limits.h>
14947#else
14948# include <assert.h>
14949#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014950/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014951#ifdef __cplusplus
14952extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014953{
Martin v. Löwis11437992002-04-12 09:54:03 +000014954#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014955/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 builtin and then its argument prototype would still apply. */
14957char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014958/* The GNU C library defines this for functions which it implements
14959 to always fail with ENOSYS. Some functions are actually named
14960 something starting with __ and the normal name is an alias. */
14961#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14962choke me
14963#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014964char (*f) () = $ac_func;
14965#endif
14966#ifdef __cplusplus
14967}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014968#endif
14969
Skip Montanaro6dead952003-09-25 14:50:04 +000014970int
14971main ()
14972{
14973return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 ;
14975 return 0;
14976}
14977_ACEOF
14978rm -f conftest.$ac_objext conftest$ac_exeext
14979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014980 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014982 grep -v '^ *+' conftest.er1 >conftest.err
14983 rm -f conftest.er1
14984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14986 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014987 { ac_try='test -z "$ac_c_werror_flag"
14988 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14990 (eval $ac_try) 2>&5
14991 ac_status=$?
14992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14993 (exit $ac_status); }; } &&
14994 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14996 (eval $ac_try) 2>&5
14997 ac_status=$?
14998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14999 (exit $ac_status); }; }; then
15000 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015001else
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015003sed 's/^/| /' conftest.$ac_ext >&5
15004
Martin v. Löwis11437992002-04-12 09:54:03 +000015005eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015006fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015007rm -f conftest.err conftest.$ac_objext \
15008 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015010echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15011echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15012if test `eval echo '${'$as_ac_var'}'` = yes; then
15013 cat >>confdefs.h <<_ACEOF
15014#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15015_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015016
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015017fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015018done
15019
Michael W. Hudson54241132001-12-07 15:38:26 +000015020
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
15022
15023
15024
15025
Martin v. Löwis1142de32002-03-29 16:28:31 +000015026for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000015027do
Martin v. Löwis11437992002-04-12 09:54:03 +000015028as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15029echo "$as_me:$LINENO: checking for $ac_func" >&5
15030echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15031if eval "test \"\${$as_ac_var+set}\" = set"; then
15032 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015033else
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015035/* confdefs.h. */
15036_ACEOF
15037cat confdefs.h >>conftest.$ac_ext
15038cat >>conftest.$ac_ext <<_ACEOF
15039/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015040/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015041 which can conflict with char $ac_func (); below.
15042 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015043 <limits.h> exists even on freestanding compilers. Under hpux,
15044 including <limits.h> includes <sys/time.h> and causes problems
15045 checking for functions defined therein. */
15046#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015047# include <limits.h>
15048#else
15049# include <assert.h>
15050#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015051/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015052#ifdef __cplusplus
15053extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015054{
Martin v. Löwis11437992002-04-12 09:54:03 +000015055#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015056/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 builtin and then its argument prototype would still apply. */
15058char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015059/* The GNU C library defines this for functions which it implements
15060 to always fail with ENOSYS. Some functions are actually named
15061 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015062#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015063choke me
15064#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015065char (*f) () = $ac_func;
15066#endif
15067#ifdef __cplusplus
15068}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015069#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015070
Skip Montanaro6dead952003-09-25 14:50:04 +000015071int
15072main ()
15073{
15074return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 ;
15076 return 0;
15077}
15078_ACEOF
15079rm -f conftest.$ac_objext conftest$ac_exeext
15080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015081 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015083 grep -v '^ *+' conftest.er1 >conftest.err
15084 rm -f conftest.er1
15085 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15087 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015088 { ac_try='test -z "$ac_c_werror_flag"
15089 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15091 (eval $ac_try) 2>&5
15092 ac_status=$?
15093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15094 (exit $ac_status); }; } &&
15095 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15097 (eval $ac_try) 2>&5
15098 ac_status=$?
15099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100 (exit $ac_status); }; }; then
15101 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015102else
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015104sed 's/^/| /' conftest.$ac_ext >&5
15105
Martin v. Löwis11437992002-04-12 09:54:03 +000015106eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015107fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015108rm -f conftest.err conftest.$ac_objext \
15109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015111echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15112echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15113if test `eval echo '${'$as_ac_var'}'` = yes; then
15114 cat >>confdefs.h <<_ACEOF
15115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15116_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015117
Martin v. Löwis1142de32002-03-29 16:28:31 +000015118else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015119 case $LIBOBJS in
15120 "$ac_func.$ac_objext" | \
15121 *" $ac_func.$ac_objext" | \
15122 "$ac_func.$ac_objext "* | \
15123 *" $ac_func.$ac_objext "* ) ;;
15124 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15125esac
15126
Martin v. Löwis1142de32002-03-29 16:28:31 +000015127fi
15128done
15129
15130
Martin v. Löwis11437992002-04-12 09:54:03 +000015131
Martin v. Löwis1142de32002-03-29 16:28:31 +000015132for ac_func in getpgrp
15133do
Martin v. Löwis11437992002-04-12 09:54:03 +000015134as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15135echo "$as_me:$LINENO: checking for $ac_func" >&5
15136echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15137if eval "test \"\${$as_ac_var+set}\" = set"; then
15138 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015139else
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015141/* confdefs.h. */
15142_ACEOF
15143cat confdefs.h >>conftest.$ac_ext
15144cat >>conftest.$ac_ext <<_ACEOF
15145/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000015146/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015147 which can conflict with char $ac_func (); below.
15148 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015149 <limits.h> exists even on freestanding compilers. Under hpux,
15150 including <limits.h> includes <sys/time.h> and causes problems
15151 checking for functions defined therein. */
15152#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015153# include <limits.h>
15154#else
15155# include <assert.h>
15156#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015157/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015158#ifdef __cplusplus
15159extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015160{
Martin v. Löwis11437992002-04-12 09:54:03 +000015161#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015162/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 builtin and then its argument prototype would still apply. */
15164char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015165/* The GNU C library defines this for functions which it implements
15166 to always fail with ENOSYS. Some functions are actually named
15167 something starting with __ and the normal name is an alias. */
15168#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15169choke me
15170#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015171char (*f) () = $ac_func;
15172#endif
15173#ifdef __cplusplus
15174}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015175#endif
15176
Skip Montanaro6dead952003-09-25 14:50:04 +000015177int
15178main ()
15179{
15180return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 ;
15182 return 0;
15183}
15184_ACEOF
15185rm -f conftest.$ac_objext conftest$ac_exeext
15186if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015187 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015189 grep -v '^ *+' conftest.er1 >conftest.err
15190 rm -f conftest.er1
15191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15193 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015194 { ac_try='test -z "$ac_c_werror_flag"
15195 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
15201 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15203 (eval $ac_try) 2>&5
15204 ac_status=$?
15205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15206 (exit $ac_status); }; }; then
15207 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015208else
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015210sed 's/^/| /' conftest.$ac_ext >&5
15211
Martin v. Löwis11437992002-04-12 09:54:03 +000015212eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015213fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015214rm -f conftest.err conftest.$ac_objext \
15215 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015216fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015217echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15218echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15219if test `eval echo '${'$as_ac_var'}'` = yes; then
15220 cat >>confdefs.h <<_ACEOF
15221#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15222_ACEOF
15223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015224/* confdefs.h. */
15225_ACEOF
15226cat confdefs.h >>conftest.$ac_ext
15227cat >>conftest.$ac_ext <<_ACEOF
15228/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015229#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015230int
15231main ()
15232{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015233getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 ;
15235 return 0;
15236}
15237_ACEOF
15238rm -f conftest.$ac_objext
15239if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015240 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015242 grep -v '^ *+' conftest.er1 >conftest.err
15243 rm -f conftest.er1
15244 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15246 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015247 { ac_try='test -z "$ac_c_werror_flag"
15248 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15250 (eval $ac_try) 2>&5
15251 ac_status=$?
15252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15253 (exit $ac_status); }; } &&
15254 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15256 (eval $ac_try) 2>&5
15257 ac_status=$?
15258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15259 (exit $ac_status); }; }; then
15260
15261cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015262#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015263_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015264
Martin v. Löwis11437992002-04-12 09:54:03 +000015265
Guido van Rossumf78abae1997-01-21 22:02:36 +000015266else
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015268sed 's/^/| /' conftest.$ac_ext >&5
15269
Guido van Rossum627b2d71993-12-24 10:39:16 +000015270fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015271rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015272
Guido van Rossum627b2d71993-12-24 10:39:16 +000015273fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015274done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015275
Jack Jansen150753c2003-03-29 22:07:47 +000015276
15277for ac_func in setpgrp
15278do
15279as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15280echo "$as_me:$LINENO: checking for $ac_func" >&5
15281echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15282if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015284else
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015286/* confdefs.h. */
15287_ACEOF
15288cat confdefs.h >>conftest.$ac_ext
15289cat >>conftest.$ac_ext <<_ACEOF
15290/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015291/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015292 which can conflict with char $ac_func (); below.
15293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015294 <limits.h> exists even on freestanding compilers. Under hpux,
15295 including <limits.h> includes <sys/time.h> and causes problems
15296 checking for functions defined therein. */
15297#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015298# include <limits.h>
15299#else
15300# include <assert.h>
15301#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015302/* Override any gcc2 internal prototype to avoid an error. */
15303#ifdef __cplusplus
15304extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015305{
Martin v. Löwis11437992002-04-12 09:54:03 +000015306#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015307/* We use char because int might match the return type of a gcc2
15308 builtin and then its argument prototype would still apply. */
15309char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015310/* The GNU C library defines this for functions which it implements
15311 to always fail with ENOSYS. Some functions are actually named
15312 something starting with __ and the normal name is an alias. */
15313#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15314choke me
15315#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015316char (*f) () = $ac_func;
15317#endif
15318#ifdef __cplusplus
15319}
Jack Jansen150753c2003-03-29 22:07:47 +000015320#endif
15321
Skip Montanaro6dead952003-09-25 14:50:04 +000015322int
15323main ()
15324{
15325return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 ;
15327 return 0;
15328}
15329_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015330rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015332 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015334 grep -v '^ *+' conftest.er1 >conftest.err
15335 rm -f conftest.er1
15336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015338 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015339 { ac_try='test -z "$ac_c_werror_flag"
15340 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
15346 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15348 (eval $ac_try) 2>&5
15349 ac_status=$?
15350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15351 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015352 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015353else
Jack Jansen150753c2003-03-29 22:07:47 +000015354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015355sed 's/^/| /' conftest.$ac_ext >&5
15356
Jack Jansen150753c2003-03-29 22:07:47 +000015357eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015358fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015359rm -f conftest.err conftest.$ac_objext \
15360 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015361fi
Jack Jansen150753c2003-03-29 22:07:47 +000015362echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15363echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15364if test `eval echo '${'$as_ac_var'}'` = yes; then
15365 cat >>confdefs.h <<_ACEOF
15366#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15367_ACEOF
15368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015369/* confdefs.h. */
15370_ACEOF
15371cat confdefs.h >>conftest.$ac_ext
15372cat >>conftest.$ac_ext <<_ACEOF
15373/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015374#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015375int
15376main ()
15377{
15378setpgrp(0,0);
15379 ;
15380 return 0;
15381}
15382_ACEOF
15383rm -f conftest.$ac_objext
15384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015385 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015387 grep -v '^ *+' conftest.er1 >conftest.err
15388 rm -f conftest.er1
15389 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15391 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015392 { ac_try='test -z "$ac_c_werror_flag"
15393 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15395 (eval $ac_try) 2>&5
15396 ac_status=$?
15397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15398 (exit $ac_status); }; } &&
15399 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000015400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15401 (eval $ac_try) 2>&5
15402 ac_status=$?
15403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15404 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015405
15406cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015407#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015408_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015409
Jack Jansen150753c2003-03-29 22:07:47 +000015410
15411else
15412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015413sed 's/^/| /' conftest.$ac_ext >&5
15414
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015415fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015416rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015417
15418fi
15419done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015420
Martin v. Löwis11437992002-04-12 09:54:03 +000015421
Thomas Wouters3a584202000-08-05 23:28:51 +000015422for ac_func in gettimeofday
15423do
Martin v. Löwis11437992002-04-12 09:54:03 +000015424as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15425echo "$as_me:$LINENO: checking for $ac_func" >&5
15426echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15427if eval "test \"\${$as_ac_var+set}\" = set"; then
15428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015429else
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015431/* confdefs.h. */
15432_ACEOF
15433cat confdefs.h >>conftest.$ac_ext
15434cat >>conftest.$ac_ext <<_ACEOF
15435/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015436/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015437 which can conflict with char $ac_func (); below.
15438 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015439 <limits.h> exists even on freestanding compilers. Under hpux,
15440 including <limits.h> includes <sys/time.h> and causes problems
15441 checking for functions defined therein. */
15442#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015443# include <limits.h>
15444#else
15445# include <assert.h>
15446#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015447/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015448#ifdef __cplusplus
15449extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015450{
Martin v. Löwis11437992002-04-12 09:54:03 +000015451#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015452/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 builtin and then its argument prototype would still apply. */
15454char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015455/* The GNU C library defines this for functions which it implements
15456 to always fail with ENOSYS. Some functions are actually named
15457 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015458#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015459choke me
15460#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015461char (*f) () = $ac_func;
15462#endif
15463#ifdef __cplusplus
15464}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015465#endif
15466
Skip Montanaro6dead952003-09-25 14:50:04 +000015467int
15468main ()
15469{
15470return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 ;
15472 return 0;
15473}
15474_ACEOF
15475rm -f conftest.$ac_objext conftest$ac_exeext
15476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015477 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015479 grep -v '^ *+' conftest.er1 >conftest.err
15480 rm -f conftest.er1
15481 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015484 { ac_try='test -z "$ac_c_werror_flag"
15485 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
15491 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15493 (eval $ac_try) 2>&5
15494 ac_status=$?
15495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15496 (exit $ac_status); }; }; then
15497 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015498else
Martin v. Löwis11437992002-04-12 09:54:03 +000015499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015500sed 's/^/| /' conftest.$ac_ext >&5
15501
Martin v. Löwis11437992002-04-12 09:54:03 +000015502eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015503fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015504rm -f conftest.err conftest.$ac_objext \
15505 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015507echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15508echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15509if test `eval echo '${'$as_ac_var'}'` = yes; then
15510 cat >>confdefs.h <<_ACEOF
15511#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15512_ACEOF
15513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* confdefs.h. */
15515_ACEOF
15516cat confdefs.h >>conftest.$ac_ext
15517cat >>conftest.$ac_ext <<_ACEOF
15518/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015519#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015520int
15521main ()
15522{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015523gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015524 ;
15525 return 0;
15526}
15527_ACEOF
15528rm -f conftest.$ac_objext
15529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015530 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015532 grep -v '^ *+' conftest.er1 >conftest.err
15533 rm -f conftest.er1
15534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15536 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015537 { ac_try='test -z "$ac_c_werror_flag"
15538 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15540 (eval $ac_try) 2>&5
15541 ac_status=$?
15542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15543 (exit $ac_status); }; } &&
15544 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15546 (eval $ac_try) 2>&5
15547 ac_status=$?
15548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015550 :
15551else
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015553sed 's/^/| /' conftest.$ac_ext >&5
15554
Martin v. Löwis11437992002-04-12 09:54:03 +000015555
15556cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015557#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015558_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015559
Martin v. Löwis11437992002-04-12 09:54:03 +000015560
Guido van Rossum627b2d71993-12-24 10:39:16 +000015561fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015563
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015564fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015565done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015566
Michael W. Hudson54241132001-12-07 15:38:26 +000015567
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015568echo "$as_me:$LINENO: checking for major" >&5
15569echo $ECHO_N "checking for major... $ECHO_C" >&6
15570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015571/* confdefs.h. */
15572_ACEOF
15573cat confdefs.h >>conftest.$ac_ext
15574cat >>conftest.$ac_ext <<_ACEOF
15575/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015576
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015577#if defined(MAJOR_IN_MKDEV)
15578#include <sys/mkdev.h>
15579#elif defined(MAJOR_IN_SYSMACROS)
15580#include <sys/sysmacros.h>
15581#else
15582#include <sys/types.h>
15583#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015584
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015585int
15586main ()
15587{
15588
15589 makedev(major(0),minor(0));
15590
15591 ;
15592 return 0;
15593}
15594_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000015595rm -f conftest.$ac_objext conftest$ac_exeext
15596if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015597 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015599 grep -v '^ *+' conftest.er1 >conftest.err
15600 rm -f conftest.er1
15601 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15603 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015604 { ac_try='test -z "$ac_c_werror_flag"
15605 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15607 (eval $ac_try) 2>&5
15608 ac_status=$?
15609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15610 (exit $ac_status); }; } &&
15611 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15613 (eval $ac_try) 2>&5
15614 ac_status=$?
15615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15616 (exit $ac_status); }; }; then
15617
15618
15619cat >>confdefs.h <<\_ACEOF
15620#define HAVE_DEVICE_MACROS 1
15621_ACEOF
15622
15623 echo "$as_me:$LINENO: result: yes" >&5
15624echo "${ECHO_T}yes" >&6
15625
15626else
15627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015628sed 's/^/| /' conftest.$ac_ext >&5
15629
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015630
15631 echo "$as_me:$LINENO: result: no" >&5
15632echo "${ECHO_T}no" >&6
15633
15634fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015635rm -f conftest.err conftest.$ac_objext \
15636 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015637
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015638# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015639# for [no]getaddrinfo in netdb.h.
15640echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15641echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
15642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015643/* confdefs.h. */
15644_ACEOF
15645cat confdefs.h >>conftest.$ac_ext
15646cat >>conftest.$ac_ext <<_ACEOF
15647/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015648
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015649#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015650#include <sys/socket.h>
15651#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015652#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015653
Martin v. Löwis11437992002-04-12 09:54:03 +000015654int
15655main ()
15656{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015657
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015658getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 ;
15661 return 0;
15662}
15663_ACEOF
15664rm -f conftest.$ac_objext conftest$ac_exeext
15665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015666 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015668 grep -v '^ *+' conftest.er1 >conftest.err
15669 rm -f conftest.er1
15670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15672 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015673 { ac_try='test -z "$ac_c_werror_flag"
15674 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15676 (eval $ac_try) 2>&5
15677 ac_status=$?
15678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15679 (exit $ac_status); }; } &&
15680 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15682 (eval $ac_try) 2>&5
15683 ac_status=$?
15684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685 (exit $ac_status); }; }; then
15686
15687echo "$as_me:$LINENO: result: yes" >&5
15688echo "${ECHO_T}yes" >&6
15689echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
15690echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015691if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015692 echo "$as_me:$LINENO: result: buggy" >&5
15693echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015694buggygetaddrinfo=yes
15695else
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015697/* confdefs.h. */
15698_ACEOF
15699cat confdefs.h >>conftest.$ac_ext
15700cat >>conftest.$ac_ext <<_ACEOF
15701/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015702
15703#include <sys/types.h>
15704#include <netdb.h>
15705#include <string.h>
15706#include <sys/socket.h>
15707#include <netinet/in.h>
15708
15709main()
15710{
15711 int passive, gaierr, inet4 = 0, inet6 = 0;
15712 struct addrinfo hints, *ai, *aitop;
15713 char straddr[INET6_ADDRSTRLEN], strport[16];
15714
15715 for (passive = 0; passive <= 1; passive++) {
15716 memset(&hints, 0, sizeof(hints));
15717 hints.ai_family = AF_UNSPEC;
15718 hints.ai_flags = passive ? AI_PASSIVE : 0;
15719 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015720 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015721 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15722 (void)gai_strerror(gaierr);
15723 goto bad;
15724 }
15725 for (ai = aitop; ai; ai = ai->ai_next) {
15726 if (ai->ai_addr == NULL ||
15727 ai->ai_addrlen == 0 ||
15728 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15729 straddr, sizeof(straddr), strport, sizeof(strport),
15730 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15731 goto bad;
15732 }
15733 switch (ai->ai_family) {
15734 case AF_INET:
15735 if (strcmp(strport, "54321") != 0) {
15736 goto bad;
15737 }
15738 if (passive) {
15739 if (strcmp(straddr, "0.0.0.0") != 0) {
15740 goto bad;
15741 }
15742 } else {
15743 if (strcmp(straddr, "127.0.0.1") != 0) {
15744 goto bad;
15745 }
15746 }
15747 inet4++;
15748 break;
15749 case AF_INET6:
15750 if (strcmp(strport, "54321") != 0) {
15751 goto bad;
15752 }
15753 if (passive) {
15754 if (strcmp(straddr, "::") != 0) {
15755 goto bad;
15756 }
15757 } else {
15758 if (strcmp(straddr, "::1") != 0) {
15759 goto bad;
15760 }
15761 }
15762 inet6++;
15763 break;
15764 case AF_UNSPEC:
15765 goto bad;
15766 break;
15767 default:
15768 /* another family support? */
15769 break;
15770 }
15771 }
15772 }
15773
15774 if (!(inet4 == 0 || inet4 == 2))
15775 goto bad;
15776 if (!(inet6 == 0 || inet6 == 2))
15777 goto bad;
15778
15779 if (aitop)
15780 freeaddrinfo(aitop);
15781 exit(0);
15782
15783 bad:
15784 if (aitop)
15785 freeaddrinfo(aitop);
15786 exit(1);
15787}
15788
Martin v. Löwis11437992002-04-12 09:54:03 +000015789_ACEOF
15790rm -f conftest$ac_exeext
15791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15792 (eval $ac_link) 2>&5
15793 ac_status=$?
15794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15797 (eval $ac_try) 2>&5
15798 ac_status=$?
15799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15800 (exit $ac_status); }; }; then
15801 echo "$as_me:$LINENO: result: good" >&5
15802echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015803buggygetaddrinfo=no
15804else
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 echo "$as_me: program exited with status $ac_status" >&5
15806echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015807sed 's/^/| /' conftest.$ac_ext >&5
15808
Martin v. Löwis11437992002-04-12 09:54:03 +000015809( exit $ac_status )
15810echo "$as_me:$LINENO: result: buggy" >&5
15811echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015812buggygetaddrinfo=yes
15813fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015814rm -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 +000015815fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015816else
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015818sed 's/^/| /' conftest.$ac_ext >&5
15819
Martin v. Löwis11437992002-04-12 09:54:03 +000015820
15821echo "$as_me:$LINENO: result: no" >&5
15822echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015823buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015824
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015825fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015826rm -f conftest.err conftest.$ac_objext \
15827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015828
15829if test "$buggygetaddrinfo" = "yes"; then
15830 if test "$ipv6" = "yes"; then
15831 echo 'Fatal: You must get working getaddrinfo() function.'
15832 echo ' or you can specify "--disable-ipv6"'.
15833 exit 1
15834 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015835else
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
15837cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015838#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015839_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015840
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015841fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015842
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015843for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015844do
Martin v. Löwis11437992002-04-12 09:54:03 +000015845as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15846echo "$as_me:$LINENO: checking for $ac_func" >&5
15847echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15848if eval "test \"\${$as_ac_var+set}\" = set"; then
15849 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015850else
Martin v. Löwis11437992002-04-12 09:54:03 +000015851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015852/* confdefs.h. */
15853_ACEOF
15854cat confdefs.h >>conftest.$ac_ext
15855cat >>conftest.$ac_ext <<_ACEOF
15856/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015857/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015858 which can conflict with char $ac_func (); below.
15859 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015860 <limits.h> exists even on freestanding compilers. Under hpux,
15861 including <limits.h> includes <sys/time.h> and causes problems
15862 checking for functions defined therein. */
15863#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015864# include <limits.h>
15865#else
15866# include <assert.h>
15867#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015868/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015869#ifdef __cplusplus
15870extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015871{
Martin v. Löwis11437992002-04-12 09:54:03 +000015872#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015873/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 builtin and then its argument prototype would still apply. */
15875char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015876/* The GNU C library defines this for functions which it implements
15877 to always fail with ENOSYS. Some functions are actually named
15878 something starting with __ and the normal name is an alias. */
15879#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15880choke me
15881#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015882char (*f) () = $ac_func;
15883#endif
15884#ifdef __cplusplus
15885}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015886#endif
15887
Skip Montanaro6dead952003-09-25 14:50:04 +000015888int
15889main ()
15890{
15891return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 ;
15893 return 0;
15894}
15895_ACEOF
15896rm -f conftest.$ac_objext conftest$ac_exeext
15897if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015898 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015900 grep -v '^ *+' conftest.er1 >conftest.err
15901 rm -f conftest.er1
15902 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15904 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015905 { ac_try='test -z "$ac_c_werror_flag"
15906 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15908 (eval $ac_try) 2>&5
15909 ac_status=$?
15910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15911 (exit $ac_status); }; } &&
15912 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15914 (eval $ac_try) 2>&5
15915 ac_status=$?
15916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15917 (exit $ac_status); }; }; then
15918 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015919else
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015921sed 's/^/| /' conftest.$ac_ext >&5
15922
Martin v. Löwis11437992002-04-12 09:54:03 +000015923eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015924fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015925rm -f conftest.err conftest.$ac_objext \
15926 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015928echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15929echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15930if test `eval echo '${'$as_ac_var'}'` = yes; then
15931 cat >>confdefs.h <<_ACEOF
15932#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15933_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015934
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015935fi
15936done
15937
Michael W. Hudson54241132001-12-07 15:38:26 +000015938
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015939# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015940echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15941echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15942if test "${ac_cv_header_time+set}" = set; then
15943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015944else
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015946/* confdefs.h. */
15947_ACEOF
15948cat confdefs.h >>conftest.$ac_ext
15949cat >>conftest.$ac_ext <<_ACEOF
15950/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015951#include <sys/types.h>
15952#include <sys/time.h>
15953#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015954
Martin v. Löwis11437992002-04-12 09:54:03 +000015955int
15956main ()
15957{
15958if ((struct tm *) 0)
15959return 0;
15960 ;
15961 return 0;
15962}
15963_ACEOF
15964rm -f conftest.$ac_objext
15965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015966 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015968 grep -v '^ *+' conftest.er1 >conftest.err
15969 rm -f conftest.er1
15970 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15972 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015973 { ac_try='test -z "$ac_c_werror_flag"
15974 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15976 (eval $ac_try) 2>&5
15977 ac_status=$?
15978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15979 (exit $ac_status); }; } &&
15980 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15982 (eval $ac_try) 2>&5
15983 ac_status=$?
15984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15985 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015986 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015987else
Martin v. Löwis11437992002-04-12 09:54:03 +000015988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015989sed 's/^/| /' conftest.$ac_ext >&5
15990
Martin v. Löwis11437992002-04-12 09:54:03 +000015991ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015992fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015994fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015995echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15996echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015997if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015998
15999cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016000#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016001_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016002
16003fi
16004
Martin v. Löwis11437992002-04-12 09:54:03 +000016005echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
16006echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
16007if test "${ac_cv_struct_tm+set}" = set; then
16008 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016009else
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016011/* confdefs.h. */
16012_ACEOF
16013cat confdefs.h >>conftest.$ac_ext
16014cat >>conftest.$ac_ext <<_ACEOF
16015/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016016#include <sys/types.h>
16017#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016018
Martin v. Löwis11437992002-04-12 09:54:03 +000016019int
16020main ()
16021{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016022struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 ;
16024 return 0;
16025}
16026_ACEOF
16027rm -f conftest.$ac_objext
16028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016029 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016031 grep -v '^ *+' conftest.er1 >conftest.err
16032 rm -f conftest.er1
16033 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16035 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016036 { ac_try='test -z "$ac_c_werror_flag"
16037 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16039 (eval $ac_try) 2>&5
16040 ac_status=$?
16041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16042 (exit $ac_status); }; } &&
16043 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16045 (eval $ac_try) 2>&5
16046 ac_status=$?
16047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16048 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016049 ac_cv_struct_tm=time.h
16050else
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016052sed 's/^/| /' conftest.$ac_ext >&5
16053
Martin v. Löwis11437992002-04-12 09:54:03 +000016054ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016055fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016056rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016057fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016058echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16059echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016060if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016061
16062cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016063#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016064_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016065
16066fi
16067
Martin v. Löwis11437992002-04-12 09:54:03 +000016068echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16069echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16070if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16071 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016072else
Martin v. Löwis11437992002-04-12 09:54:03 +000016073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016074/* confdefs.h. */
16075_ACEOF
16076cat confdefs.h >>conftest.$ac_ext
16077cat >>conftest.$ac_ext <<_ACEOF
16078/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016079#include <sys/types.h>
16080#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016081
16082
Martin v. Löwis11437992002-04-12 09:54:03 +000016083int
16084main ()
16085{
16086static struct tm ac_aggr;
16087if (ac_aggr.tm_zone)
16088return 0;
16089 ;
16090 return 0;
16091}
16092_ACEOF
16093rm -f conftest.$ac_objext
16094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016095 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016097 grep -v '^ *+' conftest.er1 >conftest.err
16098 rm -f conftest.er1
16099 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16101 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016102 { ac_try='test -z "$ac_c_werror_flag"
16103 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16105 (eval $ac_try) 2>&5
16106 ac_status=$?
16107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16108 (exit $ac_status); }; } &&
16109 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16111 (eval $ac_try) 2>&5
16112 ac_status=$?
16113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16114 (exit $ac_status); }; }; then
16115 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016116else
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016118sed 's/^/| /' conftest.$ac_ext >&5
16119
16120cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016121/* confdefs.h. */
16122_ACEOF
16123cat confdefs.h >>conftest.$ac_ext
16124cat >>conftest.$ac_ext <<_ACEOF
16125/* end confdefs.h. */
16126#include <sys/types.h>
16127#include <$ac_cv_struct_tm>
16128
16129
16130int
16131main ()
16132{
16133static struct tm ac_aggr;
16134if (sizeof ac_aggr.tm_zone)
16135return 0;
16136 ;
16137 return 0;
16138}
16139_ACEOF
16140rm -f conftest.$ac_objext
16141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016142 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016144 grep -v '^ *+' conftest.er1 >conftest.err
16145 rm -f conftest.er1
16146 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16148 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016149 { ac_try='test -z "$ac_c_werror_flag"
16150 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16152 (eval $ac_try) 2>&5
16153 ac_status=$?
16154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16155 (exit $ac_status); }; } &&
16156 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16158 (eval $ac_try) 2>&5
16159 ac_status=$?
16160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16161 (exit $ac_status); }; }; then
16162 ac_cv_member_struct_tm_tm_zone=yes
16163else
16164 echo "$as_me: failed program was:" >&5
16165sed 's/^/| /' conftest.$ac_ext >&5
16166
Martin v. Löwis11437992002-04-12 09:54:03 +000016167ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016168fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016169rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016170fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016173echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16174echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16175if test $ac_cv_member_struct_tm_tm_zone = yes; then
16176
16177cat >>confdefs.h <<_ACEOF
16178#define HAVE_STRUCT_TM_TM_ZONE 1
16179_ACEOF
16180
16181
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016182fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016183
Martin v. Löwis11437992002-04-12 09:54:03 +000016184if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16185
16186cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016187#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016188_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016189
16190else
Martin v. Löwis11437992002-04-12 09:54:03 +000016191 echo "$as_me:$LINENO: checking for tzname" >&5
16192echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16193if test "${ac_cv_var_tzname+set}" = set; then
16194 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016195else
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016197/* confdefs.h. */
16198_ACEOF
16199cat confdefs.h >>conftest.$ac_ext
16200cat >>conftest.$ac_ext <<_ACEOF
16201/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016202#include <time.h>
16203#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016204extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016206
Martin v. Löwis11437992002-04-12 09:54:03 +000016207int
16208main ()
16209{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016210atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016211 ;
16212 return 0;
16213}
16214_ACEOF
16215rm -f conftest.$ac_objext conftest$ac_exeext
16216if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016217 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016219 grep -v '^ *+' conftest.er1 >conftest.err
16220 rm -f conftest.er1
16221 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16223 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016224 { ac_try='test -z "$ac_c_werror_flag"
16225 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16227 (eval $ac_try) 2>&5
16228 ac_status=$?
16229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16230 (exit $ac_status); }; } &&
16231 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016237 ac_cv_var_tzname=yes
16238else
Martin v. Löwis11437992002-04-12 09:54:03 +000016239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016240sed 's/^/| /' conftest.$ac_ext >&5
16241
Martin v. Löwis11437992002-04-12 09:54:03 +000016242ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016243fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016244rm -f conftest.err conftest.$ac_objext \
16245 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016246fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016247echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16248echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016249 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016250
16251cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016252#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016253_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016254
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016255 fi
16256fi
16257
Martin v. Löwis11437992002-04-12 09:54:03 +000016258echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16259echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16260if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16261 echo $ECHO_N "(cached) $ECHO_C" >&6
16262else
16263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016264/* confdefs.h. */
16265_ACEOF
16266cat confdefs.h >>conftest.$ac_ext
16267cat >>conftest.$ac_ext <<_ACEOF
16268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016269$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016270int
16271main ()
16272{
16273static struct stat ac_aggr;
16274if (ac_aggr.st_rdev)
16275return 0;
16276 ;
16277 return 0;
16278}
16279_ACEOF
16280rm -f conftest.$ac_objext
16281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016282 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016284 grep -v '^ *+' conftest.er1 >conftest.err
16285 rm -f conftest.er1
16286 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16288 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016289 { ac_try='test -z "$ac_c_werror_flag"
16290 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16292 (eval $ac_try) 2>&5
16293 ac_status=$?
16294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16295 (exit $ac_status); }; } &&
16296 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16298 (eval $ac_try) 2>&5
16299 ac_status=$?
16300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16301 (exit $ac_status); }; }; then
16302 ac_cv_member_struct_stat_st_rdev=yes
16303else
16304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016305sed 's/^/| /' conftest.$ac_ext >&5
16306
16307cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016308/* confdefs.h. */
16309_ACEOF
16310cat confdefs.h >>conftest.$ac_ext
16311cat >>conftest.$ac_ext <<_ACEOF
16312/* end confdefs.h. */
16313$ac_includes_default
16314int
16315main ()
16316{
16317static struct stat ac_aggr;
16318if (sizeof ac_aggr.st_rdev)
16319return 0;
16320 ;
16321 return 0;
16322}
16323_ACEOF
16324rm -f conftest.$ac_objext
16325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016326 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016328 grep -v '^ *+' conftest.er1 >conftest.err
16329 rm -f conftest.er1
16330 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16332 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016333 { ac_try='test -z "$ac_c_werror_flag"
16334 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16336 (eval $ac_try) 2>&5
16337 ac_status=$?
16338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16339 (exit $ac_status); }; } &&
16340 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16342 (eval $ac_try) 2>&5
16343 ac_status=$?
16344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16345 (exit $ac_status); }; }; then
16346 ac_cv_member_struct_stat_st_rdev=yes
16347else
16348 echo "$as_me: failed program was:" >&5
16349sed 's/^/| /' conftest.$ac_ext >&5
16350
Martin v. Löwis11437992002-04-12 09:54:03 +000016351ac_cv_member_struct_stat_st_rdev=no
16352fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016353rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016354fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016357echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16358echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16359if test $ac_cv_member_struct_stat_st_rdev = yes; then
16360
16361cat >>confdefs.h <<_ACEOF
16362#define HAVE_STRUCT_STAT_ST_RDEV 1
16363_ACEOF
16364
16365
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016366fi
16367
Martin v. Löwis11437992002-04-12 09:54:03 +000016368echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16369echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16370if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16371 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016372else
Martin v. Löwis11437992002-04-12 09:54:03 +000016373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016374/* confdefs.h. */
16375_ACEOF
16376cat confdefs.h >>conftest.$ac_ext
16377cat >>conftest.$ac_ext <<_ACEOF
16378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016379$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016380int
16381main ()
16382{
16383static struct stat ac_aggr;
16384if (ac_aggr.st_blksize)
16385return 0;
16386 ;
16387 return 0;
16388}
16389_ACEOF
16390rm -f conftest.$ac_objext
16391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016392 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016394 grep -v '^ *+' conftest.er1 >conftest.err
16395 rm -f conftest.er1
16396 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16398 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016399 { ac_try='test -z "$ac_c_werror_flag"
16400 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16402 (eval $ac_try) 2>&5
16403 ac_status=$?
16404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16405 (exit $ac_status); }; } &&
16406 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16408 (eval $ac_try) 2>&5
16409 ac_status=$?
16410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16411 (exit $ac_status); }; }; then
16412 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016413else
Martin v. Löwis11437992002-04-12 09:54:03 +000016414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016415sed 's/^/| /' conftest.$ac_ext >&5
16416
16417cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016418/* confdefs.h. */
16419_ACEOF
16420cat confdefs.h >>conftest.$ac_ext
16421cat >>conftest.$ac_ext <<_ACEOF
16422/* end confdefs.h. */
16423$ac_includes_default
16424int
16425main ()
16426{
16427static struct stat ac_aggr;
16428if (sizeof ac_aggr.st_blksize)
16429return 0;
16430 ;
16431 return 0;
16432}
16433_ACEOF
16434rm -f conftest.$ac_objext
16435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016436 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016438 grep -v '^ *+' conftest.er1 >conftest.err
16439 rm -f conftest.er1
16440 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16442 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016443 { ac_try='test -z "$ac_c_werror_flag"
16444 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16446 (eval $ac_try) 2>&5
16447 ac_status=$?
16448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16449 (exit $ac_status); }; } &&
16450 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16452 (eval $ac_try) 2>&5
16453 ac_status=$?
16454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16455 (exit $ac_status); }; }; then
16456 ac_cv_member_struct_stat_st_blksize=yes
16457else
16458 echo "$as_me: failed program was:" >&5
16459sed 's/^/| /' conftest.$ac_ext >&5
16460
Martin v. Löwis11437992002-04-12 09:54:03 +000016461ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016462fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016463rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016464fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016465rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016467echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
16468echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
16469if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016470
Martin v. Löwis11437992002-04-12 09:54:03 +000016471cat >>confdefs.h <<_ACEOF
16472#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16473_ACEOF
16474
16475
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016476fi
16477
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000016478echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
16479echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
16480if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
16481 echo $ECHO_N "(cached) $ECHO_C" >&6
16482else
16483 cat >conftest.$ac_ext <<_ACEOF
16484/* confdefs.h. */
16485_ACEOF
16486cat confdefs.h >>conftest.$ac_ext
16487cat >>conftest.$ac_ext <<_ACEOF
16488/* end confdefs.h. */
16489$ac_includes_default
16490int
16491main ()
16492{
16493static struct stat ac_aggr;
16494if (ac_aggr.st_flags)
16495return 0;
16496 ;
16497 return 0;
16498}
16499_ACEOF
16500rm -f conftest.$ac_objext
16501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16502 (eval $ac_compile) 2>conftest.er1
16503 ac_status=$?
16504 grep -v '^ *+' conftest.er1 >conftest.err
16505 rm -f conftest.er1
16506 cat conftest.err >&5
16507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16508 (exit $ac_status); } &&
16509 { ac_try='test -z "$ac_c_werror_flag"
16510 || test ! -s conftest.err'
16511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16512 (eval $ac_try) 2>&5
16513 ac_status=$?
16514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16515 (exit $ac_status); }; } &&
16516 { ac_try='test -s conftest.$ac_objext'
16517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16518 (eval $ac_try) 2>&5
16519 ac_status=$?
16520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521 (exit $ac_status); }; }; then
16522 ac_cv_member_struct_stat_st_flags=yes
16523else
16524 echo "$as_me: failed program was:" >&5
16525sed 's/^/| /' conftest.$ac_ext >&5
16526
16527cat >conftest.$ac_ext <<_ACEOF
16528/* confdefs.h. */
16529_ACEOF
16530cat confdefs.h >>conftest.$ac_ext
16531cat >>conftest.$ac_ext <<_ACEOF
16532/* end confdefs.h. */
16533$ac_includes_default
16534int
16535main ()
16536{
16537static struct stat ac_aggr;
16538if (sizeof ac_aggr.st_flags)
16539return 0;
16540 ;
16541 return 0;
16542}
16543_ACEOF
16544rm -f conftest.$ac_objext
16545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16546 (eval $ac_compile) 2>conftest.er1
16547 ac_status=$?
16548 grep -v '^ *+' conftest.er1 >conftest.err
16549 rm -f conftest.er1
16550 cat conftest.err >&5
16551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16552 (exit $ac_status); } &&
16553 { ac_try='test -z "$ac_c_werror_flag"
16554 || test ! -s conftest.err'
16555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16556 (eval $ac_try) 2>&5
16557 ac_status=$?
16558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16559 (exit $ac_status); }; } &&
16560 { ac_try='test -s conftest.$ac_objext'
16561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16562 (eval $ac_try) 2>&5
16563 ac_status=$?
16564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16565 (exit $ac_status); }; }; then
16566 ac_cv_member_struct_stat_st_flags=yes
16567else
16568 echo "$as_me: failed program was:" >&5
16569sed 's/^/| /' conftest.$ac_ext >&5
16570
16571ac_cv_member_struct_stat_st_flags=no
16572fi
16573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16574fi
16575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16576fi
16577echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
16578echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
16579if test $ac_cv_member_struct_stat_st_flags = yes; then
16580
16581cat >>confdefs.h <<_ACEOF
16582#define HAVE_STRUCT_STAT_ST_FLAGS 1
16583_ACEOF
16584
16585
16586fi
16587
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016588echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
16589echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
16590if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
16591 echo $ECHO_N "(cached) $ECHO_C" >&6
16592else
16593 cat >conftest.$ac_ext <<_ACEOF
16594/* confdefs.h. */
16595_ACEOF
16596cat confdefs.h >>conftest.$ac_ext
16597cat >>conftest.$ac_ext <<_ACEOF
16598/* end confdefs.h. */
16599$ac_includes_default
16600int
16601main ()
16602{
16603static struct stat ac_aggr;
16604if (ac_aggr.st_gen)
16605return 0;
16606 ;
16607 return 0;
16608}
16609_ACEOF
16610rm -f conftest.$ac_objext
16611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16612 (eval $ac_compile) 2>conftest.er1
16613 ac_status=$?
16614 grep -v '^ *+' conftest.er1 >conftest.err
16615 rm -f conftest.er1
16616 cat conftest.err >&5
16617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16618 (exit $ac_status); } &&
16619 { ac_try='test -z "$ac_c_werror_flag"
16620 || test ! -s conftest.err'
16621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16622 (eval $ac_try) 2>&5
16623 ac_status=$?
16624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16625 (exit $ac_status); }; } &&
16626 { ac_try='test -s conftest.$ac_objext'
16627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16628 (eval $ac_try) 2>&5
16629 ac_status=$?
16630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16631 (exit $ac_status); }; }; then
16632 ac_cv_member_struct_stat_st_gen=yes
16633else
16634 echo "$as_me: failed program was:" >&5
16635sed 's/^/| /' conftest.$ac_ext >&5
16636
16637cat >conftest.$ac_ext <<_ACEOF
16638/* confdefs.h. */
16639_ACEOF
16640cat confdefs.h >>conftest.$ac_ext
16641cat >>conftest.$ac_ext <<_ACEOF
16642/* end confdefs.h. */
16643$ac_includes_default
16644int
16645main ()
16646{
16647static struct stat ac_aggr;
16648if (sizeof ac_aggr.st_gen)
16649return 0;
16650 ;
16651 return 0;
16652}
16653_ACEOF
16654rm -f conftest.$ac_objext
16655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16656 (eval $ac_compile) 2>conftest.er1
16657 ac_status=$?
16658 grep -v '^ *+' conftest.er1 >conftest.err
16659 rm -f conftest.er1
16660 cat conftest.err >&5
16661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16662 (exit $ac_status); } &&
16663 { ac_try='test -z "$ac_c_werror_flag"
16664 || test ! -s conftest.err'
16665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16666 (eval $ac_try) 2>&5
16667 ac_status=$?
16668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16669 (exit $ac_status); }; } &&
16670 { ac_try='test -s conftest.$ac_objext'
16671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16672 (eval $ac_try) 2>&5
16673 ac_status=$?
16674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16675 (exit $ac_status); }; }; then
16676 ac_cv_member_struct_stat_st_gen=yes
16677else
16678 echo "$as_me: failed program was:" >&5
16679sed 's/^/| /' conftest.$ac_ext >&5
16680
16681ac_cv_member_struct_stat_st_gen=no
16682fi
16683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16684fi
16685rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16686fi
16687echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
16688echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
16689if test $ac_cv_member_struct_stat_st_gen = yes; then
16690
16691cat >>confdefs.h <<_ACEOF
16692#define HAVE_STRUCT_STAT_ST_GEN 1
16693_ACEOF
16694
16695
16696fi
16697
16698echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
16699echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
16700if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
16701 echo $ECHO_N "(cached) $ECHO_C" >&6
16702else
16703 cat >conftest.$ac_ext <<_ACEOF
16704/* confdefs.h. */
16705_ACEOF
16706cat confdefs.h >>conftest.$ac_ext
16707cat >>conftest.$ac_ext <<_ACEOF
16708/* end confdefs.h. */
16709$ac_includes_default
16710int
16711main ()
16712{
16713static struct stat ac_aggr;
16714if (ac_aggr.st_birthtime)
16715return 0;
16716 ;
16717 return 0;
16718}
16719_ACEOF
16720rm -f conftest.$ac_objext
16721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16722 (eval $ac_compile) 2>conftest.er1
16723 ac_status=$?
16724 grep -v '^ *+' conftest.er1 >conftest.err
16725 rm -f conftest.er1
16726 cat conftest.err >&5
16727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728 (exit $ac_status); } &&
16729 { ac_try='test -z "$ac_c_werror_flag"
16730 || test ! -s conftest.err'
16731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16732 (eval $ac_try) 2>&5
16733 ac_status=$?
16734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16735 (exit $ac_status); }; } &&
16736 { ac_try='test -s conftest.$ac_objext'
16737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16738 (eval $ac_try) 2>&5
16739 ac_status=$?
16740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16741 (exit $ac_status); }; }; then
16742 ac_cv_member_struct_stat_st_birthtime=yes
16743else
16744 echo "$as_me: failed program was:" >&5
16745sed 's/^/| /' conftest.$ac_ext >&5
16746
16747cat >conftest.$ac_ext <<_ACEOF
16748/* confdefs.h. */
16749_ACEOF
16750cat confdefs.h >>conftest.$ac_ext
16751cat >>conftest.$ac_ext <<_ACEOF
16752/* end confdefs.h. */
16753$ac_includes_default
16754int
16755main ()
16756{
16757static struct stat ac_aggr;
16758if (sizeof ac_aggr.st_birthtime)
16759return 0;
16760 ;
16761 return 0;
16762}
16763_ACEOF
16764rm -f conftest.$ac_objext
16765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16766 (eval $ac_compile) 2>conftest.er1
16767 ac_status=$?
16768 grep -v '^ *+' conftest.er1 >conftest.err
16769 rm -f conftest.er1
16770 cat conftest.err >&5
16771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16772 (exit $ac_status); } &&
16773 { ac_try='test -z "$ac_c_werror_flag"
16774 || test ! -s conftest.err'
16775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16776 (eval $ac_try) 2>&5
16777 ac_status=$?
16778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16779 (exit $ac_status); }; } &&
16780 { ac_try='test -s conftest.$ac_objext'
16781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16782 (eval $ac_try) 2>&5
16783 ac_status=$?
16784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16785 (exit $ac_status); }; }; then
16786 ac_cv_member_struct_stat_st_birthtime=yes
16787else
16788 echo "$as_me: failed program was:" >&5
16789sed 's/^/| /' conftest.$ac_ext >&5
16790
16791ac_cv_member_struct_stat_st_birthtime=no
16792fi
16793rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16794fi
16795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16796fi
16797echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
16798echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
16799if test $ac_cv_member_struct_stat_st_birthtime = yes; then
16800
16801cat >>confdefs.h <<_ACEOF
16802#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
16803_ACEOF
16804
16805
16806fi
16807
Martin v. Löwis11437992002-04-12 09:54:03 +000016808echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
16809echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
16810if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
16811 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016812else
Martin v. Löwis11437992002-04-12 09:54:03 +000016813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016814/* confdefs.h. */
16815_ACEOF
16816cat confdefs.h >>conftest.$ac_ext
16817cat >>conftest.$ac_ext <<_ACEOF
16818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016819$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016820int
16821main ()
16822{
16823static struct stat ac_aggr;
16824if (ac_aggr.st_blocks)
16825return 0;
16826 ;
16827 return 0;
16828}
16829_ACEOF
16830rm -f conftest.$ac_objext
16831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016832 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016834 grep -v '^ *+' conftest.er1 >conftest.err
16835 rm -f conftest.er1
16836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16838 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016839 { ac_try='test -z "$ac_c_werror_flag"
16840 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16842 (eval $ac_try) 2>&5
16843 ac_status=$?
16844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16845 (exit $ac_status); }; } &&
16846 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16848 (eval $ac_try) 2>&5
16849 ac_status=$?
16850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16851 (exit $ac_status); }; }; then
16852 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016853else
Martin v. Löwis11437992002-04-12 09:54:03 +000016854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016855sed 's/^/| /' conftest.$ac_ext >&5
16856
16857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
16863$ac_includes_default
16864int
16865main ()
16866{
16867static struct stat ac_aggr;
16868if (sizeof ac_aggr.st_blocks)
16869return 0;
16870 ;
16871 return 0;
16872}
16873_ACEOF
16874rm -f conftest.$ac_objext
16875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016876 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016878 grep -v '^ *+' conftest.er1 >conftest.err
16879 rm -f conftest.er1
16880 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16882 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016883 { ac_try='test -z "$ac_c_werror_flag"
16884 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16886 (eval $ac_try) 2>&5
16887 ac_status=$?
16888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16889 (exit $ac_status); }; } &&
16890 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16892 (eval $ac_try) 2>&5
16893 ac_status=$?
16894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16895 (exit $ac_status); }; }; then
16896 ac_cv_member_struct_stat_st_blocks=yes
16897else
16898 echo "$as_me: failed program was:" >&5
16899sed 's/^/| /' conftest.$ac_ext >&5
16900
Martin v. Löwis11437992002-04-12 09:54:03 +000016901ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016902fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016904fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016905rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016906fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016907echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
16908echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
16909if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016910
Martin v. Löwis11437992002-04-12 09:54:03 +000016911cat >>confdefs.h <<_ACEOF
16912#define HAVE_STRUCT_STAT_ST_BLOCKS 1
16913_ACEOF
16914
16915
16916cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016917#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016918_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016919
16920else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016921 case $LIBOBJS in
16922 "fileblocks.$ac_objext" | \
16923 *" fileblocks.$ac_objext" | \
16924 "fileblocks.$ac_objext "* | \
16925 *" fileblocks.$ac_objext "* ) ;;
16926 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
16927esac
16928
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016929fi
16930
Michael W. Hudson54241132001-12-07 15:38:26 +000016931
Martin v. Löwis11437992002-04-12 09:54:03 +000016932
16933echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
16934echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
16935if test "${ac_cv_header_time_altzone+set}" = set; then
16936 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016937else
Martin v. Löwis11437992002-04-12 09:54:03 +000016938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016939/* confdefs.h. */
16940_ACEOF
16941cat confdefs.h >>conftest.$ac_ext
16942cat >>conftest.$ac_ext <<_ACEOF
16943/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016944#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016945int
16946main ()
16947{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016948return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 ;
16950 return 0;
16951}
16952_ACEOF
16953rm -f conftest.$ac_objext
16954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016955 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016957 grep -v '^ *+' conftest.er1 >conftest.err
16958 rm -f conftest.er1
16959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16961 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016962 { ac_try='test -z "$ac_c_werror_flag"
16963 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16965 (eval $ac_try) 2>&5
16966 ac_status=$?
16967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16968 (exit $ac_status); }; } &&
16969 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16971 (eval $ac_try) 2>&5
16972 ac_status=$?
16973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16974 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016975 ac_cv_header_time_altzone=yes
16976else
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016978sed 's/^/| /' conftest.$ac_ext >&5
16979
Martin v. Löwis11437992002-04-12 09:54:03 +000016980ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016981fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016982rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016983fi
16984
Martin v. Löwis11437992002-04-12 09:54:03 +000016985echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
16986echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016987if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016988
16989cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016990#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016991_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016992
16993fi
16994
Guido van Rossumda88dad1995-01-26 00:46:29 +000016995was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016996echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
16997echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
16998cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016999/* confdefs.h. */
17000_ACEOF
17001cat confdefs.h >>conftest.$ac_ext
17002cat >>conftest.$ac_ext <<_ACEOF
17003/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017004
17005#include <sys/types.h>
17006#include <sys/select.h>
17007#include <sys/time.h>
17008
Martin v. Löwis11437992002-04-12 09:54:03 +000017009int
17010main ()
17011{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017012;
Martin v. Löwis11437992002-04-12 09:54:03 +000017013 ;
17014 return 0;
17015}
17016_ACEOF
17017rm -f conftest.$ac_objext
17018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017019 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017021 grep -v '^ *+' conftest.er1 >conftest.err
17022 rm -f conftest.er1
17023 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17025 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017026 { ac_try='test -z "$ac_c_werror_flag"
17027 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17029 (eval $ac_try) 2>&5
17030 ac_status=$?
17031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17032 (exit $ac_status); }; } &&
17033 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17035 (eval $ac_try) 2>&5
17036 ac_status=$?
17037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17038 (exit $ac_status); }; }; then
17039
17040
17041cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017042#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017043_ACEOF
17044
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017045 was_it_defined=yes
17046
Guido van Rossumf78abae1997-01-21 22:02:36 +000017047else
Martin v. Löwis11437992002-04-12 09:54:03 +000017048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017049sed 's/^/| /' conftest.$ac_ext >&5
17050
Guido van Rossum7f43da71994-08-01 12:15:30 +000017051fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017052rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017053echo "$as_me:$LINENO: result: $was_it_defined" >&5
17054echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000017055
Martin v. Löwis11437992002-04-12 09:54:03 +000017056echo "$as_me:$LINENO: checking for addrinfo" >&5
17057echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
17058if test "${ac_cv_struct_addrinfo+set}" = set; then
17059 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017060else
Martin v. Löwis11437992002-04-12 09:54:03 +000017061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017062/* confdefs.h. */
17063_ACEOF
17064cat confdefs.h >>conftest.$ac_ext
17065cat >>conftest.$ac_ext <<_ACEOF
17066/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017067
17068# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017069int
17070main ()
17071{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017072struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000017073 ;
17074 return 0;
17075}
17076_ACEOF
17077rm -f conftest.$ac_objext
17078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017079 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017081 grep -v '^ *+' conftest.er1 >conftest.err
17082 rm -f conftest.er1
17083 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17085 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017086 { ac_try='test -z "$ac_c_werror_flag"
17087 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17089 (eval $ac_try) 2>&5
17090 ac_status=$?
17091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17092 (exit $ac_status); }; } &&
17093 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17095 (eval $ac_try) 2>&5
17096 ac_status=$?
17097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17098 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017099 ac_cv_struct_addrinfo=yes
17100else
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017102sed 's/^/| /' conftest.$ac_ext >&5
17103
Martin v. Löwis11437992002-04-12 09:54:03 +000017104ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017105fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017106rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017107fi
17108
Martin v. Löwis11437992002-04-12 09:54:03 +000017109echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
17110echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017111if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017112
17113cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017114#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017115_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017116
17117fi
17118
Martin v. Löwis11437992002-04-12 09:54:03 +000017119echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
17120echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
17121if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
17122 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017123else
Martin v. Löwis11437992002-04-12 09:54:03 +000017124 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017125/* confdefs.h. */
17126_ACEOF
17127cat confdefs.h >>conftest.$ac_ext
17128cat >>conftest.$ac_ext <<_ACEOF
17129/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017130
17131# include <sys/types.h>
17132# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017133int
17134main ()
17135{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017136struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000017137 ;
17138 return 0;
17139}
17140_ACEOF
17141rm -f conftest.$ac_objext
17142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017143 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017145 grep -v '^ *+' conftest.er1 >conftest.err
17146 rm -f conftest.er1
17147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17149 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017150 { ac_try='test -z "$ac_c_werror_flag"
17151 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17153 (eval $ac_try) 2>&5
17154 ac_status=$?
17155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17156 (exit $ac_status); }; } &&
17157 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17159 (eval $ac_try) 2>&5
17160 ac_status=$?
17161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17162 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017163 ac_cv_struct_sockaddr_storage=yes
17164else
Martin v. Löwis11437992002-04-12 09:54:03 +000017165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017166sed 's/^/| /' conftest.$ac_ext >&5
17167
Martin v. Löwis11437992002-04-12 09:54:03 +000017168ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017169fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017170rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017171fi
17172
Martin v. Löwis11437992002-04-12 09:54:03 +000017173echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
17174echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017175if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017176
17177cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017178#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017179_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017180
17181fi
17182
Guido van Rossum627b2d71993-12-24 10:39:16 +000017183# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000017184
Michael W. Hudson54241132001-12-07 15:38:26 +000017185
Martin v. Löwis11437992002-04-12 09:54:03 +000017186echo "$as_me:$LINENO: checking whether char is unsigned" >&5
17187echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
17188if test "${ac_cv_c_char_unsigned+set}" = set; then
17189 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000017190else
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017192/* confdefs.h. */
17193_ACEOF
17194cat confdefs.h >>conftest.$ac_ext
17195cat >>conftest.$ac_ext <<_ACEOF
17196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017197$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017198int
17199main ()
17200{
17201static int test_array [1 - 2 * !(((char) -1) < 0)];
17202test_array [0] = 0
17203
17204 ;
17205 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000017206}
Martin v. Löwis11437992002-04-12 09:54:03 +000017207_ACEOF
17208rm -f conftest.$ac_objext
17209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017210 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017212 grep -v '^ *+' conftest.er1 >conftest.err
17213 rm -f conftest.er1
17214 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17216 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017217 { ac_try='test -z "$ac_c_werror_flag"
17218 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17220 (eval $ac_try) 2>&5
17221 ac_status=$?
17222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17223 (exit $ac_status); }; } &&
17224 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17226 (eval $ac_try) 2>&5
17227 ac_status=$?
17228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17229 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017230 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017231else
17232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017233sed 's/^/| /' conftest.$ac_ext >&5
17234
Martin v. Löwis11437992002-04-12 09:54:03 +000017235ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017236fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017237rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017239echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
17240echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017241if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017242 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017243#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017244_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017245
17246fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000017247
Martin v. Löwis11437992002-04-12 09:54:03 +000017248echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
17249echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17250if test "${ac_cv_c_const+set}" = set; then
17251 echo $ECHO_N "(cached) $ECHO_C" >&6
17252else
17253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017254/* confdefs.h. */
17255_ACEOF
17256cat confdefs.h >>conftest.$ac_ext
17257cat >>conftest.$ac_ext <<_ACEOF
17258/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017259
Martin v. Löwis11437992002-04-12 09:54:03 +000017260int
17261main ()
17262{
17263/* FIXME: Include the comments suggested by Paul. */
17264#ifndef __cplusplus
17265 /* Ultrix mips cc rejects this. */
17266 typedef int charset[2];
17267 const charset x;
17268 /* SunOS 4.1.1 cc rejects this. */
17269 char const *const *ccp;
17270 char **p;
17271 /* NEC SVR4.0.2 mips cc rejects this. */
17272 struct point {int x, y;};
17273 static struct point const zero = {0,0};
17274 /* AIX XL C 1.02.0.0 rejects this.
17275 It does not let you subtract one const X* pointer from another in
17276 an arm of an if-expression whose if-part is not a constant
17277 expression */
17278 const char *g = "string";
17279 ccp = &g + (g ? g-g : 0);
17280 /* HPUX 7.0 cc rejects these. */
17281 ++ccp;
17282 p = (char**) ccp;
17283 ccp = (char const *const *) p;
17284 { /* SCO 3.2v4 cc rejects this. */
17285 char *t;
17286 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017287
Martin v. Löwis11437992002-04-12 09:54:03 +000017288 *t++ = 0;
17289 }
17290 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17291 int x[] = {25, 17};
17292 const int *foo = &x[0];
17293 ++foo;
17294 }
17295 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17296 typedef const int *iptr;
17297 iptr p = 0;
17298 ++p;
17299 }
17300 { /* AIX XL C 1.02.0.0 rejects this saying
17301 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17302 struct s { int j; const int *ap[3]; };
17303 struct s *b; b->j = 5;
17304 }
17305 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17306 const int foo = 10;
17307 }
17308#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000017309
Martin v. Löwis11437992002-04-12 09:54:03 +000017310 ;
17311 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000017312}
Martin v. Löwis11437992002-04-12 09:54:03 +000017313_ACEOF
17314rm -f conftest.$ac_objext
17315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017316 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017318 grep -v '^ *+' conftest.er1 >conftest.err
17319 rm -f conftest.er1
17320 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17322 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017323 { ac_try='test -z "$ac_c_werror_flag"
17324 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17326 (eval $ac_try) 2>&5
17327 ac_status=$?
17328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17329 (exit $ac_status); }; } &&
17330 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17332 (eval $ac_try) 2>&5
17333 ac_status=$?
17334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17335 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017336 ac_cv_c_const=yes
17337else
Martin v. Löwis11437992002-04-12 09:54:03 +000017338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017339sed 's/^/| /' conftest.$ac_ext >&5
17340
Martin v. Löwis11437992002-04-12 09:54:03 +000017341ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017342fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017343rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017344fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017345echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
17346echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017347if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017348
17349cat >>confdefs.h <<\_ACEOF
17350#define const
17351_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017352
17353fi
17354
Michael W. Hudson54241132001-12-07 15:38:26 +000017355
Guido van Rossumda88dad1995-01-26 00:46:29 +000017356works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017357echo "$as_me:$LINENO: checking for working volatile" >&5
17358echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
17359cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017360/* confdefs.h. */
17361_ACEOF
17362cat confdefs.h >>conftest.$ac_ext
17363cat >>conftest.$ac_ext <<_ACEOF
17364/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017365
Martin v. Löwis11437992002-04-12 09:54:03 +000017366int
17367main ()
17368{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017369volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017370 ;
17371 return 0;
17372}
17373_ACEOF
17374rm -f conftest.$ac_objext
17375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017376 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017378 grep -v '^ *+' conftest.er1 >conftest.err
17379 rm -f conftest.er1
17380 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17382 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017383 { ac_try='test -z "$ac_c_werror_flag"
17384 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17386 (eval $ac_try) 2>&5
17387 ac_status=$?
17388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17389 (exit $ac_status); }; } &&
17390 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17392 (eval $ac_try) 2>&5
17393 ac_status=$?
17394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17395 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017396 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017397else
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017399sed 's/^/| /' conftest.$ac_ext >&5
17400
Martin v. Löwis11437992002-04-12 09:54:03 +000017401
17402cat >>confdefs.h <<\_ACEOF
17403#define volatile
17404_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017405
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017406
Guido van Rossum627b2d71993-12-24 10:39:16 +000017407fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017408rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017409echo "$as_me:$LINENO: result: $works" >&5
17410echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017411
Guido van Rossumda88dad1995-01-26 00:46:29 +000017412works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017413echo "$as_me:$LINENO: checking for working signed char" >&5
17414echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
17415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017416/* confdefs.h. */
17417_ACEOF
17418cat confdefs.h >>conftest.$ac_ext
17419cat >>conftest.$ac_ext <<_ACEOF
17420/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017421
Martin v. Löwis11437992002-04-12 09:54:03 +000017422int
17423main ()
17424{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017425signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017426 ;
17427 return 0;
17428}
17429_ACEOF
17430rm -f conftest.$ac_objext
17431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017432 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017434 grep -v '^ *+' conftest.er1 >conftest.err
17435 rm -f conftest.er1
17436 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17438 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017439 { ac_try='test -z "$ac_c_werror_flag"
17440 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17442 (eval $ac_try) 2>&5
17443 ac_status=$?
17444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17445 (exit $ac_status); }; } &&
17446 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17448 (eval $ac_try) 2>&5
17449 ac_status=$?
17450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17451 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017452 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017453else
Martin v. Löwis11437992002-04-12 09:54:03 +000017454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017455sed 's/^/| /' conftest.$ac_ext >&5
17456
Martin v. Löwis11437992002-04-12 09:54:03 +000017457
17458cat >>confdefs.h <<\_ACEOF
17459#define signed
17460_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017461
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017462
Guido van Rossum7f43da71994-08-01 12:15:30 +000017463fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017464rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017465echo "$as_me:$LINENO: result: $works" >&5
17466echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017467
Guido van Rossumda88dad1995-01-26 00:46:29 +000017468have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017469echo "$as_me:$LINENO: checking for prototypes" >&5
17470echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
17471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017472/* confdefs.h. */
17473_ACEOF
17474cat confdefs.h >>conftest.$ac_ext
17475cat >>conftest.$ac_ext <<_ACEOF
17476/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017477int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017478int
17479main ()
17480{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017481return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 ;
17483 return 0;
17484}
17485_ACEOF
17486rm -f conftest.$ac_objext
17487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017488 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017490 grep -v '^ *+' conftest.er1 >conftest.err
17491 rm -f conftest.er1
17492 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17494 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017495 { ac_try='test -z "$ac_c_werror_flag"
17496 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17498 (eval $ac_try) 2>&5
17499 ac_status=$?
17500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17501 (exit $ac_status); }; } &&
17502 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17504 (eval $ac_try) 2>&5
17505 ac_status=$?
17506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17507 (exit $ac_status); }; }; then
17508
17509
17510cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017511#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017512_ACEOF
17513
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017514 have_prototypes=yes
17515
Guido van Rossumf78abae1997-01-21 22:02:36 +000017516else
Martin v. Löwis11437992002-04-12 09:54:03 +000017517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017518sed 's/^/| /' conftest.$ac_ext >&5
17519
Guido van Rossum7f43da71994-08-01 12:15:30 +000017520fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017521rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017522echo "$as_me:$LINENO: result: $have_prototypes" >&5
17523echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017524
Guido van Rossumda88dad1995-01-26 00:46:29 +000017525works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017526echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17527echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17528cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017529/* confdefs.h. */
17530_ACEOF
17531cat confdefs.h >>conftest.$ac_ext
17532cat >>conftest.$ac_ext <<_ACEOF
17533/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017534
17535#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017536int foo(int x, ...) {
17537 va_list va;
17538 va_start(va, x);
17539 va_arg(va, int);
17540 va_arg(va, char *);
17541 va_arg(va, double);
17542 return 0;
17543}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017544
Martin v. Löwis11437992002-04-12 09:54:03 +000017545int
17546main ()
17547{
Guido van Rossum90eea071996-08-30 20:58:57 +000017548return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017549 ;
17550 return 0;
17551}
17552_ACEOF
17553rm -f conftest.$ac_objext
17554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017555 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017557 grep -v '^ *+' conftest.er1 >conftest.err
17558 rm -f conftest.er1
17559 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17561 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017562 { ac_try='test -z "$ac_c_werror_flag"
17563 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17565 (eval $ac_try) 2>&5
17566 ac_status=$?
17567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17568 (exit $ac_status); }; } &&
17569 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17571 (eval $ac_try) 2>&5
17572 ac_status=$?
17573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17574 (exit $ac_status); }; }; then
17575
17576
17577cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017578#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017579_ACEOF
17580
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017581 works=yes
17582
Guido van Rossumf78abae1997-01-21 22:02:36 +000017583else
Martin v. Löwis11437992002-04-12 09:54:03 +000017584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017585sed 's/^/| /' conftest.$ac_ext >&5
17586
Guido van Rossum627b2d71993-12-24 10:39:16 +000017587fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017588rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017589echo "$as_me:$LINENO: result: $works" >&5
17590echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017591
Martin v. Löwisd6320502004-08-12 13:45:08 +000017592# check for socketpair
17593echo "$as_me:$LINENO: checking for socketpair" >&5
17594echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17595cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017596/* confdefs.h. */
17597_ACEOF
17598cat confdefs.h >>conftest.$ac_ext
17599cat >>conftest.$ac_ext <<_ACEOF
17600/* end confdefs.h. */
17601
17602#include <sys/types.h>
17603#include <sys/socket.h>
17604
17605int
17606main ()
17607{
17608void *x=socketpair
17609 ;
17610 return 0;
17611}
17612_ACEOF
17613rm -f conftest.$ac_objext
17614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017615 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017617 grep -v '^ *+' conftest.er1 >conftest.err
17618 rm -f conftest.er1
17619 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17621 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017622 { ac_try='test -z "$ac_c_werror_flag"
17623 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17625 (eval $ac_try) 2>&5
17626 ac_status=$?
17627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17628 (exit $ac_status); }; } &&
17629 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000017630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17631 (eval $ac_try) 2>&5
17632 ac_status=$?
17633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17634 (exit $ac_status); }; }; then
17635
17636cat >>confdefs.h <<\_ACEOF
17637#define HAVE_SOCKETPAIR 1
17638_ACEOF
17639
17640 echo "$as_me:$LINENO: result: yes" >&5
17641echo "${ECHO_T}yes" >&6
17642else
17643 echo "$as_me: failed program was:" >&5
17644sed 's/^/| /' conftest.$ac_ext >&5
17645
17646echo "$as_me:$LINENO: result: no" >&5
17647echo "${ECHO_T}no" >&6
17648
17649fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017651
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017652# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017653echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17654echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017656/* confdefs.h. */
17657_ACEOF
17658cat confdefs.h >>conftest.$ac_ext
17659cat >>conftest.$ac_ext <<_ACEOF
17660/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017661#include <sys/types.h>
17662#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017663int
17664main ()
17665{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017666struct sockaddr x;
17667x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 ;
17669 return 0;
17670}
17671_ACEOF
17672rm -f conftest.$ac_objext
17673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017674 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017676 grep -v '^ *+' conftest.er1 >conftest.err
17677 rm -f conftest.er1
17678 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17680 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017681 { ac_try='test -z "$ac_c_werror_flag"
17682 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17684 (eval $ac_try) 2>&5
17685 ac_status=$?
17686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17687 (exit $ac_status); }; } &&
17688 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17690 (eval $ac_try) 2>&5
17691 ac_status=$?
17692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17693 (exit $ac_status); }; }; then
17694 echo "$as_me:$LINENO: result: yes" >&5
17695echo "${ECHO_T}yes" >&6
17696
17697cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017698#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017699_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017700
17701else
Martin v. Löwis11437992002-04-12 09:54:03 +000017702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017703sed 's/^/| /' conftest.$ac_ext >&5
17704
Martin v. Löwis11437992002-04-12 09:54:03 +000017705echo "$as_me:$LINENO: result: no" >&5
17706echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017707fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017708rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017709
Guido van Rossumda88dad1995-01-26 00:46:29 +000017710va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017711echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17712echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017714/* confdefs.h. */
17715_ACEOF
17716cat confdefs.h >>conftest.$ac_ext
17717cat >>conftest.$ac_ext <<_ACEOF
17718/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017719
17720#ifdef HAVE_STDARG_PROTOTYPES
17721#include <stdarg.h>
17722#else
17723#include <varargs.h>
17724#endif
17725
Martin v. Löwis11437992002-04-12 09:54:03 +000017726int
17727main ()
17728{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017729va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017730 ;
17731 return 0;
17732}
17733_ACEOF
17734rm -f conftest.$ac_objext
17735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017736 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017738 grep -v '^ *+' conftest.er1 >conftest.err
17739 rm -f conftest.er1
17740 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17742 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017743 { ac_try='test -z "$ac_c_werror_flag"
17744 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17746 (eval $ac_try) 2>&5
17747 ac_status=$?
17748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17749 (exit $ac_status); }; } &&
17750 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17752 (eval $ac_try) 2>&5
17753 ac_status=$?
17754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17755 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017756 :
17757else
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017759sed 's/^/| /' conftest.$ac_ext >&5
17760
Martin v. Löwis11437992002-04-12 09:54:03 +000017761
17762
17763cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017764#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017765_ACEOF
17766
Guido van Rossumda88dad1995-01-26 00:46:29 +000017767 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017768
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017769fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017771echo "$as_me:$LINENO: result: $va_list_is_array" >&5
17772echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017773
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017774# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017775
17776
17777
17778echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17779echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17780if test "${ac_cv_func_gethostbyname_r+set}" = set; then
17781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017782else
Martin v. Löwis11437992002-04-12 09:54:03 +000017783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017784/* confdefs.h. */
17785_ACEOF
17786cat confdefs.h >>conftest.$ac_ext
17787cat >>conftest.$ac_ext <<_ACEOF
17788/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017789/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017790 which can conflict with char gethostbyname_r (); below.
17791 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017792 <limits.h> exists even on freestanding compilers. Under hpux,
17793 including <limits.h> includes <sys/time.h> and causes problems
17794 checking for functions defined therein. */
17795#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017796# include <limits.h>
17797#else
17798# include <assert.h>
17799#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017800/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017801#ifdef __cplusplus
17802extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017803{
Martin v. Löwis11437992002-04-12 09:54:03 +000017804#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017805/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017806 builtin and then its argument prototype would still apply. */
17807char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017808/* The GNU C library defines this for functions which it implements
17809 to always fail with ENOSYS. Some functions are actually named
17810 something starting with __ and the normal name is an alias. */
17811#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
17812choke me
17813#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017814char (*f) () = gethostbyname_r;
17815#endif
17816#ifdef __cplusplus
17817}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017818#endif
17819
Skip Montanaro6dead952003-09-25 14:50:04 +000017820int
17821main ()
17822{
17823return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 ;
17825 return 0;
17826}
17827_ACEOF
17828rm -f conftest.$ac_objext conftest$ac_exeext
17829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017830 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017832 grep -v '^ *+' conftest.er1 >conftest.err
17833 rm -f conftest.er1
17834 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17836 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017837 { ac_try='test -z "$ac_c_werror_flag"
17838 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17840 (eval $ac_try) 2>&5
17841 ac_status=$?
17842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17843 (exit $ac_status); }; } &&
17844 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17846 (eval $ac_try) 2>&5
17847 ac_status=$?
17848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17849 (exit $ac_status); }; }; then
17850 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017851else
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017853sed 's/^/| /' conftest.$ac_ext >&5
17854
Martin v. Löwis11437992002-04-12 09:54:03 +000017855ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017856fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017857rm -f conftest.err conftest.$ac_objext \
17858 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017859fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017860echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
17861echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
17862if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017863
Martin v. Löwis11437992002-04-12 09:54:03 +000017864 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017865#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017866_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017867
Martin v. Löwis11437992002-04-12 09:54:03 +000017868 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
17869echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017870 OLD_CFLAGS=$CFLAGS
17871 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017873/* confdefs.h. */
17874_ACEOF
17875cat confdefs.h >>conftest.$ac_ext
17876cat >>conftest.$ac_ext <<_ACEOF
17877/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017878
17879# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017880
Martin v. Löwis11437992002-04-12 09:54:03 +000017881int
17882main ()
17883{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017884
17885 char *name;
17886 struct hostent *he, *res;
17887 char buffer[2048];
17888 int buflen = 2048;
17889 int h_errnop;
17890
17891 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017892
17893 ;
17894 return 0;
17895}
17896_ACEOF
17897rm -f conftest.$ac_objext
17898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017899 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017901 grep -v '^ *+' conftest.er1 >conftest.err
17902 rm -f conftest.er1
17903 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17905 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017906 { ac_try='test -z "$ac_c_werror_flag"
17907 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17909 (eval $ac_try) 2>&5
17910 ac_status=$?
17911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17912 (exit $ac_status); }; } &&
17913 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17915 (eval $ac_try) 2>&5
17916 ac_status=$?
17917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17918 (exit $ac_status); }; }; then
17919
17920 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017921#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017922_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017923
Martin v. Löwis11437992002-04-12 09:54:03 +000017924
17925cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017926#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017927_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017928
Martin v. Löwis11437992002-04-12 09:54:03 +000017929 echo "$as_me:$LINENO: result: yes" >&5
17930echo "${ECHO_T}yes" >&6
17931
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017932else
Martin v. Löwis11437992002-04-12 09:54:03 +000017933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017934sed 's/^/| /' conftest.$ac_ext >&5
17935
Martin v. Löwis11437992002-04-12 09:54:03 +000017936
17937 echo "$as_me:$LINENO: result: no" >&5
17938echo "${ECHO_T}no" >&6
17939 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
17940echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
17941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017942/* confdefs.h. */
17943_ACEOF
17944cat confdefs.h >>conftest.$ac_ext
17945cat >>conftest.$ac_ext <<_ACEOF
17946/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017947
17948# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017949
Martin v. Löwis11437992002-04-12 09:54:03 +000017950int
17951main ()
17952{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017953
17954 char *name;
17955 struct hostent *he;
17956 char buffer[2048];
17957 int buflen = 2048;
17958 int h_errnop;
17959
17960 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017961
17962 ;
17963 return 0;
17964}
17965_ACEOF
17966rm -f conftest.$ac_objext
17967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017968 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017970 grep -v '^ *+' conftest.er1 >conftest.err
17971 rm -f conftest.er1
17972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17974 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017975 { ac_try='test -z "$ac_c_werror_flag"
17976 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17978 (eval $ac_try) 2>&5
17979 ac_status=$?
17980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17981 (exit $ac_status); }; } &&
17982 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17984 (eval $ac_try) 2>&5
17985 ac_status=$?
17986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17987 (exit $ac_status); }; }; then
17988
17989 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017990#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017991_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017992
Martin v. Löwis11437992002-04-12 09:54:03 +000017993
17994cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017995#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017996_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017997
Martin v. Löwis11437992002-04-12 09:54:03 +000017998 echo "$as_me:$LINENO: result: yes" >&5
17999echo "${ECHO_T}yes" >&6
18000
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018001else
Martin v. Löwis11437992002-04-12 09:54:03 +000018002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018003sed 's/^/| /' conftest.$ac_ext >&5
18004
Martin v. Löwis11437992002-04-12 09:54:03 +000018005
18006 echo "$as_me:$LINENO: result: no" >&5
18007echo "${ECHO_T}no" >&6
18008 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
18009echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
18010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018011/* confdefs.h. */
18012_ACEOF
18013cat confdefs.h >>conftest.$ac_ext
18014cat >>conftest.$ac_ext <<_ACEOF
18015/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018016
18017# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018018
Martin v. Löwis11437992002-04-12 09:54:03 +000018019int
18020main ()
18021{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018022
18023 char *name;
18024 struct hostent *he;
18025 struct hostent_data data;
18026
18027 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000018028
18029 ;
18030 return 0;
18031}
18032_ACEOF
18033rm -f conftest.$ac_objext
18034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018035 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018037 grep -v '^ *+' conftest.er1 >conftest.err
18038 rm -f conftest.er1
18039 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18041 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018042 { ac_try='test -z "$ac_c_werror_flag"
18043 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18045 (eval $ac_try) 2>&5
18046 ac_status=$?
18047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18048 (exit $ac_status); }; } &&
18049 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18051 (eval $ac_try) 2>&5
18052 ac_status=$?
18053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18054 (exit $ac_status); }; }; then
18055
18056 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018057#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018058_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018059
Martin v. Löwis11437992002-04-12 09:54:03 +000018060
18061cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018062#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018063_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018064
Martin v. Löwis11437992002-04-12 09:54:03 +000018065 echo "$as_me:$LINENO: result: yes" >&5
18066echo "${ECHO_T}yes" >&6
18067
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018068else
Martin v. Löwis11437992002-04-12 09:54:03 +000018069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018070sed 's/^/| /' conftest.$ac_ext >&5
18071
Martin v. Löwis11437992002-04-12 09:54:03 +000018072
18073 echo "$as_me:$LINENO: result: no" >&5
18074echo "${ECHO_T}no" >&6
18075
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018076fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018077rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018078
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018079fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018080rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018081
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018082fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018083rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018084 CFLAGS=$OLD_CFLAGS
18085
18086else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018087
Martin v. Löwis11437992002-04-12 09:54:03 +000018088
18089for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000018090do
Martin v. Löwis11437992002-04-12 09:54:03 +000018091as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18092echo "$as_me:$LINENO: checking for $ac_func" >&5
18093echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18094if eval "test \"\${$as_ac_var+set}\" = set"; then
18095 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018096else
Martin v. Löwis11437992002-04-12 09:54:03 +000018097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018098/* confdefs.h. */
18099_ACEOF
18100cat confdefs.h >>conftest.$ac_ext
18101cat >>conftest.$ac_ext <<_ACEOF
18102/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018103/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018104 which can conflict with char $ac_func (); below.
18105 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018106 <limits.h> exists even on freestanding compilers. Under hpux,
18107 including <limits.h> includes <sys/time.h> and causes problems
18108 checking for functions defined therein. */
18109#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018110# include <limits.h>
18111#else
18112# include <assert.h>
18113#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018114/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018115#ifdef __cplusplus
18116extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018117{
Martin v. Löwis11437992002-04-12 09:54:03 +000018118#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018119/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018120 builtin and then its argument prototype would still apply. */
18121char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018122/* The GNU C library defines this for functions which it implements
18123 to always fail with ENOSYS. Some functions are actually named
18124 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000018125#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018126choke me
18127#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018128char (*f) () = $ac_func;
18129#endif
18130#ifdef __cplusplus
18131}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018132#endif
18133
Skip Montanaro6dead952003-09-25 14:50:04 +000018134int
18135main ()
18136{
18137return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018138 ;
18139 return 0;
18140}
18141_ACEOF
18142rm -f conftest.$ac_objext conftest$ac_exeext
18143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018144 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018146 grep -v '^ *+' conftest.er1 >conftest.err
18147 rm -f conftest.er1
18148 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18150 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018151 { ac_try='test -z "$ac_c_werror_flag"
18152 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18154 (eval $ac_try) 2>&5
18155 ac_status=$?
18156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18157 (exit $ac_status); }; } &&
18158 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18160 (eval $ac_try) 2>&5
18161 ac_status=$?
18162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18163 (exit $ac_status); }; }; then
18164 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018165else
Martin v. Löwis11437992002-04-12 09:54:03 +000018166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018167sed 's/^/| /' conftest.$ac_ext >&5
18168
Martin v. Löwis11437992002-04-12 09:54:03 +000018169eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018170fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018171rm -f conftest.err conftest.$ac_objext \
18172 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018174echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18175echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18176if test `eval echo '${'$as_ac_var'}'` = yes; then
18177 cat >>confdefs.h <<_ACEOF
18178#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18179_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018180
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018181fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018182done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018183
Michael W. Hudson54241132001-12-07 15:38:26 +000018184
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018185fi
18186
Michael W. Hudson54241132001-12-07 15:38:26 +000018187
18188
18189
18190
18191
18192
Guido van Rossum627b2d71993-12-24 10:39:16 +000018193# checks for system services
18194# (none yet)
18195
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018196# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000018197echo "$as_me:$LINENO: checking for __fpu_control" >&5
18198echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
18199if test "${ac_cv_func___fpu_control+set}" = set; then
18200 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018201else
Martin v. Löwis11437992002-04-12 09:54:03 +000018202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018203/* confdefs.h. */
18204_ACEOF
18205cat confdefs.h >>conftest.$ac_ext
18206cat >>conftest.$ac_ext <<_ACEOF
18207/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018208/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018209 which can conflict with char __fpu_control (); below.
18210 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018211 <limits.h> exists even on freestanding compilers. Under hpux,
18212 including <limits.h> includes <sys/time.h> and causes problems
18213 checking for functions defined therein. */
18214#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018215# include <limits.h>
18216#else
18217# include <assert.h>
18218#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018219/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018220#ifdef __cplusplus
18221extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018222{
Martin v. Löwis11437992002-04-12 09:54:03 +000018223#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018224/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018225 builtin and then its argument prototype would still apply. */
18226char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018227/* The GNU C library defines this for functions which it implements
18228 to always fail with ENOSYS. Some functions are actually named
18229 something starting with __ and the normal name is an alias. */
18230#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
18231choke me
18232#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018233char (*f) () = __fpu_control;
18234#endif
18235#ifdef __cplusplus
18236}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018237#endif
18238
Skip Montanaro6dead952003-09-25 14:50:04 +000018239int
18240main ()
18241{
18242return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000018243 ;
18244 return 0;
18245}
18246_ACEOF
18247rm -f conftest.$ac_objext conftest$ac_exeext
18248if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018249 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018251 grep -v '^ *+' conftest.er1 >conftest.err
18252 rm -f conftest.er1
18253 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18255 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018256 { ac_try='test -z "$ac_c_werror_flag"
18257 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18259 (eval $ac_try) 2>&5
18260 ac_status=$?
18261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18262 (exit $ac_status); }; } &&
18263 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18265 (eval $ac_try) 2>&5
18266 ac_status=$?
18267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18268 (exit $ac_status); }; }; then
18269 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018270else
Martin v. Löwis11437992002-04-12 09:54:03 +000018271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018272sed 's/^/| /' conftest.$ac_ext >&5
18273
Martin v. Löwis11437992002-04-12 09:54:03 +000018274ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018275fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018276rm -f conftest.err conftest.$ac_objext \
18277 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018279echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
18280echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
18281if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018282 :
18283else
Martin v. Löwis11437992002-04-12 09:54:03 +000018284
18285echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
18286echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
18287if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
18288 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018289else
Martin v. Löwis11437992002-04-12 09:54:03 +000018290 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018291LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018292cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018293/* confdefs.h. */
18294_ACEOF
18295cat confdefs.h >>conftest.$ac_ext
18296cat >>conftest.$ac_ext <<_ACEOF
18297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018298
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018299/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018300#ifdef __cplusplus
18301extern "C"
18302#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018303/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018304 builtin and then its argument prototype would still apply. */
18305char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018306int
18307main ()
18308{
18309__fpu_control ();
18310 ;
18311 return 0;
18312}
18313_ACEOF
18314rm -f conftest.$ac_objext conftest$ac_exeext
18315if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018316 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018318 grep -v '^ *+' conftest.er1 >conftest.err
18319 rm -f conftest.er1
18320 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18322 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018323 { ac_try='test -z "$ac_c_werror_flag"
18324 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18326 (eval $ac_try) 2>&5
18327 ac_status=$?
18328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18329 (exit $ac_status); }; } &&
18330 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18332 (eval $ac_try) 2>&5
18333 ac_status=$?
18334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18335 (exit $ac_status); }; }; then
18336 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018337else
Martin v. Löwis11437992002-04-12 09:54:03 +000018338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018339sed 's/^/| /' conftest.$ac_ext >&5
18340
Martin v. Löwis11437992002-04-12 09:54:03 +000018341ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018342fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018343rm -f conftest.err conftest.$ac_objext \
18344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018345LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018347echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
18348echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
18349if test $ac_cv_lib_ieee___fpu_control = yes; then
18350 cat >>confdefs.h <<_ACEOF
18351#define HAVE_LIBIEEE 1
18352_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018353
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018354 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018355
Guido van Rossum627b2d71993-12-24 10:39:16 +000018356fi
18357
Michael W. Hudson54241132001-12-07 15:38:26 +000018358
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018359fi
18360
Michael W. Hudson54241132001-12-07 15:38:26 +000018361
Guido van Rossum7f253911997-05-09 02:42:48 +000018362# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000018363echo "$as_me:$LINENO: checking for --with-fpectl" >&5
18364echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
18365
Guido van Rossum7f253911997-05-09 02:42:48 +000018366# Check whether --with-fpectl or --without-fpectl was given.
18367if test "${with_fpectl+set}" = set; then
18368 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000018369
Guido van Rossum7f253911997-05-09 02:42:48 +000018370if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018371then
18372
18373cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000018374#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018375_ACEOF
18376
18377 echo "$as_me:$LINENO: result: yes" >&5
18378echo "${ECHO_T}yes" >&6
18379else echo "$as_me:$LINENO: result: no" >&5
18380echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018381fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018382else
Martin v. Löwis11437992002-04-12 09:54:03 +000018383 echo "$as_me:$LINENO: result: no" >&5
18384echo "${ECHO_T}no" >&6
18385fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000018386
Guido van Rossum7f43da71994-08-01 12:15:30 +000018387# check for --with-libm=...
18388
Guido van Rossum563e7081996-09-10 18:20:48 +000018389case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000018390Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000018391BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000018392*) LIBM=-lm
18393esac
Martin v. Löwis11437992002-04-12 09:54:03 +000018394echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
18395echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
18396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018397# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018398if test "${with_libm+set}" = set; then
18399 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000018400
Guido van Rossum7f253911997-05-09 02:42:48 +000018401if test "$withval" = no
18402then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000018403 echo "$as_me:$LINENO: result: force LIBM empty" >&5
18404echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018405elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018406then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018407 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
18408echo "${ECHO_T}set LIBM=\"$withval\"" >&6
18409else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
18410echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
18411 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018412fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018413else
Martin v. Löwis11437992002-04-12 09:54:03 +000018414 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
18415echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
18416fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018417
18418# check for --with-libc=...
18419
Martin v. Löwis11437992002-04-12 09:54:03 +000018420echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18421echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18422
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018423# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018424if test "${with_libc+set}" = set; then
18425 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018426
Guido van Rossum7f253911997-05-09 02:42:48 +000018427if test "$withval" = no
18428then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18430echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018431elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018432then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018433 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18434echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18435else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18436echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18437 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018438fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018439else
Martin v. Löwis11437992002-04-12 09:54:03 +000018440 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18441echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18442fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018443
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018444# check for hypot() in math library
18445LIBS_SAVE=$LIBS
18446LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018447
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018448for ac_func in hypot
18449do
Martin v. Löwis11437992002-04-12 09:54:03 +000018450as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18451echo "$as_me:$LINENO: checking for $ac_func" >&5
18452echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18453if eval "test \"\${$as_ac_var+set}\" = set"; then
18454 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018455else
Martin v. Löwis11437992002-04-12 09:54:03 +000018456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018457/* confdefs.h. */
18458_ACEOF
18459cat confdefs.h >>conftest.$ac_ext
18460cat >>conftest.$ac_ext <<_ACEOF
18461/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018462/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018463 which can conflict with char $ac_func (); below.
18464 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018465 <limits.h> exists even on freestanding compilers. Under hpux,
18466 including <limits.h> includes <sys/time.h> and causes problems
18467 checking for functions defined therein. */
18468#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018469# include <limits.h>
18470#else
18471# include <assert.h>
18472#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018473/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018474#ifdef __cplusplus
18475extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018476{
Martin v. Löwis11437992002-04-12 09:54:03 +000018477#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018478/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018479 builtin and then its argument prototype would still apply. */
18480char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018481/* The GNU C library defines this for functions which it implements
18482 to always fail with ENOSYS. Some functions are actually named
18483 something starting with __ and the normal name is an alias. */
18484#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18485choke me
18486#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018487char (*f) () = $ac_func;
18488#endif
18489#ifdef __cplusplus
18490}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018491#endif
18492
Skip Montanaro6dead952003-09-25 14:50:04 +000018493int
18494main ()
18495{
18496return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018497 ;
18498 return 0;
18499}
18500_ACEOF
18501rm -f conftest.$ac_objext conftest$ac_exeext
18502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018503 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018505 grep -v '^ *+' conftest.er1 >conftest.err
18506 rm -f conftest.er1
18507 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18509 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018510 { ac_try='test -z "$ac_c_werror_flag"
18511 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18513 (eval $ac_try) 2>&5
18514 ac_status=$?
18515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18516 (exit $ac_status); }; } &&
18517 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18519 (eval $ac_try) 2>&5
18520 ac_status=$?
18521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18522 (exit $ac_status); }; }; then
18523 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018524else
Martin v. Löwis11437992002-04-12 09:54:03 +000018525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018526sed 's/^/| /' conftest.$ac_ext >&5
18527
Martin v. Löwis11437992002-04-12 09:54:03 +000018528eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018529fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018530rm -f conftest.err conftest.$ac_objext \
18531 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018533echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18534echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18535if test `eval echo '${'$as_ac_var'}'` = yes; then
18536 cat >>confdefs.h <<_ACEOF
18537#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18538_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018539
Michael W. Hudson54241132001-12-07 15:38:26 +000018540else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018541 case $LIBOBJS in
18542 "$ac_func.$ac_objext" | \
18543 *" $ac_func.$ac_objext" | \
18544 "$ac_func.$ac_objext "* | \
18545 *" $ac_func.$ac_objext "* ) ;;
18546 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18547esac
18548
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018549fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018550done
18551
Michael W. Hudson54241132001-12-07 15:38:26 +000018552
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018553LIBS=$LIBS_SAVE
18554
Guido van Rossumef2255b2000-03-10 22:30:29 +000018555# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018556if test "${ac_cv_header_wchar_h+set}" = set; then
18557 echo "$as_me:$LINENO: checking for wchar.h" >&5
18558echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18559if test "${ac_cv_header_wchar_h+set}" = set; then
18560 echo $ECHO_N "(cached) $ECHO_C" >&6
18561fi
18562echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18563echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018564else
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 # Is the header compilable?
18566echo "$as_me:$LINENO: checking wchar.h usability" >&5
18567echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18568cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018569/* confdefs.h. */
18570_ACEOF
18571cat confdefs.h >>conftest.$ac_ext
18572cat >>conftest.$ac_ext <<_ACEOF
18573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018574$ac_includes_default
18575#include <wchar.h>
18576_ACEOF
18577rm -f conftest.$ac_objext
18578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018579 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018581 grep -v '^ *+' conftest.er1 >conftest.err
18582 rm -f conftest.er1
18583 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18585 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018586 { ac_try='test -z "$ac_c_werror_flag"
18587 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18589 (eval $ac_try) 2>&5
18590 ac_status=$?
18591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18592 (exit $ac_status); }; } &&
18593 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18595 (eval $ac_try) 2>&5
18596 ac_status=$?
18597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18598 (exit $ac_status); }; }; then
18599 ac_header_compiler=yes
18600else
18601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018602sed 's/^/| /' conftest.$ac_ext >&5
18603
Martin v. Löwis11437992002-04-12 09:54:03 +000018604ac_header_compiler=no
18605fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018606rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018607echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18608echo "${ECHO_T}$ac_header_compiler" >&6
18609
18610# Is the header present?
18611echo "$as_me:$LINENO: checking wchar.h presence" >&5
18612echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18613cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018614/* confdefs.h. */
18615_ACEOF
18616cat confdefs.h >>conftest.$ac_ext
18617cat >>conftest.$ac_ext <<_ACEOF
18618/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018619#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018620_ACEOF
18621if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18622 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18623 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018624 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 rm -f conftest.er1
18626 cat conftest.err >&5
18627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18628 (exit $ac_status); } >/dev/null; then
18629 if test -s conftest.err; then
18630 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018631 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018632 else
18633 ac_cpp_err=
18634 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018635else
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 ac_cpp_err=yes
18637fi
18638if test -z "$ac_cpp_err"; then
18639 ac_header_preproc=yes
18640else
18641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018642sed 's/^/| /' conftest.$ac_ext >&5
18643
Martin v. Löwis11437992002-04-12 09:54:03 +000018644 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018645fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018646rm -f conftest.err conftest.$ac_ext
18647echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18648echo "${ECHO_T}$ac_header_preproc" >&6
18649
18650# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018651case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18652 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018653 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18654echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018655 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18656echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18657 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018658 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018659 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018660 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18661echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018662 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18663echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18664 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18665echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18666 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18667echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018668 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18669echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018670 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18671echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018672 (
18673 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000018674## ------------------------------------------------ ##
18675## Report this to http://www.python.org/python-bugs ##
18676## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018677_ASBOX
18678 ) |
18679 sed "s/^/$as_me: WARNING: /" >&2
18680 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018681esac
18682echo "$as_me:$LINENO: checking for wchar.h" >&5
18683echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18684if test "${ac_cv_header_wchar_h+set}" = set; then
18685 echo $ECHO_N "(cached) $ECHO_C" >&6
18686else
18687 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018689echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18690echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18691
18692fi
18693if test $ac_cv_header_wchar_h = yes; then
18694
18695
18696cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018697#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018698_ACEOF
18699
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018700 wchar_h="yes"
18701
Guido van Rossumef2255b2000-03-10 22:30:29 +000018702else
Martin v. Löwis11437992002-04-12 09:54:03 +000018703 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018704
18705fi
18706
Michael W. Hudson54241132001-12-07 15:38:26 +000018707
Martin v. Löwis11437992002-04-12 09:54:03 +000018708
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018709# determine wchar_t size
18710if test "$wchar_h" = yes
18711then
Martin v. Löwis11437992002-04-12 09:54:03 +000018712 echo "$as_me:$LINENO: checking for wchar_t" >&5
18713echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18714if test "${ac_cv_type_wchar_t+set}" = set; then
18715 echo $ECHO_N "(cached) $ECHO_C" >&6
18716else
18717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018718/* confdefs.h. */
18719_ACEOF
18720cat confdefs.h >>conftest.$ac_ext
18721cat >>conftest.$ac_ext <<_ACEOF
18722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018723#include <wchar.h>
18724
Martin v. Löwis11437992002-04-12 09:54:03 +000018725int
18726main ()
18727{
18728if ((wchar_t *) 0)
18729 return 0;
18730if (sizeof (wchar_t))
18731 return 0;
18732 ;
18733 return 0;
18734}
18735_ACEOF
18736rm -f conftest.$ac_objext
18737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018738 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018740 grep -v '^ *+' conftest.er1 >conftest.err
18741 rm -f conftest.er1
18742 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18744 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018745 { ac_try='test -z "$ac_c_werror_flag"
18746 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18748 (eval $ac_try) 2>&5
18749 ac_status=$?
18750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18751 (exit $ac_status); }; } &&
18752 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18754 (eval $ac_try) 2>&5
18755 ac_status=$?
18756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18757 (exit $ac_status); }; }; then
18758 ac_cv_type_wchar_t=yes
18759else
18760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018761sed 's/^/| /' conftest.$ac_ext >&5
18762
Martin v. Löwis11437992002-04-12 09:54:03 +000018763ac_cv_type_wchar_t=no
18764fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018765rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018766fi
18767echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18768echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18769
18770echo "$as_me:$LINENO: checking size of wchar_t" >&5
18771echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18772if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18773 echo $ECHO_N "(cached) $ECHO_C" >&6
18774else
18775 if test "$ac_cv_type_wchar_t" = yes; then
18776 # The cast to unsigned long works around a bug in the HP C Compiler
18777 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18778 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18779 # This bug is HP SR number 8606223364.
18780 if test "$cross_compiling" = yes; then
18781 # Depending upon the size, compute the lo and hi bounds.
18782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018783/* confdefs.h. */
18784_ACEOF
18785cat confdefs.h >>conftest.$ac_ext
18786cat >>conftest.$ac_ext <<_ACEOF
18787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018788#include <wchar.h>
18789
Martin v. Löwis11437992002-04-12 09:54:03 +000018790int
18791main ()
18792{
18793static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
18794test_array [0] = 0
18795
18796 ;
18797 return 0;
18798}
18799_ACEOF
18800rm -f conftest.$ac_objext
18801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018802 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018804 grep -v '^ *+' conftest.er1 >conftest.err
18805 rm -f conftest.er1
18806 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18808 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018809 { ac_try='test -z "$ac_c_werror_flag"
18810 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18812 (eval $ac_try) 2>&5
18813 ac_status=$?
18814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18815 (exit $ac_status); }; } &&
18816 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18818 (eval $ac_try) 2>&5
18819 ac_status=$?
18820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18821 (exit $ac_status); }; }; then
18822 ac_lo=0 ac_mid=0
18823 while :; do
18824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018825/* confdefs.h. */
18826_ACEOF
18827cat confdefs.h >>conftest.$ac_ext
18828cat >>conftest.$ac_ext <<_ACEOF
18829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018830#include <wchar.h>
18831
Martin v. Löwis11437992002-04-12 09:54:03 +000018832int
18833main ()
18834{
18835static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18836test_array [0] = 0
18837
18838 ;
18839 return 0;
18840}
18841_ACEOF
18842rm -f conftest.$ac_objext
18843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018844 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018846 grep -v '^ *+' conftest.er1 >conftest.err
18847 rm -f conftest.er1
18848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18850 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018851 { ac_try='test -z "$ac_c_werror_flag"
18852 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18854 (eval $ac_try) 2>&5
18855 ac_status=$?
18856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18857 (exit $ac_status); }; } &&
18858 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18860 (eval $ac_try) 2>&5
18861 ac_status=$?
18862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18863 (exit $ac_status); }; }; then
18864 ac_hi=$ac_mid; break
18865else
18866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018867sed 's/^/| /' conftest.$ac_ext >&5
18868
Martin v. Löwis11437992002-04-12 09:54:03 +000018869ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018870 if test $ac_lo -le $ac_mid; then
18871 ac_lo= ac_hi=
18872 break
18873 fi
18874 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000018875fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018876rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018877 done
18878else
18879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018880sed 's/^/| /' conftest.$ac_ext >&5
18881
Martin v. Löwis11437992002-04-12 09:54:03 +000018882cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018883/* confdefs.h. */
18884_ACEOF
18885cat confdefs.h >>conftest.$ac_ext
18886cat >>conftest.$ac_ext <<_ACEOF
18887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018888#include <wchar.h>
18889
Martin v. Löwis11437992002-04-12 09:54:03 +000018890int
18891main ()
18892{
18893static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
18894test_array [0] = 0
18895
18896 ;
18897 return 0;
18898}
18899_ACEOF
18900rm -f conftest.$ac_objext
18901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018902 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018904 grep -v '^ *+' conftest.er1 >conftest.err
18905 rm -f conftest.er1
18906 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18908 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018909 { ac_try='test -z "$ac_c_werror_flag"
18910 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18912 (eval $ac_try) 2>&5
18913 ac_status=$?
18914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18915 (exit $ac_status); }; } &&
18916 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18918 (eval $ac_try) 2>&5
18919 ac_status=$?
18920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18921 (exit $ac_status); }; }; then
18922 ac_hi=-1 ac_mid=-1
18923 while :; do
18924 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018925/* confdefs.h. */
18926_ACEOF
18927cat confdefs.h >>conftest.$ac_ext
18928cat >>conftest.$ac_ext <<_ACEOF
18929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018930#include <wchar.h>
18931
Martin v. Löwis11437992002-04-12 09:54:03 +000018932int
18933main ()
18934{
18935static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
18936test_array [0] = 0
18937
18938 ;
18939 return 0;
18940}
18941_ACEOF
18942rm -f conftest.$ac_objext
18943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018944 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018946 grep -v '^ *+' conftest.er1 >conftest.err
18947 rm -f conftest.er1
18948 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18950 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018951 { ac_try='test -z "$ac_c_werror_flag"
18952 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18954 (eval $ac_try) 2>&5
18955 ac_status=$?
18956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18957 (exit $ac_status); }; } &&
18958 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18960 (eval $ac_try) 2>&5
18961 ac_status=$?
18962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18963 (exit $ac_status); }; }; then
18964 ac_lo=$ac_mid; break
18965else
18966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018967sed 's/^/| /' conftest.$ac_ext >&5
18968
Martin v. Löwis11437992002-04-12 09:54:03 +000018969ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018970 if test $ac_mid -le $ac_hi; then
18971 ac_lo= ac_hi=
18972 break
18973 fi
18974 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000018975fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018977 done
18978else
18979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018980sed 's/^/| /' conftest.$ac_ext >&5
18981
Martin v. Löwis11437992002-04-12 09:54:03 +000018982ac_lo= ac_hi=
18983fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018984rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018985fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018986rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018987# Binary search between lo and hi bounds.
18988while test "x$ac_lo" != "x$ac_hi"; do
18989 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018991/* confdefs.h. */
18992_ACEOF
18993cat confdefs.h >>conftest.$ac_ext
18994cat >>conftest.$ac_ext <<_ACEOF
18995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018996#include <wchar.h>
18997
Martin v. Löwis11437992002-04-12 09:54:03 +000018998int
18999main ()
19000{
19001static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19002test_array [0] = 0
19003
19004 ;
19005 return 0;
19006}
19007_ACEOF
19008rm -f conftest.$ac_objext
19009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019010 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019012 grep -v '^ *+' conftest.er1 >conftest.err
19013 rm -f conftest.er1
19014 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19016 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019017 { ac_try='test -z "$ac_c_werror_flag"
19018 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19020 (eval $ac_try) 2>&5
19021 ac_status=$?
19022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19023 (exit $ac_status); }; } &&
19024 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19026 (eval $ac_try) 2>&5
19027 ac_status=$?
19028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19029 (exit $ac_status); }; }; then
19030 ac_hi=$ac_mid
19031else
19032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019033sed 's/^/| /' conftest.$ac_ext >&5
19034
Martin v. Löwis11437992002-04-12 09:54:03 +000019035ac_lo=`expr '(' $ac_mid ')' + 1`
19036fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019037rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019038done
19039case $ac_lo in
19040?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019041'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19042See \`config.log' for more details." >&5
19043echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19044See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019045 { (exit 1); exit 1; }; } ;;
19046esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019047else
19048 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000019049 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19050See \`config.log' for more details." >&5
19051echo "$as_me: error: cannot run test program while cross compiling
19052See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019053 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000019054else
Martin v. Löwis11437992002-04-12 09:54:03 +000019055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019056/* confdefs.h. */
19057_ACEOF
19058cat confdefs.h >>conftest.$ac_ext
19059cat >>conftest.$ac_ext <<_ACEOF
19060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019061#include <wchar.h>
19062
19063long longval () { return (long) (sizeof (wchar_t)); }
19064unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000019065#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019066#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019067int
19068main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019069{
Martin v. Löwis11437992002-04-12 09:54:03 +000019070
19071 FILE *f = fopen ("conftest.val", "w");
19072 if (! f)
19073 exit (1);
19074 if (((long) (sizeof (wchar_t))) < 0)
19075 {
19076 long i = longval ();
19077 if (i != ((long) (sizeof (wchar_t))))
19078 exit (1);
19079 fprintf (f, "%ld\n", i);
19080 }
19081 else
19082 {
19083 unsigned long i = ulongval ();
19084 if (i != ((long) (sizeof (wchar_t))))
19085 exit (1);
19086 fprintf (f, "%lu\n", i);
19087 }
19088 exit (ferror (f) || fclose (f) != 0);
19089
19090 ;
19091 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000019092}
Martin v. Löwis11437992002-04-12 09:54:03 +000019093_ACEOF
19094rm -f conftest$ac_exeext
19095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19096 (eval $ac_link) 2>&5
19097 ac_status=$?
19098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19100 { (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); }; }; then
19105 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000019106else
Martin v. Löwis11437992002-04-12 09:54:03 +000019107 echo "$as_me: program exited with status $ac_status" >&5
19108echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019109sed 's/^/| /' conftest.$ac_ext >&5
19110
Martin v. Löwis11437992002-04-12 09:54:03 +000019111( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000019112{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19113See \`config.log' for more details." >&5
19114echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19115See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019116 { (exit 1); exit 1; }; }
19117fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019118rm -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 +000019119fi
19120fi
19121rm -f conftest.val
19122else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019123 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000019124fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019126echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
19127echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
19128cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019129#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019130_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019131
Michael W. Hudson54241132001-12-07 15:38:26 +000019132
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019133fi
19134
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019135echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
19136echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
19137have_ucs4_tcl=no
19138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019139/* confdefs.h. */
19140_ACEOF
19141cat confdefs.h >>conftest.$ac_ext
19142cat >>conftest.$ac_ext <<_ACEOF
19143/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019144
19145#include <tcl.h>
19146#if TCL_UTF_MAX != 6
19147# error "NOT UCS4_TCL"
19148#endif
19149int
19150main ()
19151{
19152
19153 ;
19154 return 0;
19155}
19156_ACEOF
19157rm -f conftest.$ac_objext
19158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019159 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019161 grep -v '^ *+' conftest.er1 >conftest.err
19162 rm -f conftest.er1
19163 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19165 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019166 { ac_try='test -z "$ac_c_werror_flag"
19167 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19169 (eval $ac_try) 2>&5
19170 ac_status=$?
19171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19172 (exit $ac_status); }; } &&
19173 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19175 (eval $ac_try) 2>&5
19176 ac_status=$?
19177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19178 (exit $ac_status); }; }; then
19179
19180
19181cat >>confdefs.h <<\_ACEOF
19182#define HAVE_UCS4_TCL 1
19183_ACEOF
19184
19185 have_ucs4_tcl=yes
19186
19187else
19188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019189sed 's/^/| /' conftest.$ac_ext >&5
19190
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019191fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019192rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019193echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
19194echo "${ECHO_T}$have_ucs4_tcl" >&6
19195
Skip Montanaro6dead952003-09-25 14:50:04 +000019196# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019197if test "$wchar_h" = yes
19198then
19199 # check whether wchar_t is signed or not
19200 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
19201echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
19202 if test "${ac_cv_wchar_t_signed+set}" = set; then
19203 echo $ECHO_N "(cached) $ECHO_C" >&6
19204else
19205
19206 if test "$cross_compiling" = yes; then
19207 ac_cv_wchar_t_signed=yes
19208else
19209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019210/* confdefs.h. */
19211_ACEOF
19212cat confdefs.h >>conftest.$ac_ext
19213cat >>conftest.$ac_ext <<_ACEOF
19214/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019215
19216 #include <wchar.h>
19217 int main()
19218 {
19219 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
19220 }
19221
19222_ACEOF
19223rm -f conftest$ac_exeext
19224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19225 (eval $ac_link) 2>&5
19226 ac_status=$?
19227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19228 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19230 (eval $ac_try) 2>&5
19231 ac_status=$?
19232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19233 (exit $ac_status); }; }; then
19234 ac_cv_wchar_t_signed=yes
19235else
19236 echo "$as_me: program exited with status $ac_status" >&5
19237echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019238sed 's/^/| /' conftest.$ac_ext >&5
19239
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019240( exit $ac_status )
19241ac_cv_wchar_t_signed=no
19242fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019243rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019244fi
19245fi
19246
19247 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
19248echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
19249fi
19250
Martin v. Löwis11437992002-04-12 09:54:03 +000019251echo "$as_me:$LINENO: checking what type to use for unicode" >&5
19252echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019253# Check whether --enable-unicode or --disable-unicode was given.
19254if test "${enable_unicode+set}" = set; then
19255 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000019256
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019257else
19258 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000019259fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019260
19261if test $enable_unicode = yes
19262then
Martin v. Löwisfd917792001-06-27 20:22:04 +000019263 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019264 case "$have_ucs4_tcl" in
19265 yes) enable_unicode="ucs4"
19266 ;;
19267 *) enable_unicode="ucs2"
19268 ;;
19269 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019270fi
19271
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019272
19273
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019274case "$enable_unicode" in
19275ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000019276 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019277#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000019278_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019279
19280 ;;
19281ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000019282 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019283#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000019284_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019285
19286 ;;
19287esac
19288
Michael W. Hudson54241132001-12-07 15:38:26 +000019289
Martin v. Löwis11437992002-04-12 09:54:03 +000019290
19291
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019292
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019293if test "$enable_unicode" = "no"
19294then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019295 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000019296 echo "$as_me:$LINENO: result: not used" >&5
19297echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019298else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019299 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000019300
19301cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019302#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019303_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019304
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019305
19306 # wchar_t is only usable if it maps to an unsigned type
19307 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000019308 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019309 then
19310 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019311
Martin v. Löwis11437992002-04-12 09:54:03 +000019312cat >>confdefs.h <<\_ACEOF
19313#define HAVE_USABLE_WCHAR_T 1
19314_ACEOF
19315
19316 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019317#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019318_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019319
19320 elif test "$ac_cv_sizeof_short" = "$unicode_size"
19321 then
19322 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000019323 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019324#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000019325_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019326
19327 elif test "$ac_cv_sizeof_long" = "$unicode_size"
19328 then
19329 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000019330 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019331#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000019332_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019333
19334 else
19335 PY_UNICODE_TYPE="no type found"
19336 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019337 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
19338echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019339fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019340
19341# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019342echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
19343echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
19344if test "${ac_cv_c_bigendian+set}" = set; then
19345 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019346else
Martin v. Löwis11437992002-04-12 09:54:03 +000019347 # See if sys/param.h defines the BYTE_ORDER macro.
19348cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019349/* confdefs.h. */
19350_ACEOF
19351cat confdefs.h >>conftest.$ac_ext
19352cat >>conftest.$ac_ext <<_ACEOF
19353/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019354#include <sys/types.h>
19355#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019356
Martin v. Löwis11437992002-04-12 09:54:03 +000019357int
19358main ()
19359{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019360#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
19361 bogus endian macros
19362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019363
19364 ;
19365 return 0;
19366}
19367_ACEOF
19368rm -f conftest.$ac_objext
19369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019370 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019372 grep -v '^ *+' conftest.er1 >conftest.err
19373 rm -f conftest.er1
19374 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19376 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019377 { ac_try='test -z "$ac_c_werror_flag"
19378 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19380 (eval $ac_try) 2>&5
19381 ac_status=$?
19382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19383 (exit $ac_status); }; } &&
19384 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19386 (eval $ac_try) 2>&5
19387 ac_status=$?
19388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19389 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019390 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000019391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019392/* confdefs.h. */
19393_ACEOF
19394cat confdefs.h >>conftest.$ac_ext
19395cat >>conftest.$ac_ext <<_ACEOF
19396/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019397#include <sys/types.h>
19398#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019399
Martin v. Löwis11437992002-04-12 09:54:03 +000019400int
19401main ()
19402{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019403#if BYTE_ORDER != BIG_ENDIAN
19404 not big endian
19405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019406
19407 ;
19408 return 0;
19409}
19410_ACEOF
19411rm -f conftest.$ac_objext
19412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019413 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019415 grep -v '^ *+' conftest.er1 >conftest.err
19416 rm -f conftest.er1
19417 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19419 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019420 { ac_try='test -z "$ac_c_werror_flag"
19421 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19423 (eval $ac_try) 2>&5
19424 ac_status=$?
19425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19426 (exit $ac_status); }; } &&
19427 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19429 (eval $ac_try) 2>&5
19430 ac_status=$?
19431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19432 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019433 ac_cv_c_bigendian=yes
19434else
Martin v. Löwis11437992002-04-12 09:54:03 +000019435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019436sed 's/^/| /' conftest.$ac_ext >&5
19437
Martin v. Löwis11437992002-04-12 09:54:03 +000019438ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019439fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019440rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019441else
Martin v. Löwis11437992002-04-12 09:54:03 +000019442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019443sed 's/^/| /' conftest.$ac_ext >&5
19444
Martin v. Löwis11437992002-04-12 09:54:03 +000019445# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019446if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019447 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019448 ac_cv_c_bigendian=unknown
19449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019450/* confdefs.h. */
19451_ACEOF
19452cat confdefs.h >>conftest.$ac_ext
19453cat >>conftest.$ac_ext <<_ACEOF
19454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019455short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19456short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19457void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19458short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19459short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19460void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019461int
19462main ()
19463{
19464 _ascii (); _ebcdic ();
19465 ;
19466 return 0;
19467}
19468_ACEOF
19469rm -f conftest.$ac_objext
19470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019471 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019473 grep -v '^ *+' conftest.er1 >conftest.err
19474 rm -f conftest.er1
19475 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19477 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019478 { ac_try='test -z "$ac_c_werror_flag"
19479 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19481 (eval $ac_try) 2>&5
19482 ac_status=$?
19483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19484 (exit $ac_status); }; } &&
19485 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19487 (eval $ac_try) 2>&5
19488 ac_status=$?
19489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19490 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019491 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019492 ac_cv_c_bigendian=yes
19493fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019494if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019495 if test "$ac_cv_c_bigendian" = unknown; then
19496 ac_cv_c_bigendian=no
19497 else
19498 # finding both strings is unlikely to happen, but who knows?
19499 ac_cv_c_bigendian=unknown
19500 fi
19501fi
19502else
19503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019504sed 's/^/| /' conftest.$ac_ext >&5
19505
Martin v. Löwis11437992002-04-12 09:54:03 +000019506fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019507rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019508else
19509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019510/* confdefs.h. */
19511_ACEOF
19512cat confdefs.h >>conftest.$ac_ext
19513cat >>conftest.$ac_ext <<_ACEOF
19514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019515int
19516main ()
19517{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019518 /* Are we little or big endian? From Harbison&Steele. */
19519 union
19520 {
19521 long l;
19522 char c[sizeof (long)];
19523 } u;
19524 u.l = 1;
19525 exit (u.c[sizeof (long) - 1] == 1);
19526}
Martin v. Löwis11437992002-04-12 09:54:03 +000019527_ACEOF
19528rm -f conftest$ac_exeext
19529if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19530 (eval $ac_link) 2>&5
19531 ac_status=$?
19532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19535 (eval $ac_try) 2>&5
19536 ac_status=$?
19537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19538 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019539 ac_cv_c_bigendian=no
19540else
Martin v. Löwis11437992002-04-12 09:54:03 +000019541 echo "$as_me: program exited with status $ac_status" >&5
19542echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019543sed 's/^/| /' conftest.$ac_ext >&5
19544
Martin v. Löwis11437992002-04-12 09:54:03 +000019545( exit $ac_status )
19546ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019547fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019549fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019550fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019551rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019552fi
19553echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19554echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19555case $ac_cv_c_bigendian in
19556 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019557
Martin v. Löwis11437992002-04-12 09:54:03 +000019558cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019559#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019560_ACEOF
19561 ;;
19562 no)
19563 ;;
19564 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019565 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019566presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019567echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019568presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19569 { (exit 1); exit 1; }; } ;;
19570esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019571
Michael W. Hudson54241132001-12-07 15:38:26 +000019572
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019573# Check whether right shifting a negative integer extends the sign bit
19574# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019575echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19576echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19577if test "${ac_cv_rshift_extends_sign+set}" = set; then
19578 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019579else
Martin v. Löwis11437992002-04-12 09:54:03 +000019580
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019581if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019582 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019583else
Martin v. Löwis11437992002-04-12 09:54:03 +000019584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019585/* confdefs.h. */
19586_ACEOF
19587cat confdefs.h >>conftest.$ac_ext
19588cat >>conftest.$ac_ext <<_ACEOF
19589/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019590
19591int main()
19592{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019593 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019594}
19595
Martin v. Löwis11437992002-04-12 09:54:03 +000019596_ACEOF
19597rm -f conftest$ac_exeext
19598if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19599 (eval $ac_link) 2>&5
19600 ac_status=$?
19601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19602 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19603 { (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
Vladimir Marangozova6180282000-07-12 05:05:06 +000019608 ac_cv_rshift_extends_sign=yes
19609else
Martin v. Löwis11437992002-04-12 09:54:03 +000019610 echo "$as_me: program exited with status $ac_status" >&5
19611echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019612sed 's/^/| /' conftest.$ac_ext >&5
19613
Martin v. Löwis11437992002-04-12 09:54:03 +000019614( exit $ac_status )
19615ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019616fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019617rm -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 +000019618fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019619fi
19620
Martin v. Löwis11437992002-04-12 09:54:03 +000019621echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19622echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019623if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019624then
Martin v. Löwis11437992002-04-12 09:54:03 +000019625
19626cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019627#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019628_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019629
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019630fi
19631
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019632# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019633echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19634echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19635if test "${ac_cv_have_getc_unlocked+set}" = set; then
19636 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019637else
Martin v. Löwis11437992002-04-12 09:54:03 +000019638
19639cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019640/* confdefs.h. */
19641_ACEOF
19642cat confdefs.h >>conftest.$ac_ext
19643cat >>conftest.$ac_ext <<_ACEOF
19644/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019645#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019646int
19647main ()
19648{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019649
19650 FILE *f = fopen("/dev/null", "r");
19651 flockfile(f);
19652 getc_unlocked(f);
19653 funlockfile(f);
19654
Martin v. Löwis11437992002-04-12 09:54:03 +000019655 ;
19656 return 0;
19657}
19658_ACEOF
19659rm -f conftest.$ac_objext conftest$ac_exeext
19660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019661 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019663 grep -v '^ *+' conftest.er1 >conftest.err
19664 rm -f conftest.er1
19665 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19667 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019668 { ac_try='test -z "$ac_c_werror_flag"
19669 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19671 (eval $ac_try) 2>&5
19672 ac_status=$?
19673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19674 (exit $ac_status); }; } &&
19675 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19677 (eval $ac_try) 2>&5
19678 ac_status=$?
19679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19680 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019681 ac_cv_have_getc_unlocked=yes
19682else
Martin v. Löwis11437992002-04-12 09:54:03 +000019683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019684sed 's/^/| /' conftest.$ac_ext >&5
19685
Martin v. Löwis11437992002-04-12 09:54:03 +000019686ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019687fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019688rm -f conftest.err conftest.$ac_objext \
19689 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019690fi
19691
Martin v. Löwis11437992002-04-12 09:54:03 +000019692echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19693echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019694if test "$ac_cv_have_getc_unlocked" = yes
19695then
Martin v. Löwis11437992002-04-12 09:54:03 +000019696
19697cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019698#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019699_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019700
19701fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019702
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000019703# check where readline lives
19704
19705echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
19706echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
19707if test "${ac_cv_lib_readline_readline+set}" = set; then
19708 echo $ECHO_N "(cached) $ECHO_C" >&6
19709else
19710 ac_check_lib_save_LIBS=$LIBS
19711LIBS="-lreadline $LIBS"
19712cat >conftest.$ac_ext <<_ACEOF
19713/* confdefs.h. */
19714_ACEOF
19715cat confdefs.h >>conftest.$ac_ext
19716cat >>conftest.$ac_ext <<_ACEOF
19717/* end confdefs.h. */
19718
19719/* Override any gcc2 internal prototype to avoid an error. */
19720#ifdef __cplusplus
19721extern "C"
19722#endif
19723/* We use char because int might match the return type of a gcc2
19724 builtin and then its argument prototype would still apply. */
19725char readline ();
19726int
19727main ()
19728{
19729readline ();
19730 ;
19731 return 0;
19732}
19733_ACEOF
19734rm -f conftest.$ac_objext conftest$ac_exeext
19735if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19736 (eval $ac_link) 2>conftest.er1
19737 ac_status=$?
19738 grep -v '^ *+' conftest.er1 >conftest.err
19739 rm -f conftest.er1
19740 cat conftest.err >&5
19741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19742 (exit $ac_status); } &&
19743 { ac_try='test -z "$ac_c_werror_flag"
19744 || test ! -s conftest.err'
19745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19746 (eval $ac_try) 2>&5
19747 ac_status=$?
19748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19749 (exit $ac_status); }; } &&
19750 { ac_try='test -s conftest$ac_exeext'
19751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19752 (eval $ac_try) 2>&5
19753 ac_status=$?
19754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19755 (exit $ac_status); }; }; then
19756 ac_cv_lib_readline_readline=yes
19757else
19758 echo "$as_me: failed program was:" >&5
19759sed 's/^/| /' conftest.$ac_ext >&5
19760
19761ac_cv_lib_readline_readline=no
19762fi
19763rm -f conftest.err conftest.$ac_objext \
19764 conftest$ac_exeext conftest.$ac_ext
19765LIBS=$ac_check_lib_save_LIBS
19766fi
19767echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
19768echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
19769if test $ac_cv_lib_readline_readline = yes; then
19770 cat >>confdefs.h <<_ACEOF
19771#define HAVE_LIBREADLINE 1
19772_ACEOF
19773
19774 LIBS="-lreadline $LIBS"
19775
19776fi
19777
19778if test "$ac_cv_have_readline_readline" = no
19779then
19780
19781echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
19782echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
19783if test "${ac_cv_lib_termcap_readline+set}" = set; then
19784 echo $ECHO_N "(cached) $ECHO_C" >&6
19785else
19786 ac_check_lib_save_LIBS=$LIBS
19787LIBS="-ltermcap $LIBS"
19788cat >conftest.$ac_ext <<_ACEOF
19789/* confdefs.h. */
19790_ACEOF
19791cat confdefs.h >>conftest.$ac_ext
19792cat >>conftest.$ac_ext <<_ACEOF
19793/* end confdefs.h. */
19794
19795/* Override any gcc2 internal prototype to avoid an error. */
19796#ifdef __cplusplus
19797extern "C"
19798#endif
19799/* We use char because int might match the return type of a gcc2
19800 builtin and then its argument prototype would still apply. */
19801char readline ();
19802int
19803main ()
19804{
19805readline ();
19806 ;
19807 return 0;
19808}
19809_ACEOF
19810rm -f conftest.$ac_objext conftest$ac_exeext
19811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19812 (eval $ac_link) 2>conftest.er1
19813 ac_status=$?
19814 grep -v '^ *+' conftest.er1 >conftest.err
19815 rm -f conftest.er1
19816 cat conftest.err >&5
19817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19818 (exit $ac_status); } &&
19819 { ac_try='test -z "$ac_c_werror_flag"
19820 || test ! -s conftest.err'
19821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19822 (eval $ac_try) 2>&5
19823 ac_status=$?
19824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19825 (exit $ac_status); }; } &&
19826 { ac_try='test -s conftest$ac_exeext'
19827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19828 (eval $ac_try) 2>&5
19829 ac_status=$?
19830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19831 (exit $ac_status); }; }; then
19832 ac_cv_lib_termcap_readline=yes
19833else
19834 echo "$as_me: failed program was:" >&5
19835sed 's/^/| /' conftest.$ac_ext >&5
19836
19837ac_cv_lib_termcap_readline=no
19838fi
19839rm -f conftest.err conftest.$ac_objext \
19840 conftest$ac_exeext conftest.$ac_ext
19841LIBS=$ac_check_lib_save_LIBS
19842fi
19843echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
19844echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
19845if test $ac_cv_lib_termcap_readline = yes; then
19846 cat >>confdefs.h <<_ACEOF
19847#define HAVE_LIBTERMCAP 1
19848_ACEOF
19849
19850 LIBS="-ltermcap $LIBS"
19851
19852fi
19853
19854fi
19855
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019856# check for readline 2.1
19857echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
19858echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
19859if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
19860 echo $ECHO_N "(cached) $ECHO_C" >&6
19861else
19862 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000019863LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019864cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019865/* confdefs.h. */
19866_ACEOF
19867cat confdefs.h >>conftest.$ac_ext
19868cat >>conftest.$ac_ext <<_ACEOF
19869/* end confdefs.h. */
19870
19871/* Override any gcc2 internal prototype to avoid an error. */
19872#ifdef __cplusplus
19873extern "C"
19874#endif
19875/* We use char because int might match the return type of a gcc2
19876 builtin and then its argument prototype would still apply. */
19877char rl_callback_handler_install ();
19878int
19879main ()
19880{
19881rl_callback_handler_install ();
19882 ;
19883 return 0;
19884}
19885_ACEOF
19886rm -f conftest.$ac_objext conftest$ac_exeext
19887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019888 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019890 grep -v '^ *+' conftest.er1 >conftest.err
19891 rm -f conftest.er1
19892 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19894 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019895 { ac_try='test -z "$ac_c_werror_flag"
19896 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19898 (eval $ac_try) 2>&5
19899 ac_status=$?
19900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19901 (exit $ac_status); }; } &&
19902 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19904 (eval $ac_try) 2>&5
19905 ac_status=$?
19906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19907 (exit $ac_status); }; }; then
19908 ac_cv_lib_readline_rl_callback_handler_install=yes
19909else
19910 echo "$as_me: failed program was:" >&5
19911sed 's/^/| /' conftest.$ac_ext >&5
19912
19913ac_cv_lib_readline_rl_callback_handler_install=no
19914fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019915rm -f conftest.err conftest.$ac_objext \
19916 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019917LIBS=$ac_check_lib_save_LIBS
19918fi
19919echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
19920echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
19921if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
19922
19923cat >>confdefs.h <<\_ACEOF
19924#define HAVE_RL_CALLBACK 1
19925_ACEOF
19926
19927fi
19928
19929
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019930# check for readline 2.2
19931cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019932/* confdefs.h. */
19933_ACEOF
19934cat confdefs.h >>conftest.$ac_ext
19935cat >>conftest.$ac_ext <<_ACEOF
19936/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019937#include <readline/readline.h>
19938_ACEOF
19939if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19940 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19941 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019942 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019943 rm -f conftest.er1
19944 cat conftest.err >&5
19945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19946 (exit $ac_status); } >/dev/null; then
19947 if test -s conftest.err; then
19948 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019949 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019950 else
19951 ac_cpp_err=
19952 fi
19953else
19954 ac_cpp_err=yes
19955fi
19956if test -z "$ac_cpp_err"; then
19957 have_readline=yes
19958else
19959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019960sed 's/^/| /' conftest.$ac_ext >&5
19961
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019962 have_readline=no
19963fi
19964rm -f conftest.err conftest.$ac_ext
19965if test $have_readline = yes
19966then
19967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019968/* confdefs.h. */
19969_ACEOF
19970cat confdefs.h >>conftest.$ac_ext
19971cat >>conftest.$ac_ext <<_ACEOF
19972/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019973#include <readline/readline.h>
19974
19975_ACEOF
19976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000019977 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019978
19979cat >>confdefs.h <<\_ACEOF
19980#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
19981_ACEOF
19982
19983fi
19984rm -f conftest*
19985
19986fi
19987
Martin v. Löwis0daad592001-09-30 21:09:59 +000019988# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000019989echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
19990echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
19991if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
19992 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000019993else
Martin v. Löwis11437992002-04-12 09:54:03 +000019994 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000019995LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019996cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019997/* confdefs.h. */
19998_ACEOF
19999cat confdefs.h >>conftest.$ac_ext
20000cat >>conftest.$ac_ext <<_ACEOF
20001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020002
Guido van Rossum353ae582001-07-10 16:45:32 +000020003/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020004#ifdef __cplusplus
20005extern "C"
20006#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000020007/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020008 builtin and then its argument prototype would still apply. */
20009char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020010int
20011main ()
20012{
20013rl_pre_input_hook ();
20014 ;
20015 return 0;
20016}
20017_ACEOF
20018rm -f conftest.$ac_objext conftest$ac_exeext
20019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020020 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020022 grep -v '^ *+' conftest.er1 >conftest.err
20023 rm -f conftest.er1
20024 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20026 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020027 { ac_try='test -z "$ac_c_werror_flag"
20028 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20030 (eval $ac_try) 2>&5
20031 ac_status=$?
20032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20033 (exit $ac_status); }; } &&
20034 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20036 (eval $ac_try) 2>&5
20037 ac_status=$?
20038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20039 (exit $ac_status); }; }; then
20040 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000020041else
Martin v. Löwis11437992002-04-12 09:54:03 +000020042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020043sed 's/^/| /' conftest.$ac_ext >&5
20044
Martin v. Löwis11437992002-04-12 09:54:03 +000020045ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000020046fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020047rm -f conftest.err conftest.$ac_objext \
20048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020049LIBS=$ac_check_lib_save_LIBS
20050fi
20051echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
20052echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
20053if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020054
Martin v. Löwis11437992002-04-12 09:54:03 +000020055cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020056#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020057_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020058
Martin v. Löwis0daad592001-09-30 21:09:59 +000020059fi
20060
Michael W. Hudson54241132001-12-07 15:38:26 +000020061
Martin v. Löwis0daad592001-09-30 21:09:59 +000020062# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000020063echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
20064echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
20065if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
20066 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000020067else
Martin v. Löwis11437992002-04-12 09:54:03 +000020068 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020069LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020070cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020071/* confdefs.h. */
20072_ACEOF
20073cat confdefs.h >>conftest.$ac_ext
20074cat >>conftest.$ac_ext <<_ACEOF
20075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020076
Martin v. Löwis0daad592001-09-30 21:09:59 +000020077/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020078#ifdef __cplusplus
20079extern "C"
20080#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000020081/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020082 builtin and then its argument prototype would still apply. */
20083char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020084int
20085main ()
20086{
20087rl_completion_matches ();
20088 ;
20089 return 0;
20090}
20091_ACEOF
20092rm -f conftest.$ac_objext conftest$ac_exeext
20093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020094 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020096 grep -v '^ *+' conftest.er1 >conftest.err
20097 rm -f conftest.er1
20098 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20100 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020101 { ac_try='test -z "$ac_c_werror_flag"
20102 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20104 (eval $ac_try) 2>&5
20105 ac_status=$?
20106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20107 (exit $ac_status); }; } &&
20108 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20110 (eval $ac_try) 2>&5
20111 ac_status=$?
20112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20113 (exit $ac_status); }; }; then
20114 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000020115else
Martin v. Löwis11437992002-04-12 09:54:03 +000020116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020117sed 's/^/| /' conftest.$ac_ext >&5
20118
Martin v. Löwis11437992002-04-12 09:54:03 +000020119ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000020120fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020121rm -f conftest.err conftest.$ac_objext \
20122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020123LIBS=$ac_check_lib_save_LIBS
20124fi
20125echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
20126echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
20127if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020128
Martin v. Löwis11437992002-04-12 09:54:03 +000020129cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020130#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020131_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020132
Guido van Rossum353ae582001-07-10 16:45:32 +000020133fi
20134
Jack Jansendd19cf82001-12-06 22:36:17 +000020135
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020136# also in readline 4.2
20137cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020138/* confdefs.h. */
20139_ACEOF
20140cat confdefs.h >>conftest.$ac_ext
20141cat >>conftest.$ac_ext <<_ACEOF
20142/* end confdefs.h. */
20143#include <readline/readline.h>
20144_ACEOF
20145if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20146 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20147 ac_status=$?
20148 grep -v '^ *+' conftest.er1 >conftest.err
20149 rm -f conftest.er1
20150 cat conftest.err >&5
20151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20152 (exit $ac_status); } >/dev/null; then
20153 if test -s conftest.err; then
20154 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020155 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020156 else
20157 ac_cpp_err=
20158 fi
20159else
20160 ac_cpp_err=yes
20161fi
20162if test -z "$ac_cpp_err"; then
20163 have_readline=yes
20164else
20165 echo "$as_me: failed program was:" >&5
20166sed 's/^/| /' conftest.$ac_ext >&5
20167
20168 have_readline=no
20169fi
20170rm -f conftest.err conftest.$ac_ext
20171if test $have_readline = yes
20172then
20173 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020174/* confdefs.h. */
20175_ACEOF
20176cat confdefs.h >>conftest.$ac_ext
20177cat >>conftest.$ac_ext <<_ACEOF
20178/* end confdefs.h. */
20179#include <readline/readline.h>
20180
20181_ACEOF
20182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20183 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
20184
20185cat >>confdefs.h <<\_ACEOF
20186#define HAVE_RL_CATCH_SIGNAL 1
20187_ACEOF
20188
20189fi
20190rm -f conftest*
20191
20192fi
20193
Martin v. Löwis11437992002-04-12 09:54:03 +000020194echo "$as_me:$LINENO: checking for broken nice()" >&5
20195echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
20196if test "${ac_cv_broken_nice+set}" = set; then
20197 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020198else
Martin v. Löwis11437992002-04-12 09:54:03 +000020199
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020200if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020201 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020202else
Martin v. Löwis11437992002-04-12 09:54:03 +000020203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020204/* confdefs.h. */
20205_ACEOF
20206cat confdefs.h >>conftest.$ac_ext
20207cat >>conftest.$ac_ext <<_ACEOF
20208/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020209
20210int main()
20211{
20212 int val1 = nice(1);
20213 if (val1 != -1 && val1 == nice(2))
20214 exit(0);
20215 exit(1);
20216}
20217
Martin v. Löwis11437992002-04-12 09:54:03 +000020218_ACEOF
20219rm -f conftest$ac_exeext
20220if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20221 (eval $ac_link) 2>&5
20222 ac_status=$?
20223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20224 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20226 (eval $ac_try) 2>&5
20227 ac_status=$?
20228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20229 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020230 ac_cv_broken_nice=yes
20231else
Martin v. Löwis11437992002-04-12 09:54:03 +000020232 echo "$as_me: program exited with status $ac_status" >&5
20233echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020234sed 's/^/| /' conftest.$ac_ext >&5
20235
Martin v. Löwis11437992002-04-12 09:54:03 +000020236( exit $ac_status )
20237ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020238fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020239rm -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 +000020240fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020241fi
20242
Martin v. Löwis11437992002-04-12 09:54:03 +000020243echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
20244echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020245if test "$ac_cv_broken_nice" = yes
20246then
Martin v. Löwis11437992002-04-12 09:54:03 +000020247
20248cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020249#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020250_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020251
20252fi
20253
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020254echo "$as_me:$LINENO: checking for broken poll()" >&5
20255echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
20256if test "$cross_compiling" = yes; then
20257 ac_cv_broken_poll=no
20258else
20259 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020260/* confdefs.h. */
20261_ACEOF
20262cat confdefs.h >>conftest.$ac_ext
20263cat >>conftest.$ac_ext <<_ACEOF
20264/* end confdefs.h. */
20265
20266#include <poll.h>
20267
20268int main (void)
20269 {
20270 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
20271
20272 close (42);
20273
20274 int poll_test = poll (&poll_struct, 1, 0);
20275
20276 if (poll_test < 0)
20277 {
20278 exit(0);
20279 }
20280 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
20281 {
20282 exit(0);
20283 }
20284 else
20285 {
20286 exit(1);
20287 }
20288 }
20289
20290_ACEOF
20291rm -f conftest$ac_exeext
20292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20293 (eval $ac_link) 2>&5
20294 ac_status=$?
20295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20298 (eval $ac_try) 2>&5
20299 ac_status=$?
20300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20301 (exit $ac_status); }; }; then
20302 ac_cv_broken_poll=yes
20303else
20304 echo "$as_me: program exited with status $ac_status" >&5
20305echo "$as_me: failed program was:" >&5
20306sed 's/^/| /' conftest.$ac_ext >&5
20307
20308( exit $ac_status )
20309ac_cv_broken_poll=no
20310fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020311rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020312fi
20313echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
20314echo "${ECHO_T}$ac_cv_broken_poll" >&6
20315if test "$ac_cv_broken_poll" = yes
20316then
20317
20318cat >>confdefs.h <<\_ACEOF
20319#define HAVE_BROKEN_POLL 1
20320_ACEOF
20321
20322fi
20323
Brett Cannon43802422005-02-10 20:48:03 +000020324# 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 +000020325# (which is not required by ISO C or UNIX spec) and/or if we support
20326# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000020327echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20328echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20329if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20330 echo $ECHO_N "(cached) $ECHO_C" >&6
20331else
20332 cat >conftest.$ac_ext <<_ACEOF
20333/* confdefs.h. */
20334_ACEOF
20335cat confdefs.h >>conftest.$ac_ext
20336cat >>conftest.$ac_ext <<_ACEOF
20337/* end confdefs.h. */
20338#include <sys/types.h>
20339#include <$ac_cv_struct_tm>
20340
20341
20342int
20343main ()
20344{
20345static struct tm ac_aggr;
20346if (ac_aggr.tm_zone)
20347return 0;
20348 ;
20349 return 0;
20350}
20351_ACEOF
20352rm -f conftest.$ac_objext
20353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20354 (eval $ac_compile) 2>conftest.er1
20355 ac_status=$?
20356 grep -v '^ *+' conftest.er1 >conftest.err
20357 rm -f conftest.er1
20358 cat conftest.err >&5
20359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20360 (exit $ac_status); } &&
20361 { ac_try='test -z "$ac_c_werror_flag"
20362 || test ! -s conftest.err'
20363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20364 (eval $ac_try) 2>&5
20365 ac_status=$?
20366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20367 (exit $ac_status); }; } &&
20368 { ac_try='test -s conftest.$ac_objext'
20369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20370 (eval $ac_try) 2>&5
20371 ac_status=$?
20372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20373 (exit $ac_status); }; }; then
20374 ac_cv_member_struct_tm_tm_zone=yes
20375else
20376 echo "$as_me: failed program was:" >&5
20377sed 's/^/| /' conftest.$ac_ext >&5
20378
20379cat >conftest.$ac_ext <<_ACEOF
20380/* confdefs.h. */
20381_ACEOF
20382cat confdefs.h >>conftest.$ac_ext
20383cat >>conftest.$ac_ext <<_ACEOF
20384/* end confdefs.h. */
20385#include <sys/types.h>
20386#include <$ac_cv_struct_tm>
20387
20388
20389int
20390main ()
20391{
20392static struct tm ac_aggr;
20393if (sizeof ac_aggr.tm_zone)
20394return 0;
20395 ;
20396 return 0;
20397}
20398_ACEOF
20399rm -f conftest.$ac_objext
20400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20401 (eval $ac_compile) 2>conftest.er1
20402 ac_status=$?
20403 grep -v '^ *+' conftest.er1 >conftest.err
20404 rm -f conftest.er1
20405 cat conftest.err >&5
20406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20407 (exit $ac_status); } &&
20408 { ac_try='test -z "$ac_c_werror_flag"
20409 || test ! -s conftest.err'
20410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20411 (eval $ac_try) 2>&5
20412 ac_status=$?
20413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20414 (exit $ac_status); }; } &&
20415 { ac_try='test -s conftest.$ac_objext'
20416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20417 (eval $ac_try) 2>&5
20418 ac_status=$?
20419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20420 (exit $ac_status); }; }; then
20421 ac_cv_member_struct_tm_tm_zone=yes
20422else
20423 echo "$as_me: failed program was:" >&5
20424sed 's/^/| /' conftest.$ac_ext >&5
20425
20426ac_cv_member_struct_tm_tm_zone=no
20427fi
20428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20429fi
20430rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20431fi
20432echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20433echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20434if test $ac_cv_member_struct_tm_tm_zone = yes; then
20435
20436cat >>confdefs.h <<_ACEOF
20437#define HAVE_STRUCT_TM_TM_ZONE 1
20438_ACEOF
20439
20440
20441fi
20442
20443if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20444
20445cat >>confdefs.h <<\_ACEOF
20446#define HAVE_TM_ZONE 1
20447_ACEOF
20448
20449else
20450 echo "$as_me:$LINENO: checking for tzname" >&5
20451echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20452if test "${ac_cv_var_tzname+set}" = set; then
20453 echo $ECHO_N "(cached) $ECHO_C" >&6
20454else
20455 cat >conftest.$ac_ext <<_ACEOF
20456/* confdefs.h. */
20457_ACEOF
20458cat confdefs.h >>conftest.$ac_ext
20459cat >>conftest.$ac_ext <<_ACEOF
20460/* end confdefs.h. */
20461#include <time.h>
20462#ifndef tzname /* For SGI. */
20463extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20464#endif
20465
20466int
20467main ()
20468{
20469atoi(*tzname);
20470 ;
20471 return 0;
20472}
20473_ACEOF
20474rm -f conftest.$ac_objext conftest$ac_exeext
20475if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20476 (eval $ac_link) 2>conftest.er1
20477 ac_status=$?
20478 grep -v '^ *+' conftest.er1 >conftest.err
20479 rm -f conftest.er1
20480 cat conftest.err >&5
20481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20482 (exit $ac_status); } &&
20483 { ac_try='test -z "$ac_c_werror_flag"
20484 || test ! -s conftest.err'
20485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20486 (eval $ac_try) 2>&5
20487 ac_status=$?
20488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20489 (exit $ac_status); }; } &&
20490 { ac_try='test -s conftest$ac_exeext'
20491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20492 (eval $ac_try) 2>&5
20493 ac_status=$?
20494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20495 (exit $ac_status); }; }; then
20496 ac_cv_var_tzname=yes
20497else
20498 echo "$as_me: failed program was:" >&5
20499sed 's/^/| /' conftest.$ac_ext >&5
20500
20501ac_cv_var_tzname=no
20502fi
20503rm -f conftest.err conftest.$ac_objext \
20504 conftest$ac_exeext conftest.$ac_ext
20505fi
20506echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20507echo "${ECHO_T}$ac_cv_var_tzname" >&6
20508 if test $ac_cv_var_tzname = yes; then
20509
20510cat >>confdefs.h <<\_ACEOF
20511#define HAVE_TZNAME 1
20512_ACEOF
20513
20514 fi
20515fi
20516
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020517
Martin v. Löwis1d459062005-03-14 21:23:33 +000020518# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020519echo "$as_me:$LINENO: checking for working tzset()" >&5
20520echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
20521if test "${ac_cv_working_tzset+set}" = set; then
20522 echo $ECHO_N "(cached) $ECHO_C" >&6
20523else
20524
20525if test "$cross_compiling" = yes; then
20526 ac_cv_working_tzset=no
20527else
20528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020529/* confdefs.h. */
20530_ACEOF
20531cat confdefs.h >>conftest.$ac_ext
20532cat >>conftest.$ac_ext <<_ACEOF
20533/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020534
20535#include <stdlib.h>
20536#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000020537#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000020538
20539#if HAVE_TZNAME
20540extern char *tzname[];
20541#endif
20542
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020543int main()
20544{
Brett Cannon18367812003-09-19 00:59:16 +000020545 /* Note that we need to ensure that not only does tzset(3)
20546 do 'something' with localtime, but it works as documented
20547 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000020548 This includes making sure that tzname is set properly if
20549 tm->tm_zone does not exist since it is the alternative way
20550 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000020551
20552 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000020553 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000020554 */
20555
Martin v. Löwis1d459062005-03-14 21:23:33 +000020556 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000020557 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
20558
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020559 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020560 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020561 if (localtime(&groundhogday)->tm_hour != 0)
20562 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020563#if HAVE_TZNAME
20564 /* For UTC, tzname[1] is sometimes "", sometimes " " */
20565 if (strcmp(tzname[0], "UTC") ||
20566 (tzname[1][0] != 0 && tzname[1][0] != ' '))
20567 exit(1);
20568#endif
Brett Cannon18367812003-09-19 00:59:16 +000020569
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020570 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020571 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020572 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020573 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020574#if HAVE_TZNAME
20575 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
20576 exit(1);
20577#endif
Brett Cannon18367812003-09-19 00:59:16 +000020578
20579 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
20580 tzset();
20581 if (localtime(&groundhogday)->tm_hour != 11)
20582 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020583#if HAVE_TZNAME
20584 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
20585 exit(1);
20586#endif
20587
20588#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000020589 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
20590 exit(1);
20591 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
20592 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020593#endif
Brett Cannon18367812003-09-19 00:59:16 +000020594
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020595 exit(0);
20596}
20597
20598_ACEOF
20599rm -f conftest$ac_exeext
20600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20601 (eval $ac_link) 2>&5
20602 ac_status=$?
20603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20606 (eval $ac_try) 2>&5
20607 ac_status=$?
20608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20609 (exit $ac_status); }; }; then
20610 ac_cv_working_tzset=yes
20611else
20612 echo "$as_me: program exited with status $ac_status" >&5
20613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020614sed 's/^/| /' conftest.$ac_ext >&5
20615
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020616( exit $ac_status )
20617ac_cv_working_tzset=no
20618fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020619rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020620fi
20621fi
20622
20623echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
20624echo "${ECHO_T}$ac_cv_working_tzset" >&6
20625if test "$ac_cv_working_tzset" = yes
20626then
20627
20628cat >>confdefs.h <<\_ACEOF
20629#define HAVE_WORKING_TZSET 1
20630_ACEOF
20631
20632fi
20633
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020634# Look for subsecond timestamps in struct stat
20635echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
20636echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
20637if test "${ac_cv_stat_tv_nsec+set}" = set; then
20638 echo $ECHO_N "(cached) $ECHO_C" >&6
20639else
20640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020641/* confdefs.h. */
20642_ACEOF
20643cat confdefs.h >>conftest.$ac_ext
20644cat >>conftest.$ac_ext <<_ACEOF
20645/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020646#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020647int
20648main ()
20649{
20650
20651struct stat st;
20652st.st_mtim.tv_nsec = 1;
20653
20654 ;
20655 return 0;
20656}
20657_ACEOF
20658rm -f conftest.$ac_objext
20659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020660 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020662 grep -v '^ *+' conftest.er1 >conftest.err
20663 rm -f conftest.er1
20664 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20666 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020667 { ac_try='test -z "$ac_c_werror_flag"
20668 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20670 (eval $ac_try) 2>&5
20671 ac_status=$?
20672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20673 (exit $ac_status); }; } &&
20674 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20676 (eval $ac_try) 2>&5
20677 ac_status=$?
20678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20679 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000020680 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020681else
20682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020683sed 's/^/| /' conftest.$ac_ext >&5
20684
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020685ac_cv_stat_tv_nsec=no
20686fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020687rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020688fi
20689
20690echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
20691echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
20692if test "$ac_cv_stat_tv_nsec" = yes
20693then
20694
20695cat >>confdefs.h <<\_ACEOF
20696#define HAVE_STAT_TV_NSEC 1
20697_ACEOF
20698
20699fi
20700
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020701# Look for BSD style subsecond timestamps in struct stat
20702echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
20703echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
20704if test "${ac_cv_stat_tv_nsec2+set}" = set; then
20705 echo $ECHO_N "(cached) $ECHO_C" >&6
20706else
20707 cat >conftest.$ac_ext <<_ACEOF
20708/* confdefs.h. */
20709_ACEOF
20710cat confdefs.h >>conftest.$ac_ext
20711cat >>conftest.$ac_ext <<_ACEOF
20712/* end confdefs.h. */
20713#include <sys/stat.h>
20714int
20715main ()
20716{
20717
20718struct stat st;
20719st.st_mtimespec.tv_nsec = 1;
20720
20721 ;
20722 return 0;
20723}
20724_ACEOF
20725rm -f conftest.$ac_objext
20726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20727 (eval $ac_compile) 2>conftest.er1
20728 ac_status=$?
20729 grep -v '^ *+' conftest.er1 >conftest.err
20730 rm -f conftest.er1
20731 cat conftest.err >&5
20732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20733 (exit $ac_status); } &&
20734 { ac_try='test -z "$ac_c_werror_flag"
20735 || test ! -s conftest.err'
20736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20737 (eval $ac_try) 2>&5
20738 ac_status=$?
20739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20740 (exit $ac_status); }; } &&
20741 { ac_try='test -s conftest.$ac_objext'
20742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20743 (eval $ac_try) 2>&5
20744 ac_status=$?
20745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20746 (exit $ac_status); }; }; then
20747 ac_cv_stat_tv_nsec2=yes
20748else
20749 echo "$as_me: failed program was:" >&5
20750sed 's/^/| /' conftest.$ac_ext >&5
20751
20752ac_cv_stat_tv_nsec2=no
20753fi
20754rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20755fi
20756
20757echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
20758echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
20759if test "$ac_cv_stat_tv_nsec2" = yes
20760then
20761
20762cat >>confdefs.h <<\_ACEOF
20763#define HAVE_STAT_TV_NSEC2 1
20764_ACEOF
20765
20766fi
20767
Jack Jansen666b1e72001-10-31 12:11:48 +000020768# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000020769echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
20770echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
20771if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
20772 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020773else
Martin v. Löwis11437992002-04-12 09:54:03 +000020774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020775/* confdefs.h. */
20776_ACEOF
20777cat confdefs.h >>conftest.$ac_ext
20778cat >>conftest.$ac_ext <<_ACEOF
20779/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020780#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020781int
20782main ()
20783{
Jack Jansen666b1e72001-10-31 12:11:48 +000020784
20785 int rtn;
20786 rtn = mvwdelch(0,0,0);
20787
Martin v. Löwis11437992002-04-12 09:54:03 +000020788 ;
20789 return 0;
20790}
20791_ACEOF
20792rm -f conftest.$ac_objext
20793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020794 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020796 grep -v '^ *+' conftest.er1 >conftest.err
20797 rm -f conftest.er1
20798 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20800 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020801 { ac_try='test -z "$ac_c_werror_flag"
20802 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20804 (eval $ac_try) 2>&5
20805 ac_status=$?
20806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20807 (exit $ac_status); }; } &&
20808 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20810 (eval $ac_try) 2>&5
20811 ac_status=$?
20812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20813 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020814 ac_cv_mvwdelch_is_expression=yes
20815else
Martin v. Löwis11437992002-04-12 09:54:03 +000020816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020817sed 's/^/| /' conftest.$ac_ext >&5
20818
Martin v. Löwis11437992002-04-12 09:54:03 +000020819ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020820fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020821rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020822fi
20823
Martin v. Löwis11437992002-04-12 09:54:03 +000020824echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
20825echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020826
20827if test "$ac_cv_mvwdelch_is_expression" = yes
20828then
Martin v. Löwis11437992002-04-12 09:54:03 +000020829
20830cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020831#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020832_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020833
20834fi
20835
Martin v. Löwis11437992002-04-12 09:54:03 +000020836echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
20837echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
20838if test "${ac_cv_window_has_flags+set}" = set; then
20839 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020840else
Martin v. Löwis11437992002-04-12 09:54:03 +000020841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020842/* confdefs.h. */
20843_ACEOF
20844cat confdefs.h >>conftest.$ac_ext
20845cat >>conftest.$ac_ext <<_ACEOF
20846/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020847#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020848int
20849main ()
20850{
Jack Jansen666b1e72001-10-31 12:11:48 +000020851
20852 WINDOW *w;
20853 w->_flags = 0;
20854
Martin v. Löwis11437992002-04-12 09:54:03 +000020855 ;
20856 return 0;
20857}
20858_ACEOF
20859rm -f conftest.$ac_objext
20860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020861 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020863 grep -v '^ *+' conftest.er1 >conftest.err
20864 rm -f conftest.er1
20865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20867 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020868 { ac_try='test -z "$ac_c_werror_flag"
20869 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20871 (eval $ac_try) 2>&5
20872 ac_status=$?
20873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20874 (exit $ac_status); }; } &&
20875 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20877 (eval $ac_try) 2>&5
20878 ac_status=$?
20879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20880 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020881 ac_cv_window_has_flags=yes
20882else
Martin v. Löwis11437992002-04-12 09:54:03 +000020883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020884sed 's/^/| /' conftest.$ac_ext >&5
20885
Martin v. Löwis11437992002-04-12 09:54:03 +000020886ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020887fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020888rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020889fi
20890
Martin v. Löwis11437992002-04-12 09:54:03 +000020891echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
20892echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020893
Jack Jansen666b1e72001-10-31 12:11:48 +000020894
20895if test "$ac_cv_window_has_flags" = yes
20896then
Martin v. Löwis11437992002-04-12 09:54:03 +000020897
20898cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020899#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020900_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020901
20902fi
20903
Martin v. Löwis24a880b2002-12-31 12:55:15 +000020904echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
20905echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
20906
20907if test -e /dev/ptmx
20908then
20909 echo "$as_me:$LINENO: result: yes" >&5
20910echo "${ECHO_T}yes" >&6
20911
20912cat >>confdefs.h <<\_ACEOF
20913#define HAVE_DEV_PTMX 1
20914_ACEOF
20915
20916else
20917 echo "$as_me:$LINENO: result: no" >&5
20918echo "${ECHO_T}no" >&6
20919fi
20920
Neal Norwitz865400f2003-03-21 01:42:58 +000020921echo "$as_me:$LINENO: checking for /dev/ptc" >&5
20922echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
20923
20924if test -e /dev/ptc
20925then
20926 echo "$as_me:$LINENO: result: yes" >&5
20927echo "${ECHO_T}yes" >&6
20928
20929cat >>confdefs.h <<\_ACEOF
20930#define HAVE_DEV_PTC 1
20931_ACEOF
20932
20933else
20934 echo "$as_me:$LINENO: result: no" >&5
20935echo "${ECHO_T}no" >&6
20936fi
20937
Martin v. Löwis11437992002-04-12 09:54:03 +000020938echo "$as_me:$LINENO: checking for socklen_t" >&5
20939echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
20940if test "${ac_cv_type_socklen_t+set}" = set; then
20941 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000020942else
Martin v. Löwis11437992002-04-12 09:54:03 +000020943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020944/* confdefs.h. */
20945_ACEOF
20946cat confdefs.h >>conftest.$ac_ext
20947cat >>conftest.$ac_ext <<_ACEOF
20948/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000020949
20950#ifdef HAVE_SYS_TYPES_H
20951#include <sys/types.h>
20952#endif
20953#ifdef HAVE_SYS_SOCKET_H
20954#include <sys/socket.h>
20955#endif
20956
20957
Martin v. Löwis11437992002-04-12 09:54:03 +000020958int
20959main ()
20960{
20961if ((socklen_t *) 0)
20962 return 0;
20963if (sizeof (socklen_t))
20964 return 0;
20965 ;
20966 return 0;
20967}
20968_ACEOF
20969rm -f conftest.$ac_objext
20970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020971 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020973 grep -v '^ *+' conftest.er1 >conftest.err
20974 rm -f conftest.er1
20975 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20977 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020978 { ac_try='test -z "$ac_c_werror_flag"
20979 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20981 (eval $ac_try) 2>&5
20982 ac_status=$?
20983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20984 (exit $ac_status); }; } &&
20985 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20987 (eval $ac_try) 2>&5
20988 ac_status=$?
20989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20990 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000020991 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000020992else
Martin v. Löwis11437992002-04-12 09:54:03 +000020993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020994sed 's/^/| /' conftest.$ac_ext >&5
20995
Martin v. Löwis11437992002-04-12 09:54:03 +000020996ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000020997fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020998rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020999fi
21000echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
21001echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
21002if test $ac_cv_type_socklen_t = yes; then
21003 :
21004else
Guido van Rossum95713eb2000-05-18 20:53:31 +000021005
Martin v. Löwis01c04012002-11-11 14:58:44 +000021006cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021007#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000021008_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021009
21010fi
21011
Michael W. Hudson54241132001-12-07 15:38:26 +000021012
Michael W. Hudson54241132001-12-07 15:38:26 +000021013
21014
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000021015for h in `(cd $srcdir;echo Python/thread_*.h)`
21016do
21017 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
21018done
21019
Michael W. Hudson54241132001-12-07 15:38:26 +000021020
Neal Norwitzd24499d2005-12-18 21:36:39 +000021021SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwis11437992002-04-12 09:54:03 +000021022echo "$as_me:$LINENO: checking for build directories" >&5
21023echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021024for dir in $SRCDIRS; do
21025 if test ! -d $dir; then
21026 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000021027 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021028done
Martin v. Löwis11437992002-04-12 09:54:03 +000021029echo "$as_me:$LINENO: result: done" >&5
21030echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000021031
Guido van Rossum627b2d71993-12-24 10:39:16 +000021032# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000021033 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000021034
Martin v. Löwis11437992002-04-12 09:54:03 +000021035cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021036# This file is a shell script that caches the results of configure
21037# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000021038# scripts and configure runs, see configure's option --config-cache.
21039# It is not useful on other systems. If it contains results you don't
21040# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021041#
Martin v. Löwis11437992002-04-12 09:54:03 +000021042# config.status only pays attention to the cache file if you give it
21043# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021044#
Skip Montanaro6dead952003-09-25 14:50:04 +000021045# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000021046# loading this file, other *unset* `ac_cv_foo' will be assigned the
21047# following values.
21048
21049_ACEOF
21050
Guido van Rossumf78abae1997-01-21 22:02:36 +000021051# The following way of writing the cache mishandles newlines in values,
21052# but we know of no workaround that is simple, portable, and efficient.
21053# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021054# Ultrix sh set writes to stderr and can't be redirected directly,
21055# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000021056{
21057 (set) 2>&1 |
21058 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21059 *ac_space=\ *)
21060 # `set' does not quote correctly, so add quotes (double-quote
21061 # substitution turns \\\\ into \\, and sed turns \\ into \).
21062 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021063 "s/'/'\\\\''/g;
21064 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021065 ;;
21066 *)
21067 # `set' quotes correctly as required by POSIX, so do not add quotes.
21068 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021069 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021070 ;;
21071 esac;
21072} |
21073 sed '
21074 t clear
21075 : clear
21076 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21077 t end
21078 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21079 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000021080if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021081 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021082 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21083 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021084 else
21085 echo "not updating unwritable cache $cache_file"
21086 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021087fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021088rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000021089
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021090test "x$prefix" = xNONE && prefix=$ac_default_prefix
21091# Let make expand exec_prefix.
21092test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000021093
Martin v. Löwis11437992002-04-12 09:54:03 +000021094# VPATH may cause trouble with some makes, so we remove $(srcdir),
21095# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21096# trailing colons and then remove the whole line if VPATH becomes empty
21097# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000021098if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021099 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000021100s/:*\$(srcdir):*/:/;
21101s/:*\${srcdir}:*/:/;
21102s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021103s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000021104s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021105s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000021106}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021107fi
21108
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021109DEFS=-DHAVE_CONFIG_H
21110
Skip Montanaro6dead952003-09-25 14:50:04 +000021111ac_libobjs=
21112ac_ltlibobjs=
21113for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21114 # 1. Remove the extension, and $U if already installed.
21115 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021116 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021117 # 2. Add them.
21118 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21119 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21120done
21121LIBOBJS=$ac_libobjs
21122
21123LTLIBOBJS=$ac_ltlibobjs
21124
21125
Martin v. Löwis11437992002-04-12 09:54:03 +000021126
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021127: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000021128ac_clean_files_save=$ac_clean_files
21129ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21130{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21131echo "$as_me: creating $CONFIG_STATUS" >&6;}
21132cat >$CONFIG_STATUS <<_ACEOF
21133#! $SHELL
21134# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021135# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021136# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000021137# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021138
Martin v. Löwis11437992002-04-12 09:54:03 +000021139debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000021140ac_cs_recheck=false
21141ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021142SHELL=\${CONFIG_SHELL-$SHELL}
21143_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000021144
Martin v. Löwis11437992002-04-12 09:54:03 +000021145cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021146## --------------------- ##
21147## M4sh Initialization. ##
21148## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000021149
Martin v. Löwis11437992002-04-12 09:54:03 +000021150# Be Bourne compatible
21151if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21152 emulate sh
21153 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021154 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21155 # is contrary to our usage. Disable this feature.
21156 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021157elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21158 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000021159fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021160DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000021161
Martin v. Löwis11437992002-04-12 09:54:03 +000021162# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021163if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021164 as_unset=unset
21165else
21166 as_unset=false
21167fi
Michael W. Hudson54241132001-12-07 15:38:26 +000021168
Skip Montanaro6dead952003-09-25 14:50:04 +000021169
21170# Work around bugs in pre-3.0 UWIN ksh.
21171$as_unset ENV MAIL MAILPATH
21172PS1='$ '
21173PS2='> '
21174PS4='+ '
21175
21176# NLS nuisances.
21177for as_var in \
21178 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21179 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21180 LC_TELEPHONE LC_TIME
21181do
Skip Montanarof0d5f792004-08-15 14:08:23 +000021182 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000021183 eval $as_var=C; export $as_var
21184 else
21185 $as_unset $as_var
21186 fi
21187done
21188
21189# Required to use basename.
21190if expr a : '\(a\)' >/dev/null 2>&1; then
21191 as_expr=expr
21192else
21193 as_expr=false
21194fi
21195
21196if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
21197 as_basename=basename
21198else
21199 as_basename=false
21200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021201
21202
21203# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000021204as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021205$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21206 X"$0" : 'X\(//\)$' \| \
21207 X"$0" : 'X\(/\)$' \| \
21208 . : '\(.\)' 2>/dev/null ||
21209echo X/"$0" |
21210 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21211 /^X\/\(\/\/\)$/{ s//\1/; q; }
21212 /^X\/\(\/\).*/{ s//\1/; q; }
21213 s/.*/./; q'`
21214
Skip Montanaro6dead952003-09-25 14:50:04 +000021215
Martin v. Löwis11437992002-04-12 09:54:03 +000021216# PATH needs CR, and LINENO needs CR and PATH.
21217# Avoid depending upon Character Ranges.
21218as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21219as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21220as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21221as_cr_digits='0123456789'
21222as_cr_alnum=$as_cr_Letters$as_cr_digits
21223
21224# The user is always right.
21225if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021226 echo "#! /bin/sh" >conf$$.sh
21227 echo "exit 0" >>conf$$.sh
21228 chmod +x conf$$.sh
21229 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 PATH_SEPARATOR=';'
21231 else
21232 PATH_SEPARATOR=:
21233 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021234 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000021235fi
21236
21237
21238 as_lineno_1=$LINENO
21239 as_lineno_2=$LINENO
21240 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21241 test "x$as_lineno_1" != "x$as_lineno_2" &&
21242 test "x$as_lineno_3" = "x$as_lineno_2" || {
21243 # Find who we are. Look in the path if we contain no path at all
21244 # relative or not.
21245 case $0 in
21246 *[\\/]* ) as_myself=$0 ;;
21247 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21248for as_dir in $PATH
21249do
21250 IFS=$as_save_IFS
21251 test -z "$as_dir" && as_dir=.
21252 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21253done
21254
21255 ;;
21256 esac
21257 # We did not find ourselves, most probably we were run as `sh COMMAND'
21258 # in which case we are not to be found in the path.
21259 if test "x$as_myself" = x; then
21260 as_myself=$0
21261 fi
21262 if test ! -f "$as_myself"; then
21263 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21264echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21265 { (exit 1); exit 1; }; }
21266 fi
21267 case $CONFIG_SHELL in
21268 '')
21269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21270for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21271do
21272 IFS=$as_save_IFS
21273 test -z "$as_dir" && as_dir=.
21274 for as_base in sh bash ksh sh5; do
21275 case $as_dir in
21276 /*)
21277 if ("$as_dir/$as_base" -c '
21278 as_lineno_1=$LINENO
21279 as_lineno_2=$LINENO
21280 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21281 test "x$as_lineno_1" != "x$as_lineno_2" &&
21282 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021283 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21284 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021285 CONFIG_SHELL=$as_dir/$as_base
21286 export CONFIG_SHELL
21287 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21288 fi;;
21289 esac
21290 done
21291done
21292;;
Jack Jansendd19cf82001-12-06 22:36:17 +000021293 esac
21294
Martin v. Löwis11437992002-04-12 09:54:03 +000021295 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21296 # uniformly replaced by the line number. The first 'sed' inserts a
21297 # line-number line before each line; the second 'sed' does the real
21298 # work. The second script uses 'N' to pair each line-number line
21299 # with the numbered line, and appends trailing '-' during
21300 # substitution so that $LINENO is not a special case at line end.
21301 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21302 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21303 sed '=' <$as_myself |
21304 sed '
21305 N
21306 s,$,-,
21307 : loop
21308 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
21309 t loop
21310 s,-$,,
21311 s,^['$as_cr_digits']*\n,,
21312 ' >$as_me.lineno &&
21313 chmod +x $as_me.lineno ||
21314 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21315echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
21316 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021317
Martin v. Löwis11437992002-04-12 09:54:03 +000021318 # Don't try to exec as it changes $[0], causing all sort of problems
21319 # (the dirname of $[0] is not the place where we might find the
21320 # original and so on. Autoconf is especially sensible to this).
21321 . ./$as_me.lineno
21322 # Exit status is that of the last command.
21323 exit
21324}
21325
21326
21327case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21328 *c*,-n*) ECHO_N= ECHO_C='
21329' ECHO_T=' ' ;;
21330 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21331 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
21332esac
21333
21334if expr a : '\(a\)' >/dev/null 2>&1; then
21335 as_expr=expr
21336else
21337 as_expr=false
21338fi
21339
21340rm -f conf$$ conf$$.exe conf$$.file
21341echo >conf$$.file
21342if ln -s conf$$.file conf$$ 2>/dev/null; then
21343 # We could just check for DJGPP; but this test a) works b) is more generic
21344 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21345 if test -f conf$$.exe; then
21346 # Don't use ln at all; we don't have any links
21347 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021348 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021349 as_ln_s='ln -s'
21350 fi
21351elif ln conf$$.file conf$$ 2>/dev/null; then
21352 as_ln_s=ln
21353else
21354 as_ln_s='cp -p'
21355fi
21356rm -f conf$$ conf$$.exe conf$$.file
21357
Skip Montanaro6dead952003-09-25 14:50:04 +000021358if mkdir -p . 2>/dev/null; then
21359 as_mkdir_p=:
21360else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021361 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000021362 as_mkdir_p=false
21363fi
21364
Martin v. Löwis11437992002-04-12 09:54:03 +000021365as_executable_p="test -f"
21366
21367# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021368as_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 +000021369
21370# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021371as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000021372
21373
21374# IFS
21375# We need space, tab and new line, in precisely that order.
21376as_nl='
21377'
21378IFS=" $as_nl"
21379
21380# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000021381$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000021382
21383exec 6>&1
21384
21385# Open the log real soon, to keep \$[0] and so on meaningful, and to
21386# report actual input values of CONFIG_FILES etc. instead of their
21387# values after options handling. Logging --version etc. is OK.
21388exec 5>>config.log
21389{
21390 echo
21391 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21392## Running $as_me. ##
21393_ASBOX
21394} >&5
21395cat >&5 <<_CSEOF
21396
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000021397This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000021398generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000021399
21400 CONFIG_FILES = $CONFIG_FILES
21401 CONFIG_HEADERS = $CONFIG_HEADERS
21402 CONFIG_LINKS = $CONFIG_LINKS
21403 CONFIG_COMMANDS = $CONFIG_COMMANDS
21404 $ $0 $@
21405
21406_CSEOF
21407echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21408echo >&5
21409_ACEOF
21410
21411# Files that config.status was made for.
21412if test -n "$ac_config_files"; then
21413 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21414fi
21415
21416if test -n "$ac_config_headers"; then
21417 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21418fi
21419
21420if test -n "$ac_config_links"; then
21421 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21422fi
21423
21424if test -n "$ac_config_commands"; then
21425 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21426fi
21427
21428cat >>$CONFIG_STATUS <<\_ACEOF
21429
21430ac_cs_usage="\
21431\`$as_me' instantiates files from templates according to the
21432current configuration.
21433
21434Usage: $0 [OPTIONS] [FILE]...
21435
21436 -h, --help print this help, then exit
21437 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000021438 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000021439 -d, --debug don't remove temporary files
21440 --recheck update $as_me by reconfiguring in the same conditions
21441 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021442 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021443 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021444 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021445
21446Configuration files:
21447$config_files
21448
21449Configuration headers:
21450$config_headers
21451
21452Report bugs to <bug-autoconf@gnu.org>."
21453_ACEOF
21454
21455cat >>$CONFIG_STATUS <<_ACEOF
21456ac_cs_version="\\
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000021457python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021458configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000021459 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21460
Skip Montanarof0d5f792004-08-15 14:08:23 +000021461Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000021462This config.status script is free software; the Free Software Foundation
21463gives unlimited permission to copy, distribute and modify it."
21464srcdir=$srcdir
21465INSTALL="$INSTALL"
21466_ACEOF
21467
21468cat >>$CONFIG_STATUS <<\_ACEOF
21469# If no file are specified by the user, then we need to provide default
21470# value. By we need to know if files were specified by the user.
21471ac_need_defaults=:
21472while test $# != 0
21473do
21474 case $1 in
21475 --*=*)
21476 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21477 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021478 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000021479 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021480 -*)
21481 ac_option=$1
21482 ac_optarg=$2
21483 ac_shift=shift
21484 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021485 *) # This is not an option, so the user has probably given explicit
21486 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000021487 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000021488 ac_need_defaults=false;;
21489 esac
21490
Skip Montanaro6dead952003-09-25 14:50:04 +000021491 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000021492 # Handling of the options.
21493_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021494cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021495 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21496 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021497 --version | --vers* | -V )
21498 echo "$ac_cs_version"; exit 0 ;;
21499 --he | --h)
21500 # Conflict between --help and --header
21501 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21502Try \`$0 --help' for more information." >&5
21503echo "$as_me: error: ambiguous option: $1
21504Try \`$0 --help' for more information." >&2;}
21505 { (exit 1); exit 1; }; };;
21506 --help | --hel | -h )
21507 echo "$ac_cs_usage"; exit 0 ;;
21508 --debug | --d* | -d )
21509 debug=: ;;
21510 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000021511 $ac_shift
21512 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021513 ac_need_defaults=false;;
21514 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000021515 $ac_shift
21516 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021517 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21519 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21520 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021521
21522 # This is an error.
21523 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21524Try \`$0 --help' for more information." >&5
21525echo "$as_me: error: unrecognized option: $1
21526Try \`$0 --help' for more information." >&2;}
21527 { (exit 1); exit 1; }; } ;;
21528
21529 *) ac_config_targets="$ac_config_targets $1" ;;
21530
21531 esac
21532 shift
21533done
21534
Skip Montanaro6dead952003-09-25 14:50:04 +000021535ac_configure_extra_args=
21536
21537if $ac_cs_silent; then
21538 exec 6>/dev/null
21539 ac_configure_extra_args="$ac_configure_extra_args --silent"
21540fi
21541
21542_ACEOF
21543cat >>$CONFIG_STATUS <<_ACEOF
21544if \$ac_cs_recheck; then
21545 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21546 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21547fi
21548
Martin v. Löwis11437992002-04-12 09:54:03 +000021549_ACEOF
21550
21551
21552
21553
21554
21555cat >>$CONFIG_STATUS <<\_ACEOF
21556for ac_config_target in $ac_config_targets
21557do
21558 case "$ac_config_target" in
21559 # Handling of arguments.
21560 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
21561 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
21562 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
21563 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21564echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21565 { (exit 1); exit 1; }; };;
21566 esac
21567done
21568
21569# If the user did not use the arguments to specify the items to instantiate,
21570# then the envvar interface is used. Set only those that are not.
21571# We use the long form for the default assignment because of an extremely
21572# bizarre bug on SunOS 4.1.3.
21573if $ac_need_defaults; then
21574 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21575 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21576fi
21577
Skip Montanaro6dead952003-09-25 14:50:04 +000021578# Have a temporary directory for convenience. Make it in the build tree
21579# simply because there is no reason to put it here, and in addition,
21580# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000021581# Create a temporary directory, and hook for its removal unless debugging.
21582$debug ||
21583{
21584 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21585 trap '{ (exit 1); exit 1; }' 1 2 13 15
21586}
21587
21588# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000021589
Martin v. Löwis11437992002-04-12 09:54:03 +000021590{
Skip Montanaro6dead952003-09-25 14:50:04 +000021591 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000021592 test -n "$tmp" && test -d "$tmp"
21593} ||
21594{
Skip Montanaro6dead952003-09-25 14:50:04 +000021595 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000021596 (umask 077 && mkdir $tmp)
21597} ||
21598{
Skip Montanaro6dead952003-09-25 14:50:04 +000021599 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000021600 { (exit 1); exit 1; }
21601}
21602
21603_ACEOF
21604
21605cat >>$CONFIG_STATUS <<_ACEOF
21606
21607#
21608# CONFIG_FILES section.
21609#
21610
21611# No need to generate the scripts if there are no CONFIG_FILES.
21612# This happens for instance when ./config.status config.h
21613if test -n "\$CONFIG_FILES"; then
21614 # Protect against being on the right side of a sed subst in config.status.
21615 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21616 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21617s,@SHELL@,$SHELL,;t t
21618s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21619s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21620s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21621s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21622s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21623s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21624s,@exec_prefix@,$exec_prefix,;t t
21625s,@prefix@,$prefix,;t t
21626s,@program_transform_name@,$program_transform_name,;t t
21627s,@bindir@,$bindir,;t t
21628s,@sbindir@,$sbindir,;t t
21629s,@libexecdir@,$libexecdir,;t t
21630s,@datadir@,$datadir,;t t
21631s,@sysconfdir@,$sysconfdir,;t t
21632s,@sharedstatedir@,$sharedstatedir,;t t
21633s,@localstatedir@,$localstatedir,;t t
21634s,@libdir@,$libdir,;t t
21635s,@includedir@,$includedir,;t t
21636s,@oldincludedir@,$oldincludedir,;t t
21637s,@infodir@,$infodir,;t t
21638s,@mandir@,$mandir,;t t
21639s,@build_alias@,$build_alias,;t t
21640s,@host_alias@,$host_alias,;t t
21641s,@target_alias@,$target_alias,;t t
21642s,@DEFS@,$DEFS,;t t
21643s,@ECHO_C@,$ECHO_C,;t t
21644s,@ECHO_N@,$ECHO_N,;t t
21645s,@ECHO_T@,$ECHO_T,;t t
21646s,@LIBS@,$LIBS,;t t
21647s,@VERSION@,$VERSION,;t t
21648s,@SOVERSION@,$SOVERSION,;t t
21649s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
21650s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
21651s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
21652s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
21653s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
21654s,@MACHDEP@,$MACHDEP,;t t
21655s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000021656s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000021657s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000021658s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021659s,@CXX@,$CXX,;t t
21660s,@MAINOBJ@,$MAINOBJ,;t t
21661s,@EXEEXT@,$EXEEXT,;t t
21662s,@CC@,$CC,;t t
21663s,@CFLAGS@,$CFLAGS,;t t
21664s,@LDFLAGS@,$LDFLAGS,;t t
21665s,@CPPFLAGS@,$CPPFLAGS,;t t
21666s,@ac_ct_CC@,$ac_ct_CC,;t t
21667s,@OBJEXT@,$OBJEXT,;t t
21668s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021669s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021670s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
21671s,@LIBRARY@,$LIBRARY,;t t
21672s,@LDLIBRARY@,$LDLIBRARY,;t t
21673s,@DLLLIBRARY@,$DLLLIBRARY,;t t
21674s,@BLDLIBRARY@,$BLDLIBRARY,;t t
21675s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
21676s,@INSTSONAME@,$INSTSONAME,;t t
21677s,@RUNSHARED@,$RUNSHARED,;t t
21678s,@LINKCC@,$LINKCC,;t t
21679s,@RANLIB@,$RANLIB,;t t
21680s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21681s,@AR@,$AR,;t t
Martin v. Löwisdea59e52006-01-05 10:00:36 +000021682s,@SVNVERSION@,$SVNVERSION,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021683s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21684s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21685s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21686s,@LN@,$LN,;t t
21687s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000021688s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000021689s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021690s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
21691s,@SO@,$SO,;t t
21692s,@LDSHARED@,$LDSHARED,;t t
21693s,@BLDSHARED@,$BLDSHARED,;t t
21694s,@CCSHARED@,$CCSHARED,;t t
21695s,@LINKFORSHARED@,$LINKFORSHARED,;t t
21696s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000021697s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021698s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
21699s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
21700s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
21701s,@LDLAST@,$LDLAST,;t t
21702s,@THREADOBJ@,$THREADOBJ,;t t
21703s,@DLINCLDIR@,$DLINCLDIR,;t t
21704s,@DYNLOADFILE@,$DYNLOADFILE,;t t
21705s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000021706s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021707s,@LIBOBJS@,$LIBOBJS,;t t
21708s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
21709s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
21710s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
21711s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
21712s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
21713s,@LIBM@,$LIBM,;t t
21714s,@LIBC@,$LIBC,;t t
21715s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
21716s,@THREADHEADERS@,$THREADHEADERS,;t t
21717s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021718s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021719CEOF
21720
21721_ACEOF
21722
21723 cat >>$CONFIG_STATUS <<\_ACEOF
21724 # Split the substitutions into bite-sized pieces for seds with
21725 # small command number limits, like on Digital OSF/1 and HP-UX.
21726 ac_max_sed_lines=48
21727 ac_sed_frag=1 # Number of current file.
21728 ac_beg=1 # First line for current file.
21729 ac_end=$ac_max_sed_lines # Line after last line for current file.
21730 ac_more_lines=:
21731 ac_sed_cmds=
21732 while $ac_more_lines; do
21733 if test $ac_beg -gt 1; then
21734 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21735 else
21736 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21737 fi
21738 if test ! -s $tmp/subs.frag; then
21739 ac_more_lines=false
21740 else
21741 # The purpose of the label and of the branching condition is to
21742 # speed up the sed processing (if there are no `@' at all, there
21743 # is no need to browse any of the substitutions).
21744 # These are the two extra sed commands mentioned above.
21745 (echo ':t
21746 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21747 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021748 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021749 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021750 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021751 fi
21752 ac_sed_frag=`expr $ac_sed_frag + 1`
21753 ac_beg=$ac_end
21754 ac_end=`expr $ac_end + $ac_max_sed_lines`
21755 fi
21756 done
21757 if test -z "$ac_sed_cmds"; then
21758 ac_sed_cmds=cat
21759 fi
21760fi # test -n "$CONFIG_FILES"
21761
21762_ACEOF
21763cat >>$CONFIG_STATUS <<\_ACEOF
21764for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21765 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21766 case $ac_file in
21767 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021768 cat >$tmp/stdin
21769 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21770 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021771 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021772 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021773 * ) ac_file_in=$ac_file.in ;;
21774 esac
21775
21776 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21777 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21778$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021779 X"$ac_file" : 'X\(//\)[^/]' \| \
21780 X"$ac_file" : 'X\(//\)$' \| \
21781 X"$ac_file" : 'X\(/\)' \| \
21782 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021783echo X"$ac_file" |
21784 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21785 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21786 /^X\(\/\/\)$/{ s//\1/; q; }
21787 /^X\(\/\).*/{ s//\1/; q; }
21788 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021789 { if $as_mkdir_p; then
21790 mkdir -p "$ac_dir"
21791 else
21792 as_dir="$ac_dir"
21793 as_dirs=
21794 while test ! -d "$as_dir"; do
21795 as_dirs="$as_dir $as_dirs"
21796 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21797$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021798 X"$as_dir" : 'X\(//\)[^/]' \| \
21799 X"$as_dir" : 'X\(//\)$' \| \
21800 X"$as_dir" : 'X\(/\)' \| \
21801 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021802echo X"$as_dir" |
21803 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21804 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21805 /^X\(\/\/\)$/{ s//\1/; q; }
21806 /^X\(\/\).*/{ s//\1/; q; }
21807 s/.*/./; q'`
21808 done
21809 test ! -n "$as_dirs" || mkdir $as_dirs
21810 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21811echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21812 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021813
21814 ac_builddir=.
21815
21816if test "$ac_dir" != .; then
21817 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21818 # A "../" for each directory in $ac_dir_suffix.
21819 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21820else
21821 ac_dir_suffix= ac_top_builddir=
21822fi
21823
21824case $srcdir in
21825 .) # No --srcdir option. We are building in place.
21826 ac_srcdir=.
21827 if test -z "$ac_top_builddir"; then
21828 ac_top_srcdir=.
21829 else
21830 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21831 fi ;;
21832 [\\/]* | ?:[\\/]* ) # Absolute path.
21833 ac_srcdir=$srcdir$ac_dir_suffix;
21834 ac_top_srcdir=$srcdir ;;
21835 *) # Relative path.
21836 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21837 ac_top_srcdir=$ac_top_builddir$srcdir ;;
21838esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000021839
21840# Do not use `cd foo && pwd` to compute absolute paths, because
21841# the directories may not exist.
21842case `pwd` in
21843.) ac_abs_builddir="$ac_dir";;
21844*)
21845 case "$ac_dir" in
21846 .) ac_abs_builddir=`pwd`;;
21847 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21848 *) ac_abs_builddir=`pwd`/"$ac_dir";;
21849 esac;;
21850esac
21851case $ac_abs_builddir in
21852.) ac_abs_top_builddir=${ac_top_builddir}.;;
21853*)
21854 case ${ac_top_builddir}. in
21855 .) ac_abs_top_builddir=$ac_abs_builddir;;
21856 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21857 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21858 esac;;
21859esac
21860case $ac_abs_builddir in
21861.) ac_abs_srcdir=$ac_srcdir;;
21862*)
21863 case $ac_srcdir in
21864 .) ac_abs_srcdir=$ac_abs_builddir;;
21865 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21866 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21867 esac;;
21868esac
21869case $ac_abs_builddir in
21870.) ac_abs_top_srcdir=$ac_top_srcdir;;
21871*)
21872 case $ac_top_srcdir in
21873 .) ac_abs_top_srcdir=$ac_abs_builddir;;
21874 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21875 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21876 esac;;
21877esac
Martin v. Löwis11437992002-04-12 09:54:03 +000021878
21879
21880 case $INSTALL in
21881 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21882 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
21883 esac
21884
Brett Cannon43802422005-02-10 20:48:03 +000021885 if test x"$ac_file" != x-; then
21886 { echo "$as_me:$LINENO: creating $ac_file" >&5
21887echo "$as_me: creating $ac_file" >&6;}
21888 rm -f "$ac_file"
21889 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021890 # Let's still pretend it is `configure' which instantiates (i.e., don't
21891 # use $as_me), people would be surprised to read:
21892 # /* config.h. Generated by config.status. */
21893 if test x"$ac_file" = x-; then
21894 configure_input=
21895 else
21896 configure_input="$ac_file. "
21897 fi
21898 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021899 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000021900
21901 # First look for the input files in the build tree, otherwise in the
21902 # src tree.
21903 ac_file_inputs=`IFS=:
21904 for f in $ac_file_in; do
21905 case $f in
21906 -) echo $tmp/stdin ;;
21907 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021908 # Absolute (can't be DOS-style, as IFS=:)
21909 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021910echo "$as_me: error: cannot find input file: $f" >&2;}
21911 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021912 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021913 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021914 if test -f "$f"; then
21915 # Build tree
21916 echo "$f"
21917 elif test -f "$srcdir/$f"; then
21918 # Source tree
21919 echo "$srcdir/$f"
21920 else
21921 # /dev/null tree
21922 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021923echo "$as_me: error: cannot find input file: $f" >&2;}
21924 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021925 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021926 esac
21927 done` || { (exit 1); exit 1; }
21928_ACEOF
21929cat >>$CONFIG_STATUS <<_ACEOF
21930 sed "$ac_vpsub
21931$extrasub
21932_ACEOF
21933cat >>$CONFIG_STATUS <<\_ACEOF
21934:t
21935/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21936s,@configure_input@,$configure_input,;t t
21937s,@srcdir@,$ac_srcdir,;t t
21938s,@abs_srcdir@,$ac_abs_srcdir,;t t
21939s,@top_srcdir@,$ac_top_srcdir,;t t
21940s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
21941s,@builddir@,$ac_builddir,;t t
21942s,@abs_builddir@,$ac_abs_builddir,;t t
21943s,@top_builddir@,$ac_top_builddir,;t t
21944s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
21945s,@INSTALL@,$ac_INSTALL,;t t
21946" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21947 rm -f $tmp/stdin
21948 if test x"$ac_file" != x-; then
21949 mv $tmp/out $ac_file
21950 else
21951 cat $tmp/out
21952 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021953 fi
21954
Martin v. Löwis11437992002-04-12 09:54:03 +000021955done
21956_ACEOF
21957cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021958
Martin v. Löwis11437992002-04-12 09:54:03 +000021959#
21960# CONFIG_HEADER section.
21961#
Guido van Rossum627b2d71993-12-24 10:39:16 +000021962
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021963# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21964# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000021965#
21966# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021967ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21968ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000021969ac_dC=' '
21970ac_dD=',;t'
21971# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000021972ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000021973ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021974ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000021975ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021976
Martin v. Löwis11437992002-04-12 09:54:03 +000021977for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000021978 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000021979 case $ac_file in
21980 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021981 cat >$tmp/stdin
21982 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21983 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021984 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021985 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021986 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021987 esac
21988
Martin v. Löwis11437992002-04-12 09:54:03 +000021989 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
21990echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021991
Martin v. Löwis11437992002-04-12 09:54:03 +000021992 # First look for the input files in the build tree, otherwise in the
21993 # src tree.
21994 ac_file_inputs=`IFS=:
21995 for f in $ac_file_in; do
21996 case $f in
21997 -) echo $tmp/stdin ;;
21998 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021999 # Absolute (can't be DOS-style, as IFS=:)
22000 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022001echo "$as_me: error: cannot find input file: $f" >&2;}
22002 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022003 # Do quote $f, to prevent DOS paths from being IFS'd.
22004 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022005 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022006 if test -f "$f"; then
22007 # Build tree
22008 echo "$f"
22009 elif test -f "$srcdir/$f"; then
22010 # Source tree
22011 echo "$srcdir/$f"
22012 else
22013 # /dev/null tree
22014 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022015echo "$as_me: error: cannot find input file: $f" >&2;}
22016 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022017 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022018 esac
22019 done` || { (exit 1); exit 1; }
22020 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022021 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022022
Martin v. Löwis11437992002-04-12 09:54:03 +000022023_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022024
Martin v. Löwis11437992002-04-12 09:54:03 +000022025# Transform confdefs.h into two sed scripts, `conftest.defines' and
22026# `conftest.undefs', that substitutes the proper values into
22027# config.h.in to produce config.h. The first handles `#define'
22028# templates, and the second `#undef' templates.
22029# And first: Protect against being on the right side of a sed subst in
22030# config.status. Protect against being in an unquoted here document
22031# in config.status.
22032rm -f conftest.defines conftest.undefs
22033# Using a here document instead of a string reduces the quoting nightmare.
22034# Putting comments in sed scripts is not portable.
22035#
22036# `end' is used to avoid that the second main sed command (meant for
22037# 0-ary CPP macros) applies to n-ary macro definitions.
22038# See the Autoconf documentation for `clear'.
22039cat >confdef2sed.sed <<\_ACEOF
22040s/[\\&,]/\\&/g
22041s,[\\$`],\\&,g
22042t clear
22043: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000022044s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022045t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000022046s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022047: end
22048_ACEOF
22049# If some macros were called several times there might be several times
22050# the same #defines, which is useless. Nevertheless, we may not want to
22051# sort them, since we want the *last* AC-DEFINE to be honored.
22052uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22053sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22054rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022055
22056# This sed command replaces #undef with comments. This is necessary, for
22057# example, in the case of _POSIX_SOURCE, which is predefined and required
22058# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000022059cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000022060s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000022061_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022062
Martin v. Löwis11437992002-04-12 09:54:03 +000022063# Break up conftest.defines because some shells have a limit on the size
22064# of here documents, and old seds have small limits too (100 cmds).
22065echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000022066echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022067echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22068echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022069rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000022070while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000022071do
Martin v. Löwis11437992002-04-12 09:54:03 +000022072 # Write a limited-size here document to $tmp/defines.sed.
22073 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22074 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022075 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022076 # Work around the forget-to-reset-the-flag bug.
22077 echo 't clr' >>$CONFIG_STATUS
22078 echo ': clr' >>$CONFIG_STATUS
22079 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022080 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022081 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22082 rm -f $tmp/in
22083 mv $tmp/out $tmp/in
22084' >>$CONFIG_STATUS
22085 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22086 rm -f conftest.defines
22087 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000022088done
Martin v. Löwis11437992002-04-12 09:54:03 +000022089rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000022090echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022091echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022092
Martin v. Löwis11437992002-04-12 09:54:03 +000022093# Break up conftest.undefs because some shells have a limit on the size
22094# of here documents, and old seds have small limits too (100 cmds).
22095echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22096rm -f conftest.tail
22097while grep . conftest.undefs >/dev/null
22098do
22099 # Write a limited-size here document to $tmp/undefs.sed.
22100 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22101 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000022102 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022103 # Work around the forget-to-reset-the-flag bug.
22104 echo 't clr' >>$CONFIG_STATUS
22105 echo ': clr' >>$CONFIG_STATUS
22106 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22107 echo 'CEOF
22108 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22109 rm -f $tmp/in
22110 mv $tmp/out $tmp/in
22111' >>$CONFIG_STATUS
22112 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22113 rm -f conftest.undefs
22114 mv conftest.tail conftest.undefs
22115done
22116rm -f conftest.undefs
22117
22118cat >>$CONFIG_STATUS <<\_ACEOF
22119 # Let's still pretend it is `configure' which instantiates (i.e., don't
22120 # use $as_me), people would be surprised to read:
22121 # /* config.h. Generated by config.status. */
22122 if test x"$ac_file" = x-; then
22123 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000022124 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022125 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000022126 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022127 cat $tmp/in >>$tmp/config.h
22128 rm -f $tmp/in
22129 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022130 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022131 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22132echo "$as_me: $ac_file is unchanged" >&6;}
22133 else
22134 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22135$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022136 X"$ac_file" : 'X\(//\)[^/]' \| \
22137 X"$ac_file" : 'X\(//\)$' \| \
22138 X"$ac_file" : 'X\(/\)' \| \
22139 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022140echo X"$ac_file" |
22141 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22142 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22143 /^X\(\/\/\)$/{ s//\1/; q; }
22144 /^X\(\/\).*/{ s//\1/; q; }
22145 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022146 { if $as_mkdir_p; then
22147 mkdir -p "$ac_dir"
22148 else
22149 as_dir="$ac_dir"
22150 as_dirs=
22151 while test ! -d "$as_dir"; do
22152 as_dirs="$as_dir $as_dirs"
22153 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22154$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022155 X"$as_dir" : 'X\(//\)[^/]' \| \
22156 X"$as_dir" : 'X\(//\)$' \| \
22157 X"$as_dir" : 'X\(/\)' \| \
22158 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022159echo X"$as_dir" |
22160 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22161 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22162 /^X\(\/\/\)$/{ s//\1/; q; }
22163 /^X\(\/\).*/{ s//\1/; q; }
22164 s/.*/./; q'`
22165 done
22166 test ! -n "$as_dirs" || mkdir $as_dirs
22167 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22168echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22169 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022170
Martin v. Löwis11437992002-04-12 09:54:03 +000022171 rm -f $ac_file
22172 mv $tmp/config.h $ac_file
22173 fi
22174 else
22175 cat $tmp/config.h
22176 rm -f $tmp/config.h
22177 fi
22178done
22179_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022180
Martin v. Löwis11437992002-04-12 09:54:03 +000022181cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022182
Martin v. Löwis11437992002-04-12 09:54:03 +000022183{ (exit 0); exit 0; }
22184_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022185chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022186ac_clean_files=$ac_clean_files_save
22187
22188
22189# configure is writing to config.log, and then calls config.status.
22190# config.status does its own redirection, appending to config.log.
22191# Unfortunately, on DOS this fails, as config.log is still kept open
22192# by configure, so config.status won't be able to write to it; its
22193# output is simply discarded. So we exec the FD to /dev/null,
22194# effectively closing config.log, so it can be properly (re)opened and
22195# appended to by config.status. When coming back to configure, we
22196# need to make the FD available again.
22197if test "$no_create" != yes; then
22198 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000022199 ac_config_status_args=
22200 test "$silent" = yes &&
22201 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000022202 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000022203 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000022204 exec 5>>config.log
22205 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22206 # would make configure fail if this is the last instruction.
22207 $ac_cs_success || { (exit 1); exit 1; }
22208fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000022209
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000022210
22211echo "creating Setup"
22212if test ! -f Modules/Setup
22213then
22214 cp $srcdir/Modules/Setup.dist Modules/Setup
22215fi
22216
22217echo "creating Setup.local"
22218if test ! -f Modules/Setup.local
22219then
22220 echo "# Edit this file for local setup changes" >Modules/Setup.local
22221fi
22222
22223echo "creating Makefile"
22224$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
22225 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000022226 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000022227mv config.c Modules