blob: bc2ed78fadf6ac93e159e339ba9e2f1450e867bf [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Neal Norwitzfe8e3d92006-01-07 21:07:20 +00002# From configure.in Revision: 41924 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00004# Generated by GNU Autoconf 2.59 for python 2.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Skip Montanarof0d5f792004-08-15 14:08:23 +00008# Copyright (C) 2003 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011## --------------------- ##
12## M4sh Initialization. ##
13## --------------------- ##
14
15# Be Bourne compatible
16if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17 emulate sh
18 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000022elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23 set -o posix
24fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000025DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026
Martin v. Löwis11437992002-04-12 09:54:03 +000027# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000029 as_unset=unset
30else
31 as_unset=false
32fi
33
Skip Montanaro6dead952003-09-25 14:50:04 +000034
35# Work around bugs in pre-3.0 UWIN ksh.
36$as_unset ENV MAIL MAILPATH
37PS1='$ '
38PS2='> '
39PS4='+ '
40
41# NLS nuisances.
42for as_var in \
43 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
44 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
45 LC_TELEPHONE LC_TIME
46do
Skip Montanarof0d5f792004-08-15 14:08:23 +000047 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000048 eval $as_var=C; export $as_var
49 else
50 $as_unset $as_var
51 fi
52done
53
54# Required to use basename.
55if expr a : '\(a\)' >/dev/null 2>&1; then
56 as_expr=expr
57else
58 as_expr=false
59fi
60
61if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
62 as_basename=basename
63else
64 as_basename=false
65fi
Martin v. Löwis11437992002-04-12 09:54:03 +000066
67
68# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000069as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000070$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
71 X"$0" : 'X\(//\)$' \| \
72 X"$0" : 'X\(/\)$' \| \
73 . : '\(.\)' 2>/dev/null ||
74echo X/"$0" |
75 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
76 /^X\/\(\/\/\)$/{ s//\1/; q; }
77 /^X\/\(\/\).*/{ s//\1/; q; }
78 s/.*/./; q'`
79
Skip Montanaro6dead952003-09-25 14:50:04 +000080
Martin v. Löwis11437992002-04-12 09:54:03 +000081# PATH needs CR, and LINENO needs CR and PATH.
82# Avoid depending upon Character Ranges.
83as_cr_letters='abcdefghijklmnopqrstuvwxyz'
84as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
85as_cr_Letters=$as_cr_letters$as_cr_LETTERS
86as_cr_digits='0123456789'
87as_cr_alnum=$as_cr_Letters$as_cr_digits
88
89# The user is always right.
90if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000091 echo "#! /bin/sh" >conf$$.sh
92 echo "exit 0" >>conf$$.sh
93 chmod +x conf$$.sh
94 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000095 PATH_SEPARATOR=';'
96 else
97 PATH_SEPARATOR=:
98 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000099 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +0000100fi
101
102
103 as_lineno_1=$LINENO
104 as_lineno_2=$LINENO
105 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
106 test "x$as_lineno_1" != "x$as_lineno_2" &&
107 test "x$as_lineno_3" = "x$as_lineno_2" || {
108 # Find who we are. Look in the path if we contain no path at all
109 # relative or not.
110 case $0 in
111 *[\\/]* ) as_myself=$0 ;;
112 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
113for as_dir in $PATH
114do
115 IFS=$as_save_IFS
116 test -z "$as_dir" && as_dir=.
117 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
118done
119
120 ;;
121 esac
122 # We did not find ourselves, most probably we were run as `sh COMMAND'
123 # in which case we are not to be found in the path.
124 if test "x$as_myself" = x; then
125 as_myself=$0
126 fi
127 if test ! -f "$as_myself"; then
128 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
129 { (exit 1); exit 1; }; }
130 fi
131 case $CONFIG_SHELL in
132 '')
133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
134for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
135do
136 IFS=$as_save_IFS
137 test -z "$as_dir" && as_dir=.
138 for as_base in sh bash ksh sh5; do
139 case $as_dir in
140 /*)
141 if ("$as_dir/$as_base" -c '
142 as_lineno_1=$LINENO
143 as_lineno_2=$LINENO
144 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
145 test "x$as_lineno_1" != "x$as_lineno_2" &&
146 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000147 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
148 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000149 CONFIG_SHELL=$as_dir/$as_base
150 export CONFIG_SHELL
151 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
152 fi;;
153 esac
154 done
155done
156;;
157 esac
158
159 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
160 # uniformly replaced by the line number. The first 'sed' inserts a
161 # line-number line before each line; the second 'sed' does the real
162 # work. The second script uses 'N' to pair each line-number line
163 # with the numbered line, and appends trailing '-' during
164 # substitution so that $LINENO is not a special case at line end.
165 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
166 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
167 sed '=' <$as_myself |
168 sed '
169 N
170 s,$,-,
171 : loop
172 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
173 t loop
174 s,-$,,
175 s,^['$as_cr_digits']*\n,,
176 ' >$as_me.lineno &&
177 chmod +x $as_me.lineno ||
178 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
179 { (exit 1); exit 1; }; }
180
181 # Don't try to exec as it changes $[0], causing all sort of problems
182 # (the dirname of $[0] is not the place where we might find the
183 # original and so on. Autoconf is especially sensible to this).
184 . ./$as_me.lineno
185 # Exit status is that of the last command.
186 exit
187}
188
189
190case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
191 *c*,-n*) ECHO_N= ECHO_C='
192' ECHO_T=' ' ;;
193 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
194 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
195esac
196
197if expr a : '\(a\)' >/dev/null 2>&1; then
198 as_expr=expr
199else
200 as_expr=false
201fi
202
203rm -f conf$$ conf$$.exe conf$$.file
204echo >conf$$.file
205if ln -s conf$$.file conf$$ 2>/dev/null; then
206 # We could just check for DJGPP; but this test a) works b) is more generic
207 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
208 if test -f conf$$.exe; then
209 # Don't use ln at all; we don't have any links
210 as_ln_s='cp -p'
211 else
212 as_ln_s='ln -s'
213 fi
214elif ln conf$$.file conf$$ 2>/dev/null; then
215 as_ln_s=ln
216else
217 as_ln_s='cp -p'
218fi
219rm -f conf$$ conf$$.exe conf$$.file
220
Skip Montanaro6dead952003-09-25 14:50:04 +0000221if mkdir -p . 2>/dev/null; then
222 as_mkdir_p=:
223else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000224 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000225 as_mkdir_p=false
226fi
227
Martin v. Löwis11437992002-04-12 09:54:03 +0000228as_executable_p="test -f"
229
230# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000231as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000232
233# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000234as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000235
236
237# IFS
238# We need space, tab and new line, in precisely that order.
239as_nl='
240'
241IFS=" $as_nl"
242
243# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000244$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000245
246
247# Name of the host.
248# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
249# so uname gets run too.
250ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
251
252exec 6>&1
253
254#
255# Initializations.
256#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000257ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000258ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000259cross_compiling=no
260subdirs=
261MFLAGS=
262MAKEFLAGS=
263SHELL=${CONFIG_SHELL-/bin/sh}
264
265# Maximum number of lines to put in a shell here document.
266# This variable seems obsolete. It should probably be removed, and
267# only ac_max_sed_lines should be used.
268: ${ac_max_here_lines=38}
269
270# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000271PACKAGE_NAME='python'
272PACKAGE_TARNAME='python'
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000273PACKAGE_VERSION='2.5'
274PACKAGE_STRING='python 2.5'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000275PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000276
277ac_unique_file="Include/object.h"
278# Factoring default headers for most tests.
279ac_includes_default="\
280#include <stdio.h>
281#if HAVE_SYS_TYPES_H
282# include <sys/types.h>
283#endif
284#if HAVE_SYS_STAT_H
285# include <sys/stat.h>
286#endif
287#if STDC_HEADERS
288# include <stdlib.h>
289# include <stddef.h>
290#else
291# if HAVE_STDLIB_H
292# include <stdlib.h>
293# endif
294#endif
295#if HAVE_STRING_H
296# if !STDC_HEADERS && HAVE_MEMORY_H
297# include <memory.h>
298# endif
299# include <string.h>
300#endif
301#if HAVE_STRINGS_H
302# include <strings.h>
303#endif
304#if HAVE_INTTYPES_H
305# include <inttypes.h>
306#else
307# if HAVE_STDINT_H
308# include <stdint.h>
309# endif
310#endif
311#if HAVE_UNISTD_H
312# include <unistd.h>
313#endif"
314
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öwisfd1c69e72004-11-30 22:09:37 +0000784\`configure' configures python 2.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785
786Usage: $0 [OPTION]... [VAR=VALUE]...
787
788To assign environment variables (e.g., CC, CFLAGS...), specify them as
789VAR=VALUE. See below for descriptions of some of the useful variables.
790
791Defaults for the options are specified in brackets.
792
793Configuration:
794 -h, --help display this help and exit
795 --help=short display options specific to this package
796 --help=recursive display the short help of all the included packages
797 -V, --version display version information and exit
798 -q, --quiet, --silent do not print \`checking...' messages
799 --cache-file=FILE cache test results in FILE [disabled]
800 -C, --config-cache alias for \`--cache-file=config.cache'
801 -n, --no-create do not create output files
802 --srcdir=DIR find the sources in DIR [configure dir or \`..']
803
804_ACEOF
805
806 cat <<_ACEOF
807Installation directories:
808 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000809 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +0000810 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000811 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +0000812
813By default, \`make install' will install all the files in
814\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
815an installation prefix other than \`$ac_default_prefix' using \`--prefix',
816for instance \`--prefix=\$HOME'.
817
818For better control, use the options below.
819
820Fine tuning of the installation directories:
821 --bindir=DIR user executables [EPREFIX/bin]
822 --sbindir=DIR system admin executables [EPREFIX/sbin]
823 --libexecdir=DIR program executables [EPREFIX/libexec]
824 --datadir=DIR read-only architecture-independent data [PREFIX/share]
825 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
826 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
827 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
828 --libdir=DIR object code libraries [EPREFIX/lib]
829 --includedir=DIR C header files [PREFIX/include]
830 --oldincludedir=DIR C header files for non-gcc [/usr/include]
831 --infodir=DIR info documentation [PREFIX/info]
832 --mandir=DIR man documentation [PREFIX/man]
833_ACEOF
834
835 cat <<\_ACEOF
836_ACEOF
837fi
838
839if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000840 case $ac_init_help in
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000841 short | recursive ) echo "Configuration of python 2.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000842 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 cat <<\_ACEOF
844
845Optional Features:
846 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
847 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000848 --enable-framework[=INSTALLDIR]
849 Build (MacOSX|Darwin) framework
850 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +0000851 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000852 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
853 --enable-ipv6 Enable ipv6 (with ipv4) support
854 --disable-ipv6 Disable ipv6 support
855 --enable-unicode[=ucs[24]]
856 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857
858Optional Packages:
859 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
860 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000861 --without-gcc never use gcc
862 --with-cxx=<compiler> enable C++ support
863 --with-suffix=.exe set executable suffix
864 --with-pydebug build with Py_DEBUG defined
865 --with-libs='lib1 ...' link against additional libs
866 --with-signal-module disable/enable signal module
867 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
868 --with(out)-threads[=DIRECTORY]
869 disable/enable thread support
870 --with(out)-thread[=DIRECTORY]
871 deprecated; use --with(out)-threads
872 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000873 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000874 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000875 --with(out)-pymalloc disable/enable specialized mallocs
876 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000877 --with-fpectl enable SIGFPE catching
878 --with-libm=STRING math library
879 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000880
881Some influential environment variables:
882 CC C compiler command
883 CFLAGS C compiler flags
884 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
885 nonstandard directory <lib dir>
886 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
887 headers in a nonstandard directory <include dir>
888 CPP C preprocessor
889
890Use these variables to override the choices made by `configure' or to help
891it to find libraries and programs with nonstandard names/locations.
892
Martin v. Löwis1d459062005-03-14 21:23:33 +0000893Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +0000894_ACEOF
895fi
896
897if test "$ac_init_help" = "recursive"; then
898 # If there are subdirs, report their specific --help.
899 ac_popdir=`pwd`
900 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
901 test -d $ac_dir || continue
902 ac_builddir=.
903
904if test "$ac_dir" != .; then
905 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
906 # A "../" for each directory in $ac_dir_suffix.
907 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
908else
909 ac_dir_suffix= ac_top_builddir=
910fi
911
912case $srcdir in
913 .) # No --srcdir option. We are building in place.
914 ac_srcdir=.
915 if test -z "$ac_top_builddir"; then
916 ac_top_srcdir=.
917 else
918 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
919 fi ;;
920 [\\/]* | ?:[\\/]* ) # Absolute path.
921 ac_srcdir=$srcdir$ac_dir_suffix;
922 ac_top_srcdir=$srcdir ;;
923 *) # Relative path.
924 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
925 ac_top_srcdir=$ac_top_builddir$srcdir ;;
926esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000927
928# Do not use `cd foo && pwd` to compute absolute paths, because
929# the directories may not exist.
930case `pwd` in
931.) ac_abs_builddir="$ac_dir";;
932*)
933 case "$ac_dir" in
934 .) ac_abs_builddir=`pwd`;;
935 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
936 *) ac_abs_builddir=`pwd`/"$ac_dir";;
937 esac;;
938esac
939case $ac_abs_builddir in
940.) ac_abs_top_builddir=${ac_top_builddir}.;;
941*)
942 case ${ac_top_builddir}. in
943 .) ac_abs_top_builddir=$ac_abs_builddir;;
944 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
945 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_srcdir=$ac_srcdir;;
950*)
951 case $ac_srcdir in
952 .) ac_abs_srcdir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
954 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_top_srcdir=$ac_top_srcdir;;
959*)
960 case $ac_top_srcdir in
961 .) ac_abs_top_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
963 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
964 esac;;
965esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000966
967 cd $ac_dir
968 # Check for guested configure; otherwise get Cygnus style configure.
969 if test -f $ac_srcdir/configure.gnu; then
970 echo
971 $SHELL $ac_srcdir/configure.gnu --help=recursive
972 elif test -f $ac_srcdir/configure; then
973 echo
974 $SHELL $ac_srcdir/configure --help=recursive
975 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000976 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 echo
978 $ac_configure --help
979 else
980 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
981 fi
Brett Cannon43802422005-02-10 20:48:03 +0000982 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 done
984fi
985
986test -n "$ac_init_help" && exit 0
987if $ac_init_version; then
988 cat <<\_ACEOF
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000989python configure 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +0000990generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000991
Skip Montanarof0d5f792004-08-15 14:08:23 +0000992Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000993This configure script is free software; the Free Software Foundation
994gives unlimited permission to copy, distribute and modify it.
995_ACEOF
996 exit 0
997fi
998exec 5>config.log
999cat >&5 <<_ACEOF
1000This file contains any messages produced by compilers while
1001running configure, to aid debugging if configure makes a mistake.
1002
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001003It was created by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001004generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001005
1006 $ $0 $@
1007
1008_ACEOF
1009{
1010cat <<_ASUNAME
1011## --------- ##
1012## Platform. ##
1013## --------- ##
1014
1015hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1016uname -m = `(uname -m) 2>/dev/null || echo unknown`
1017uname -r = `(uname -r) 2>/dev/null || echo unknown`
1018uname -s = `(uname -s) 2>/dev/null || echo unknown`
1019uname -v = `(uname -v) 2>/dev/null || echo unknown`
1020
1021/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1022/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1023
1024/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1025/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1026/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1027hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1028/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1029/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1030/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1031
1032_ASUNAME
1033
1034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1035for as_dir in $PATH
1036do
1037 IFS=$as_save_IFS
1038 test -z "$as_dir" && as_dir=.
1039 echo "PATH: $as_dir"
1040done
1041
1042} >&5
1043
1044cat >&5 <<_ACEOF
1045
1046
1047## ----------- ##
1048## Core tests. ##
1049## ----------- ##
1050
1051_ACEOF
1052
1053
1054# Keep a trace of the command line.
1055# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001056# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001057# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001058# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001059ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001060ac_configure_args0=
1061ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001062ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001063ac_must_keep_next=false
1064for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001065do
Skip Montanaro6dead952003-09-25 14:50:04 +00001066 for ac_arg
1067 do
1068 case $ac_arg in
1069 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1070 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1071 | -silent | --silent | --silen | --sile | --sil)
1072 continue ;;
1073 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1074 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1075 esac
1076 case $ac_pass in
1077 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1078 2)
1079 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1080 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001081 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001082 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001083 case $ac_arg in
1084 *=* | --config-cache | -C | -disable-* | --disable-* \
1085 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1086 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1087 | -with-* | --with-* | -without-* | --without-* | --x)
1088 case "$ac_configure_args0 " in
1089 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1090 esac
1091 ;;
1092 -* ) ac_must_keep_next=true ;;
1093 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001094 fi
1095 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1096 # Get rid of the leading space.
1097 ac_sep=" "
1098 ;;
1099 esac
1100 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001101done
Skip Montanaro6dead952003-09-25 14:50:04 +00001102$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1103$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001104
1105# When interrupted or exit'd, cleanup temporary files, and complete
1106# config.log. We remove comments because anyway the quotes in there
1107# would cause problems or look ugly.
1108# WARNING: Be sure not to use single quotes in there, as some shells,
1109# such as our DU 5.0 friend, will then `close' the trap.
1110trap 'exit_status=$?
1111 # Save into config.log some information that might help in debugging.
1112 {
1113 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001114
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 cat <<\_ASBOX
1116## ---------------- ##
1117## Cache variables. ##
1118## ---------------- ##
1119_ASBOX
1120 echo
1121 # The following way of writing the cache mishandles newlines in values,
1122{
1123 (set) 2>&1 |
1124 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1125 *ac_space=\ *)
1126 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001127 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1128 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ;;
1130 *)
1131 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001132 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 ;;
1134 esac;
1135}
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137
1138 cat <<\_ASBOX
1139## ----------------- ##
1140## Output variables. ##
1141## ----------------- ##
1142_ASBOX
1143 echo
1144 for ac_var in $ac_subst_vars
1145 do
1146 eval ac_val=$`echo $ac_var`
1147 echo "$ac_var='"'"'$ac_val'"'"'"
1148 done | sort
1149 echo
1150
1151 if test -n "$ac_subst_files"; then
1152 cat <<\_ASBOX
1153## ------------- ##
1154## Output files. ##
1155## ------------- ##
1156_ASBOX
1157 echo
1158 for ac_var in $ac_subst_files
1159 do
1160 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001161 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001162 done | sort
1163 echo
1164 fi
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 if test -s confdefs.h; then
1167 cat <<\_ASBOX
1168## ----------- ##
1169## confdefs.h. ##
1170## ----------- ##
1171_ASBOX
1172 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001173 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 echo
1175 fi
1176 test "$ac_signal" != 0 &&
1177 echo "$as_me: caught signal $ac_signal"
1178 echo "$as_me: exit $exit_status"
1179 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001180 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1182 exit $exit_status
1183 ' 0
1184for ac_signal in 1 2 13 15; do
1185 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1186done
1187ac_signal=0
1188
1189# confdefs.h avoids OS command line length limits that DEFS can exceed.
1190rm -rf conftest* confdefs.h
1191# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1192echo >confdefs.h
1193
1194# Predefined preprocessor variables.
1195
1196cat >>confdefs.h <<_ACEOF
1197#define PACKAGE_NAME "$PACKAGE_NAME"
1198_ACEOF
1199
1200
1201cat >>confdefs.h <<_ACEOF
1202#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1203_ACEOF
1204
1205
1206cat >>confdefs.h <<_ACEOF
1207#define PACKAGE_VERSION "$PACKAGE_VERSION"
1208_ACEOF
1209
1210
1211cat >>confdefs.h <<_ACEOF
1212#define PACKAGE_STRING "$PACKAGE_STRING"
1213_ACEOF
1214
1215
1216cat >>confdefs.h <<_ACEOF
1217#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1218_ACEOF
1219
1220
1221# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222# Prefer explicitly selected file to automatically selected ones.
1223if test -z "$CONFIG_SITE"; then
1224 if test "x$prefix" != xNONE; then
1225 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1226 else
1227 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1228 fi
1229fi
1230for ac_site_file in $CONFIG_SITE; do
1231 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1233echo "$as_me: loading site script $ac_site_file" >&6;}
1234 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235 . "$ac_site_file"
1236 fi
1237done
1238
1239if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 # Some versions of bash will fail to source /dev/null (special
1241 # files actually), so we avoid doing that.
1242 if test -f "$cache_file"; then
1243 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1244echo "$as_me: loading cache $cache_file" >&6;}
1245 case $cache_file in
1246 [\\/]* | ?:[\\/]* ) . $cache_file;;
1247 *) . ./$cache_file;;
1248 esac
1249 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001250else
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1252echo "$as_me: creating cache $cache_file" >&6;}
1253 >$cache_file
1254fi
1255
1256# Check that the precious variables saved in the cache have kept the same
1257# value.
1258ac_cache_corrupted=false
1259for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001260 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1262 eval ac_new_set=\$ac_env_${ac_var}_set
1263 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1264 eval ac_new_val="\$ac_env_${ac_var}_value"
1265 case $ac_old_set,$ac_new_set in
1266 set,)
1267 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1268echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1269 ac_cache_corrupted=: ;;
1270 ,set)
1271 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1272echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1273 ac_cache_corrupted=: ;;
1274 ,);;
1275 *)
1276 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001277 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001278echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001279 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001280echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001281 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001282echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001283 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 fi;;
1285 esac
1286 # Pass precious variables to config.status.
1287 if test "$ac_new_set" = set; then
1288 case $ac_new_val in
1289 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1290 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1291 *) ac_arg=$ac_var=$ac_new_val ;;
1292 esac
1293 case " $ac_configure_args " in
1294 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1295 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1296 esac
1297 fi
1298done
1299if $ac_cache_corrupted; then
1300 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1301echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1302 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1303echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1304 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305fi
1306
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1311ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Michael W. Hudson54241132001-12-07 15:38:26 +00001314
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
Martin v. Löwis88afe662002-10-26 13:47:44 +00001330
1331
1332
1333
1334
1335
1336
1337
1338
Skip Montanaro6dead952003-09-25 14:50:04 +00001339
1340 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343
1344
1345
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001346
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001347
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001348# We don't use PACKAGE_ variables, and they cause conflicts
1349# with other autoconf-based packages that include Python.h
1350grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1351rm confdefs.h
1352mv confdefs.h.new confdefs.h
1353
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001354
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001355VERSION=2.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001356
Martin v. Löwis1142de32002-03-29 16:28:31 +00001357
1358SOVERSION=1.0
1359
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001360# The later defininition of _XOPEN_SOURCE disables certain features
1361# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1362
1363cat >>confdefs.h <<\_ACEOF
1364#define _GNU_SOURCE 1
1365_ACEOF
1366
1367
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001368# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1369# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1370# them.
1371
1372cat >>confdefs.h <<\_ACEOF
1373#define _NETBSD_SOURCE 1
1374_ACEOF
1375
1376
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001377# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1378# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1379# them.
1380
1381cat >>confdefs.h <<\_ACEOF
1382#define __BSD_VISIBLE 1
1383_ACEOF
1384
1385
Martin v. Löwisd6320502004-08-12 13:45:08 +00001386# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1387# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1388
1389cat >>confdefs.h <<\_ACEOF
1390#define _BSD_TYPES 1
1391_ACEOF
1392
1393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001394define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001395
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001396# Arguments passed to configure.
1397
1398CONFIG_ARGS="$ac_configure_args"
1399
Jack Jansene578a632001-08-15 01:27:14 +00001400# Check whether --enable-framework or --disable-framework was given.
1401if test "${enable_framework+set}" = set; then
1402 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
Jack Jansene578a632001-08-15 01:27:14 +00001404 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001406 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001407 esac
1408 case $enableval in
1409 no)
1410 PYTHONFRAMEWORK=
1411 PYTHONFRAMEWORKDIR=no-framework
1412 PYTHONFRAMEWORKPREFIX=
1413 PYTHONFRAMEWORKINSTALLDIR=
1414 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001415 ;;
1416 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001417 PYTHONFRAMEWORK=Python
1418 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001419 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001420 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1421 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001422 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
Guido van Rossum563e7081996-09-10 18:20:48 +00001424else
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
Jack Jansene578a632001-08-15 01:27:14 +00001426 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001427 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001428 PYTHONFRAMEWORKPREFIX=
1429 PYTHONFRAMEWORKINSTALLDIR=
1430 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001433
1434
1435
1436
Jack Jansene578a632001-08-15 01:27:14 +00001437
1438##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439## AC_HELP_STRING(--with-dyld,
1440## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001441##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001442# Set name for machine-dependent library files
1443
Martin v. Löwis11437992002-04-12 09:54:03 +00001444echo "$as_me:$LINENO: checking MACHDEP" >&5
1445echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001446if test -z "$MACHDEP"
1447then
Guido van Rossum563e7081996-09-10 18:20:48 +00001448 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001449 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1450 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001451 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001452 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001453 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001454 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001455 ac_md_system=`echo $ac_sys_system |
1456 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1457 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001458 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001459 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001460
Guido van Rossum07397971997-04-29 21:49:50 +00001461 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001462 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001463 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001464 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001465 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001466 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001467 esac
1468fi
Guido van Rossum91922671997-10-09 20:24:13 +00001469
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001470# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1471# disable features if it is defined, without any means to access these
1472# features as extensions. For these systems, we skip the definition of
1473# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1474# some feature, make sure there is no alternative way to access this
1475# feature. Also, when using wildcards, make sure you have verified the
1476# need for not defining _XOPEN_SOURCE on all systems matching the
1477# wildcard, and that the wildcard does not include future systems
1478# (which may remove their limitations).
1479case $ac_sys_system/$ac_sys_release in
1480 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1481 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001482 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis99968282004-09-15 06:02:54 +00001483 OpenBSD/2.* | OpenBSD/3.[0123456])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001484 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001485 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1486 # of union __?sigval. Reported by Stuart Bishop.
1487 SunOS/5.6)
1488 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001489 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1490 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001491 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001492 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001493 define_xopen_source=no;;
1494 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001495 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001496 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001497 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001498 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1499 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1500 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1501 # This should hopefully be fixed in FreeBSD 4.9
1502 FreeBSD/4.8* | Darwin/6* )
1503 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001504 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1505 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1506 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001507 AIX/4)
1508 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001509 AIX/5)
1510 if test `uname -r` -eq 1; then
1511 define_xopen_source=no
1512 fi
1513 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001514 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1515 # disables platform specific features beyond repair.
1516 Darwin/8.*)
1517 define_xopen_source=no
1518 ;;
1519
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001520esac
1521
1522if test $define_xopen_source = yes
1523then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1525 # defined precisely as g++ defines it
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
Martin v. Löwis11437992002-04-12 09:54:03 +00003914echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3915echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3916if test "${ac_cv_opt_olimit_ok+set}" = set; then
3917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003918else
3919 ac_save_cc="$CC"
3920CC="$CC -OPT:Olimit=0"
3921if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003922 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003923else
Martin v. Löwis11437992002-04-12 09:54:03 +00003924 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003925/* confdefs.h. */
3926_ACEOF
3927cat confdefs.h >>conftest.$ac_ext
3928cat >>conftest.$ac_ext <<_ACEOF
3929/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003930int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003931_ACEOF
3932rm -f conftest$ac_exeext
3933if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3934 (eval $ac_link) 2>&5
3935 ac_status=$?
3936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3939 (eval $ac_try) 2>&5
3940 ac_status=$?
3941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3942 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003943 ac_cv_opt_olimit_ok=yes
3944else
Martin v. Löwis11437992002-04-12 09:54:03 +00003945 echo "$as_me: program exited with status $ac_status" >&5
3946echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003947sed 's/^/| /' conftest.$ac_ext >&5
3948
Martin v. Löwis11437992002-04-12 09:54:03 +00003949( exit $ac_status )
3950ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003951fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003952rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003953fi
Guido van Rossum91922671997-10-09 20:24:13 +00003954CC="$ac_save_cc"
3955fi
3956
Martin v. Löwis11437992002-04-12 09:54:03 +00003957echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3958echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003959if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003960 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003961 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3962 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3963 # environment?
3964 Darwin*)
3965 ;;
3966 *)
3967 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3968 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003969 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003970else
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3972echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3973 if test "${ac_cv_olimit_ok+set}" = set; then
3974 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003975else
3976 ac_save_cc="$CC"
3977 CC="$CC -Olimit 1500"
3978 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003979 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003980else
Martin v. Löwis11437992002-04-12 09:54:03 +00003981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003982/* confdefs.h. */
3983_ACEOF
3984cat confdefs.h >>conftest.$ac_ext
3985cat >>conftest.$ac_ext <<_ACEOF
3986/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003987int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003988_ACEOF
3989rm -f conftest$ac_exeext
3990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3991 (eval $ac_link) 2>&5
3992 ac_status=$?
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3996 (eval $ac_try) 2>&5
3997 ac_status=$?
3998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004000 ac_cv_olimit_ok=yes
4001else
Martin v. Löwis11437992002-04-12 09:54:03 +00004002 echo "$as_me: program exited with status $ac_status" >&5
4003echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004004sed 's/^/| /' conftest.$ac_ext >&5
4005
Martin v. Löwis11437992002-04-12 09:54:03 +00004006( exit $ac_status )
4007ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004008fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004009rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004010fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004011 CC="$ac_save_cc"
4012fi
4013
Martin v. Löwis11437992002-04-12 09:54:03 +00004014 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4015echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004016 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004017 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004018 fi
4019fi
4020
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004021# On some compilers, pthreads are available without further options
4022# (e.g. MacOS X). On some of these systems, the compiler will not
4023# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4024# So we have to see first whether pthreads are available without
4025# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004026echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4027echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4028if test "${ac_cv_pthread_is_default+set}" = set; then
4029 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004030else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004031 if test "$cross_compiling" = yes; then
4032 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004033else
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004035/* confdefs.h. */
4036_ACEOF
4037cat confdefs.h >>conftest.$ac_ext
4038cat >>conftest.$ac_ext <<_ACEOF
4039/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004040
Martin v. Löwis130fb172001-07-19 11:00:41 +00004041#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004042
4043void* routine(void* p){return NULL;}
4044
4045int main(){
4046 pthread_t p;
4047 if(pthread_create(&p,NULL,routine,NULL)!=0)
4048 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004049 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004050 return 0;
4051}
4052
Martin v. Löwis11437992002-04-12 09:54:03 +00004053_ACEOF
4054rm -f conftest$ac_exeext
4055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4056 (eval $ac_link) 2>&5
4057 ac_status=$?
4058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4061 (eval $ac_try) 2>&5
4062 ac_status=$?
4063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4064 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004065
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004066 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004067 ac_cv_kthread=no
4068 ac_cv_pthread=no
4069
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004070else
Martin v. Löwis11437992002-04-12 09:54:03 +00004071 echo "$as_me: program exited with status $ac_status" >&5
4072echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004073sed 's/^/| /' conftest.$ac_ext >&5
4074
Martin v. Löwis11437992002-04-12 09:54:03 +00004075( exit $ac_status )
4076ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004077fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004078rm -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 +00004079fi
4080
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004081fi
4082
Martin v. Löwis11437992002-04-12 09:54:03 +00004083echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4084echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004085
Michael W. Hudson54241132001-12-07 15:38:26 +00004086
Martin v. Löwis11437992002-04-12 09:54:03 +00004087if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004088then
4089 ac_cv_kpthread=no
4090else
4091# -Kpthread, if available, provides the right #defines
4092# and linker options to make pthread_create available
4093# Some compilers won't report that they do not support -Kpthread,
4094# so we need to run a program to see whether it really made the
4095# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004096echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4097echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4098if test "${ac_cv_kpthread+set}" = set; then
4099 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004100else
4101 ac_save_cc="$CC"
4102CC="$CC -Kpthread"
4103if test "$cross_compiling" = yes; then
4104 ac_cv_kpthread=no
4105else
Martin v. Löwis11437992002-04-12 09:54:03 +00004106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004107/* confdefs.h. */
4108_ACEOF
4109cat confdefs.h >>conftest.$ac_ext
4110cat >>conftest.$ac_ext <<_ACEOF
4111/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004112
4113#include <pthread.h>
4114
4115void* routine(void* p){return NULL;}
4116
4117int main(){
4118 pthread_t p;
4119 if(pthread_create(&p,NULL,routine,NULL)!=0)
4120 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004121 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004122 return 0;
4123}
4124
Martin v. Löwis11437992002-04-12 09:54:03 +00004125_ACEOF
4126rm -f conftest$ac_exeext
4127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4128 (eval $ac_link) 2>&5
4129 ac_status=$?
4130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4133 (eval $ac_try) 2>&5
4134 ac_status=$?
4135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004137 ac_cv_kpthread=yes
4138else
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 echo "$as_me: program exited with status $ac_status" >&5
4140echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004141sed 's/^/| /' conftest.$ac_ext >&5
4142
Martin v. Löwis11437992002-04-12 09:54:03 +00004143( exit $ac_status )
4144ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004145fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004146rm -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 +00004147fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004148CC="$ac_save_cc"
4149fi
4150
Martin v. Löwis11437992002-04-12 09:54:03 +00004151echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4152echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004153fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004154
Skip Montanarod8d39a02003-07-10 20:44:10 +00004155if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004156then
4157# -Kthread, if available, provides the right #defines
4158# and linker options to make pthread_create available
4159# Some compilers won't report that they do not support -Kthread,
4160# so we need to run a program to see whether it really made the
4161# function available.
4162echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4163echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4164if test "${ac_cv_kthread+set}" = set; then
4165 echo $ECHO_N "(cached) $ECHO_C" >&6
4166else
4167 ac_save_cc="$CC"
4168CC="$CC -Kthread"
4169if test "$cross_compiling" = yes; then
4170 ac_cv_kthread=no
4171else
4172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004173/* confdefs.h. */
4174_ACEOF
4175cat confdefs.h >>conftest.$ac_ext
4176cat >>conftest.$ac_ext <<_ACEOF
4177/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004178
4179#include <pthread.h>
4180
4181void* routine(void* p){return NULL;}
4182
4183int main(){
4184 pthread_t p;
4185 if(pthread_create(&p,NULL,routine,NULL)!=0)
4186 return 1;
4187 (void)pthread_detach(p);
4188 return 0;
4189}
4190
4191_ACEOF
4192rm -f conftest$ac_exeext
4193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4194 (eval $ac_link) 2>&5
4195 ac_status=$?
4196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4199 (eval $ac_try) 2>&5
4200 ac_status=$?
4201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202 (exit $ac_status); }; }; then
4203 ac_cv_kthread=yes
4204else
4205 echo "$as_me: program exited with status $ac_status" >&5
4206echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004207sed 's/^/| /' conftest.$ac_ext >&5
4208
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004209( exit $ac_status )
4210ac_cv_kthread=no
4211fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004212rm -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 +00004213fi
4214CC="$ac_save_cc"
4215fi
4216
4217echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4218echo "${ECHO_T}$ac_cv_kthread" >&6
4219fi
4220
Skip Montanarod8d39a02003-07-10 20:44:10 +00004221if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004222then
4223# -pthread, if available, provides the right #defines
4224# and linker options to make pthread_create available
4225# Some compilers won't report that they do not support -pthread,
4226# so we need to run a program to see whether it really made the
4227# function available.
4228echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4229echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4230if test "${ac_cv_thread+set}" = set; then
4231 echo $ECHO_N "(cached) $ECHO_C" >&6
4232else
4233 ac_save_cc="$CC"
4234CC="$CC -pthread"
4235if test "$cross_compiling" = yes; then
4236 ac_cv_pthread=no
4237else
4238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004239/* confdefs.h. */
4240_ACEOF
4241cat confdefs.h >>conftest.$ac_ext
4242cat >>conftest.$ac_ext <<_ACEOF
4243/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004244
4245#include <pthread.h>
4246
4247void* routine(void* p){return NULL;}
4248
4249int main(){
4250 pthread_t p;
4251 if(pthread_create(&p,NULL,routine,NULL)!=0)
4252 return 1;
4253 (void)pthread_detach(p);
4254 return 0;
4255}
4256
4257_ACEOF
4258rm -f conftest$ac_exeext
4259if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4260 (eval $ac_link) 2>&5
4261 ac_status=$?
4262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4263 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4265 (eval $ac_try) 2>&5
4266 ac_status=$?
4267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4268 (exit $ac_status); }; }; then
4269 ac_cv_pthread=yes
4270else
4271 echo "$as_me: program exited with status $ac_status" >&5
4272echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004273sed 's/^/| /' conftest.$ac_ext >&5
4274
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004275( exit $ac_status )
4276ac_cv_pthread=no
4277fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004278rm -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 +00004279fi
4280CC="$ac_save_cc"
4281fi
4282
4283echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4284echo "${ECHO_T}$ac_cv_pthread" >&6
4285fi
4286
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004287# If we have set a CC compiler flag for thread support then
4288# check if it works for CXX, too.
4289ac_cv_cxx_thread=no
4290if test ! -z "$CXX"
4291then
4292echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4293echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4294ac_save_cxx="$CXX"
4295
4296if test "$ac_cv_kpthread" = "yes"
4297then
4298 CXX="$CXX -Kpthread"
4299 ac_cv_cxx_thread=yes
4300elif test "$ac_cv_kthread" = "yes"
4301then
4302 CXX="$CXX -Kthread"
4303 ac_cv_cxx_thread=yes
4304elif test "$ac_cv_pthread" = "yes"
4305then
4306 CXX="$CXX -pthread"
4307 ac_cv_cxx_thread=yes
4308fi
4309
4310if test $ac_cv_cxx_thread = yes
4311then
4312 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4313 $CXX -c conftest.$ac_ext 2>&5
4314 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4315 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4316 then
4317 ac_cv_cxx_thread=yes
4318 else
4319 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004320 fi
4321 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004322fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004323echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4324echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004325fi
4326CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004327
Michael W. Hudson54241132001-12-07 15:38:26 +00004328
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004329# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004330echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4331echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4332if test "${ac_cv_header_stdc+set}" = set; then
4333 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334else
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004336/* confdefs.h. */
4337_ACEOF
4338cat confdefs.h >>conftest.$ac_ext
4339cat >>conftest.$ac_ext <<_ACEOF
4340/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004341#include <stdlib.h>
4342#include <stdarg.h>
4343#include <string.h>
4344#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004345
Skip Montanaro6dead952003-09-25 14:50:04 +00004346int
4347main ()
4348{
4349
4350 ;
4351 return 0;
4352}
Martin v. Löwis11437992002-04-12 09:54:03 +00004353_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004354rm -f conftest.$ac_objext
4355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004356 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004358 grep -v '^ *+' conftest.er1 >conftest.err
4359 rm -f conftest.er1
4360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004362 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004363 { ac_try='test -z "$ac_c_werror_flag"
4364 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4366 (eval $ac_try) 2>&5
4367 ac_status=$?
4368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4369 (exit $ac_status); }; } &&
4370 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004376 ac_cv_header_stdc=yes
4377else
Martin v. Löwis11437992002-04-12 09:54:03 +00004378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004379sed 's/^/| /' conftest.$ac_ext >&5
4380
4381ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004383rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384
4385if test $ac_cv_header_stdc = yes; then
4386 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004388/* confdefs.h. */
4389_ACEOF
4390cat confdefs.h >>conftest.$ac_ext
4391cat >>conftest.$ac_ext <<_ACEOF
4392/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004394
4395_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004396if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004397 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398 :
4399else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004400 ac_cv_header_stdc=no
4401fi
4402rm -f conftest*
4403
4404fi
4405
4406if test $ac_cv_header_stdc = yes; then
4407 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004408 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004409/* confdefs.h. */
4410_ACEOF
4411cat confdefs.h >>conftest.$ac_ext
4412cat >>conftest.$ac_ext <<_ACEOF
4413/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004414#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004415
4416_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004418 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004419 :
4420else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004421 ac_cv_header_stdc=no
4422fi
4423rm -f conftest*
4424
4425fi
4426
4427if test $ac_cv_header_stdc = yes; then
4428 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004429 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004430 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004431else
Martin v. Löwis11437992002-04-12 09:54:03 +00004432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004433/* confdefs.h. */
4434_ACEOF
4435cat confdefs.h >>conftest.$ac_ext
4436cat >>conftest.$ac_ext <<_ACEOF
4437/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004438#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004439#if ((' ' & 0x0FF) == 0x020)
4440# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4441# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4442#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004443# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004444 (('a' <= (c) && (c) <= 'i') \
4445 || ('j' <= (c) && (c) <= 'r') \
4446 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004447# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4448#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004449
Martin v. Löwis11437992002-04-12 09:54:03 +00004450#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4451int
4452main ()
4453{
4454 int i;
4455 for (i = 0; i < 256; i++)
4456 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004457 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004458 exit(2);
4459 exit (0);
4460}
4461_ACEOF
4462rm -f conftest$ac_exeext
4463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4464 (eval $ac_link) 2>&5
4465 ac_status=$?
4466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4467 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4469 (eval $ac_try) 2>&5
4470 ac_status=$?
4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004473 :
4474else
Martin v. Löwis11437992002-04-12 09:54:03 +00004475 echo "$as_me: program exited with status $ac_status" >&5
4476echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004477sed 's/^/| /' conftest.$ac_ext >&5
4478
Martin v. Löwis11437992002-04-12 09:54:03 +00004479( exit $ac_status )
4480ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004481fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004482rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004483fi
4484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004485fi
4486echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4487echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004488if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004489
4490cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004491#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004492_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004493
4494fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004495
Skip Montanarob9820a32004-01-17 00:16:12 +00004496# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004507 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004508do
4509as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4510echo "$as_me:$LINENO: checking for $ac_header" >&5
4511echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4512if eval "test \"\${$as_ac_Header+set}\" = set"; then
4513 echo $ECHO_N "(cached) $ECHO_C" >&6
4514else
4515 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004516/* confdefs.h. */
4517_ACEOF
4518cat confdefs.h >>conftest.$ac_ext
4519cat >>conftest.$ac_ext <<_ACEOF
4520/* end confdefs.h. */
4521$ac_includes_default
4522
4523#include <$ac_header>
4524_ACEOF
4525rm -f conftest.$ac_objext
4526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004527 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004529 grep -v '^ *+' conftest.er1 >conftest.err
4530 rm -f conftest.er1
4531 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4533 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004534 { ac_try='test -z "$ac_c_werror_flag"
4535 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4537 (eval $ac_try) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); }; } &&
4541 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +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); }; }; then
4547 eval "$as_ac_Header=yes"
4548else
4549 echo "$as_me: failed program was:" >&5
4550sed 's/^/| /' conftest.$ac_ext >&5
4551
4552eval "$as_ac_Header=no"
4553fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004554rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004555fi
4556echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4557echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4558if test `eval echo '${'$as_ac_Header'}'` = yes; then
4559 cat >>confdefs.h <<_ACEOF
4560#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4561_ACEOF
4562
4563fi
4564
4565done
4566
4567
Martin v. Löwis11437992002-04-12 09:54:03 +00004568
4569
4570
4571
4572
4573
4574
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
Anthony Baxter8a560de2004-10-13 15:30:56 +00004604
Martin v. Löwisc3001752005-01-23 09:27:24 +00004605
4606for ac_header in curses.h dlfcn.h fcntl.h grp.h shadow.h langinfo.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004607libintl.h ncurses.h poll.h pthread.h \
4608stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004609unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004610sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4611sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004612sys/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 +00004613sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004614sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4615bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004616do
Martin v. Löwis11437992002-04-12 09:54:03 +00004617as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4618if eval "test \"\${$as_ac_Header+set}\" = set"; then
4619 echo "$as_me:$LINENO: checking for $ac_header" >&5
4620echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4621if eval "test \"\${$as_ac_Header+set}\" = set"; then
4622 echo $ECHO_N "(cached) $ECHO_C" >&6
4623fi
4624echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4625echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626else
Martin v. Löwis11437992002-04-12 09:54:03 +00004627 # Is the header compilable?
4628echo "$as_me:$LINENO: checking $ac_header usability" >&5
4629echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004631/* confdefs.h. */
4632_ACEOF
4633cat confdefs.h >>conftest.$ac_ext
4634cat >>conftest.$ac_ext <<_ACEOF
4635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004636$ac_includes_default
4637#include <$ac_header>
4638_ACEOF
4639rm -f conftest.$ac_objext
4640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004641 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004643 grep -v '^ *+' conftest.er1 >conftest.err
4644 rm -f conftest.er1
4645 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004648 { ac_try='test -z "$ac_c_werror_flag"
4649 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4651 (eval $ac_try) 2>&5
4652 ac_status=$?
4653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4654 (exit $ac_status); }; } &&
4655 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
4661 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004662else
Martin v. Löwis11437992002-04-12 09:54:03 +00004663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004664sed 's/^/| /' conftest.$ac_ext >&5
4665
Martin v. Löwis11437992002-04-12 09:54:03 +00004666ac_header_compiler=no
4667fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004669echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4670echo "${ECHO_T}$ac_header_compiler" >&6
4671
4672# Is the header present?
4673echo "$as_me:$LINENO: checking $ac_header presence" >&5
4674echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004676/* confdefs.h. */
4677_ACEOF
4678cat confdefs.h >>conftest.$ac_ext
4679cat >>conftest.$ac_ext <<_ACEOF
4680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004681#include <$ac_header>
4682_ACEOF
4683if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4684 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4685 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004686 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004687 rm -f conftest.er1
4688 cat conftest.err >&5
4689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690 (exit $ac_status); } >/dev/null; then
4691 if test -s conftest.err; then
4692 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004693 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 else
4695 ac_cpp_err=
4696 fi
4697else
4698 ac_cpp_err=yes
4699fi
4700if test -z "$ac_cpp_err"; then
4701 ac_header_preproc=yes
4702else
4703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004704sed 's/^/| /' conftest.$ac_ext >&5
4705
Martin v. Löwis11437992002-04-12 09:54:03 +00004706 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004707fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004708rm -f conftest.err conftest.$ac_ext
4709echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4710echo "${ECHO_T}$ac_header_preproc" >&6
4711
4712# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004713case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4714 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004715 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4716echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004717 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4718echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4719 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004720 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004721 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004722 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4723echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004724 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4725echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4726 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4727echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4728 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4729echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004730 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4731echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004732 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4733echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004734 (
4735 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004736## ------------------------------------------------ ##
4737## Report this to http://www.python.org/python-bugs ##
4738## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004739_ASBOX
4740 ) |
4741 sed "s/^/$as_me: WARNING: /" >&2
4742 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004743esac
4744echo "$as_me:$LINENO: checking for $ac_header" >&5
4745echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4746if eval "test \"\${$as_ac_Header+set}\" = set"; then
4747 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004748else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004749 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004750fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004751echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4752echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4753
4754fi
4755if test `eval echo '${'$as_ac_Header'}'` = yes; then
4756 cat >>confdefs.h <<_ACEOF
4757#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4758_ACEOF
4759
4760fi
4761
Guido van Rossum627b2d71993-12-24 10:39:16 +00004762done
4763
Martin v. Löwis11437992002-04-12 09:54:03 +00004764
4765
4766
4767
4768
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004769ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004770for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4771 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4772echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4773echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4774if eval "test \"\${$as_ac_Header+set}\" = set"; then
4775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004776else
Martin v. Löwis11437992002-04-12 09:54:03 +00004777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004778/* confdefs.h. */
4779_ACEOF
4780cat confdefs.h >>conftest.$ac_ext
4781cat >>conftest.$ac_ext <<_ACEOF
4782/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783#include <sys/types.h>
4784#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004785
Martin v. Löwis11437992002-04-12 09:54:03 +00004786int
4787main ()
4788{
4789if ((DIR *) 0)
4790return 0;
4791 ;
4792 return 0;
4793}
4794_ACEOF
4795rm -f conftest.$ac_objext
4796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004797 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004799 grep -v '^ *+' conftest.er1 >conftest.err
4800 rm -f conftest.er1
4801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004804 { ac_try='test -z "$ac_c_werror_flag"
4805 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4807 (eval $ac_try) 2>&5
4808 ac_status=$?
4809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810 (exit $ac_status); }; } &&
4811 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
4817 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004818else
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004820sed 's/^/| /' conftest.$ac_ext >&5
4821
Martin v. Löwis11437992002-04-12 09:54:03 +00004822eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004823fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004824rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004825fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004826echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4827echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4828if test `eval echo '${'$as_ac_Header'}'` = yes; then
4829 cat >>confdefs.h <<_ACEOF
4830#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4831_ACEOF
4832
4833ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004836done
4837# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4838if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4840echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4841if test "${ac_cv_search_opendir+set}" = set; then
4842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004843else
Martin v. Löwis11437992002-04-12 09:54:03 +00004844 ac_func_search_save_LIBS=$LIBS
4845ac_cv_search_opendir=no
4846cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004847/* confdefs.h. */
4848_ACEOF
4849cat confdefs.h >>conftest.$ac_ext
4850cat >>conftest.$ac_ext <<_ACEOF
4851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004852
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004853/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004854#ifdef __cplusplus
4855extern "C"
4856#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004857/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004858 builtin and then its argument prototype would still apply. */
4859char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004860int
4861main ()
4862{
4863opendir ();
4864 ;
4865 return 0;
4866}
4867_ACEOF
4868rm -f conftest.$ac_objext conftest$ac_exeext
4869if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004870 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004872 grep -v '^ *+' conftest.er1 >conftest.err
4873 rm -f conftest.er1
4874 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4876 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004877 { ac_try='test -z "$ac_c_werror_flag"
4878 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4880 (eval $ac_try) 2>&5
4881 ac_status=$?
4882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4883 (exit $ac_status); }; } &&
4884 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
4890 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004891else
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004893sed 's/^/| /' conftest.$ac_ext >&5
4894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004895fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004896rm -f conftest.err conftest.$ac_objext \
4897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004898if test "$ac_cv_search_opendir" = no; then
4899 for ac_lib in dir; do
4900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004902/* confdefs.h. */
4903_ACEOF
4904cat confdefs.h >>conftest.$ac_ext
4905cat >>conftest.$ac_ext <<_ACEOF
4906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004908/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004909#ifdef __cplusplus
4910extern "C"
4911#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004912/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004913 builtin and then its argument prototype would still apply. */
4914char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004915int
4916main ()
4917{
4918opendir ();
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923rm -f conftest.$ac_objext conftest$ac_exeext
4924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004925 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004927 grep -v '^ *+' conftest.er1 >conftest.err
4928 rm -f conftest.er1
4929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4931 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004932 { ac_try='test -z "$ac_c_werror_flag"
4933 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4935 (eval $ac_try) 2>&5
4936 ac_status=$?
4937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938 (exit $ac_status); }; } &&
4939 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
4945 ac_cv_search_opendir="-l$ac_lib"
4946break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004947else
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004949sed 's/^/| /' conftest.$ac_ext >&5
4950
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004951fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004952rm -f conftest.err conftest.$ac_objext \
4953 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004954 done
4955fi
4956LIBS=$ac_func_search_save_LIBS
4957fi
4958echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4959echo "${ECHO_T}$ac_cv_search_opendir" >&6
4960if test "$ac_cv_search_opendir" != no; then
4961 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004962
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004964
Michael W. Hudson54241132001-12-07 15:38:26 +00004965else
Martin v. Löwis11437992002-04-12 09:54:03 +00004966 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4967echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4968if test "${ac_cv_search_opendir+set}" = set; then
4969 echo $ECHO_N "(cached) $ECHO_C" >&6
4970else
4971 ac_func_search_save_LIBS=$LIBS
4972ac_cv_search_opendir=no
4973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004974/* confdefs.h. */
4975_ACEOF
4976cat confdefs.h >>conftest.$ac_ext
4977cat >>conftest.$ac_ext <<_ACEOF
4978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004979
4980/* Override any gcc2 internal prototype to avoid an error. */
4981#ifdef __cplusplus
4982extern "C"
4983#endif
4984/* We use char because int might match the return type of a gcc2
4985 builtin and then its argument prototype would still apply. */
4986char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004987int
4988main ()
4989{
4990opendir ();
4991 ;
4992 return 0;
4993}
4994_ACEOF
4995rm -f conftest.$ac_objext conftest$ac_exeext
4996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004997 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004999 grep -v '^ *+' conftest.er1 >conftest.err
5000 rm -f conftest.er1
5001 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5003 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005004 { ac_try='test -z "$ac_c_werror_flag"
5005 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5007 (eval $ac_try) 2>&5
5008 ac_status=$?
5009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5010 (exit $ac_status); }; } &&
5011 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
5017 ac_cv_search_opendir="none required"
5018else
5019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005020sed 's/^/| /' conftest.$ac_ext >&5
5021
Martin v. Löwis11437992002-04-12 09:54:03 +00005022fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005023rm -f conftest.err conftest.$ac_objext \
5024 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005025if test "$ac_cv_search_opendir" = no; then
5026 for ac_lib in x; do
5027 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005029/* confdefs.h. */
5030_ACEOF
5031cat confdefs.h >>conftest.$ac_ext
5032cat >>conftest.$ac_ext <<_ACEOF
5033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005034
5035/* Override any gcc2 internal prototype to avoid an error. */
5036#ifdef __cplusplus
5037extern "C"
5038#endif
5039/* We use char because int might match the return type of a gcc2
5040 builtin and then its argument prototype would still apply. */
5041char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005042int
5043main ()
5044{
5045opendir ();
5046 ;
5047 return 0;
5048}
5049_ACEOF
5050rm -f conftest.$ac_objext conftest$ac_exeext
5051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005052 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005054 grep -v '^ *+' conftest.er1 >conftest.err
5055 rm -f conftest.er1
5056 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5058 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005059 { ac_try='test -z "$ac_c_werror_flag"
5060 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5062 (eval $ac_try) 2>&5
5063 ac_status=$?
5064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); }; } &&
5066 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
5072 ac_cv_search_opendir="-l$ac_lib"
5073break
5074else
5075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005076sed 's/^/| /' conftest.$ac_ext >&5
5077
Martin v. Löwis11437992002-04-12 09:54:03 +00005078fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005079rm -f conftest.err conftest.$ac_objext \
5080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005081 done
5082fi
5083LIBS=$ac_func_search_save_LIBS
5084fi
5085echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5086echo "${ECHO_T}$ac_cv_search_opendir" >&6
5087if test "$ac_cv_search_opendir" != no; then
5088 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005090fi
5091
5092fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005093
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005094echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5095echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5096if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5097 echo $ECHO_N "(cached) $ECHO_C" >&6
5098else
5099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005100/* confdefs.h. */
5101_ACEOF
5102cat confdefs.h >>conftest.$ac_ext
5103cat >>conftest.$ac_ext <<_ACEOF
5104/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005105#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005106int
5107main ()
5108{
5109return makedev(0, 0);
5110 ;
5111 return 0;
5112}
5113_ACEOF
5114rm -f conftest.$ac_objext conftest$ac_exeext
5115if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005116 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005118 grep -v '^ *+' conftest.er1 >conftest.err
5119 rm -f conftest.er1
5120 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5122 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005123 { ac_try='test -z "$ac_c_werror_flag"
5124 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5126 (eval $ac_try) 2>&5
5127 ac_status=$?
5128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129 (exit $ac_status); }; } &&
5130 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +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); }; }; then
5136 ac_cv_header_sys_types_h_makedev=yes
5137else
5138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005139sed 's/^/| /' conftest.$ac_ext >&5
5140
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005141ac_cv_header_sys_types_h_makedev=no
5142fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005143rm -f conftest.err conftest.$ac_objext \
5144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005145
5146fi
5147echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5148echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5149
5150if test $ac_cv_header_sys_types_h_makedev = no; then
5151if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5152 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5153echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5154if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5155 echo $ECHO_N "(cached) $ECHO_C" >&6
5156fi
5157echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5158echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5159else
5160 # Is the header compilable?
5161echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5162echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5163cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005164/* confdefs.h. */
5165_ACEOF
5166cat confdefs.h >>conftest.$ac_ext
5167cat >>conftest.$ac_ext <<_ACEOF
5168/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005169$ac_includes_default
5170#include <sys/mkdev.h>
5171_ACEOF
5172rm -f conftest.$ac_objext
5173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005174 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005176 grep -v '^ *+' conftest.er1 >conftest.err
5177 rm -f conftest.er1
5178 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005181 { ac_try='test -z "$ac_c_werror_flag"
5182 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5184 (eval $ac_try) 2>&5
5185 ac_status=$?
5186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5187 (exit $ac_status); }; } &&
5188 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +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); }; }; then
5194 ac_header_compiler=yes
5195else
5196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005197sed 's/^/| /' conftest.$ac_ext >&5
5198
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005199ac_header_compiler=no
5200fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005201rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005202echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5203echo "${ECHO_T}$ac_header_compiler" >&6
5204
5205# Is the header present?
5206echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5207echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005209/* confdefs.h. */
5210_ACEOF
5211cat confdefs.h >>conftest.$ac_ext
5212cat >>conftest.$ac_ext <<_ACEOF
5213/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005214#include <sys/mkdev.h>
5215_ACEOF
5216if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5217 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5218 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005219 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005220 rm -f conftest.er1
5221 cat conftest.err >&5
5222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5223 (exit $ac_status); } >/dev/null; then
5224 if test -s conftest.err; then
5225 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005226 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005227 else
5228 ac_cpp_err=
5229 fi
5230else
5231 ac_cpp_err=yes
5232fi
5233if test -z "$ac_cpp_err"; then
5234 ac_header_preproc=yes
5235else
5236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005237sed 's/^/| /' conftest.$ac_ext >&5
5238
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005239 ac_header_preproc=no
5240fi
5241rm -f conftest.err conftest.$ac_ext
5242echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5243echo "${ECHO_T}$ac_header_preproc" >&6
5244
5245# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005246case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5247 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005248 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5249echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005250 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5251echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5252 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005253 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005254 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005255 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5256echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005257 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5258echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5259 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5260echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5261 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5262echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005263 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5264echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005265 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5266echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005267 (
5268 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005269## ------------------------------------------------ ##
5270## Report this to http://www.python.org/python-bugs ##
5271## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005272_ASBOX
5273 ) |
5274 sed "s/^/$as_me: WARNING: /" >&2
5275 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005276esac
5277echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5278echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5279if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5280 echo $ECHO_N "(cached) $ECHO_C" >&6
5281else
5282 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5283fi
5284echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5285echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5286
5287fi
5288if test $ac_cv_header_sys_mkdev_h = yes; then
5289
5290cat >>confdefs.h <<\_ACEOF
5291#define MAJOR_IN_MKDEV 1
5292_ACEOF
5293
5294fi
5295
5296
5297
5298 if test $ac_cv_header_sys_mkdev_h = no; then
5299 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5300 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5301echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5302if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5303 echo $ECHO_N "(cached) $ECHO_C" >&6
5304fi
5305echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5306echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5307else
5308 # Is the header compilable?
5309echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5310echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5311cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005312/* confdefs.h. */
5313_ACEOF
5314cat confdefs.h >>conftest.$ac_ext
5315cat >>conftest.$ac_ext <<_ACEOF
5316/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005317$ac_includes_default
5318#include <sys/sysmacros.h>
5319_ACEOF
5320rm -f conftest.$ac_objext
5321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005322 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005324 grep -v '^ *+' conftest.er1 >conftest.err
5325 rm -f conftest.er1
5326 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5328 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005329 { ac_try='test -z "$ac_c_werror_flag"
5330 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5332 (eval $ac_try) 2>&5
5333 ac_status=$?
5334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5335 (exit $ac_status); }; } &&
5336 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +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); }; }; then
5342 ac_header_compiler=yes
5343else
5344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005345sed 's/^/| /' conftest.$ac_ext >&5
5346
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005347ac_header_compiler=no
5348fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005349rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005350echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5351echo "${ECHO_T}$ac_header_compiler" >&6
5352
5353# Is the header present?
5354echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5355echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005357/* confdefs.h. */
5358_ACEOF
5359cat confdefs.h >>conftest.$ac_ext
5360cat >>conftest.$ac_ext <<_ACEOF
5361/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005362#include <sys/sysmacros.h>
5363_ACEOF
5364if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5365 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5366 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005367 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005368 rm -f conftest.er1
5369 cat conftest.err >&5
5370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5371 (exit $ac_status); } >/dev/null; then
5372 if test -s conftest.err; then
5373 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005374 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005375 else
5376 ac_cpp_err=
5377 fi
5378else
5379 ac_cpp_err=yes
5380fi
5381if test -z "$ac_cpp_err"; then
5382 ac_header_preproc=yes
5383else
5384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005385sed 's/^/| /' conftest.$ac_ext >&5
5386
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005387 ac_header_preproc=no
5388fi
5389rm -f conftest.err conftest.$ac_ext
5390echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5391echo "${ECHO_T}$ac_header_preproc" >&6
5392
5393# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005394case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5395 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005396 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5397echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005398 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5399echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5400 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005401 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005402 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005403 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5404echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005405 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5406echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5407 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5408echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5409 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5410echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005411 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5412echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005413 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5414echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005415 (
5416 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005417## ------------------------------------------------ ##
5418## Report this to http://www.python.org/python-bugs ##
5419## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005420_ASBOX
5421 ) |
5422 sed "s/^/$as_me: WARNING: /" >&2
5423 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005424esac
5425echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5426echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5427if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5428 echo $ECHO_N "(cached) $ECHO_C" >&6
5429else
5430 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5431fi
5432echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5433echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5434
5435fi
5436if test $ac_cv_header_sys_sysmacros_h = yes; then
5437
5438cat >>confdefs.h <<\_ACEOF
5439#define MAJOR_IN_SYSMACROS 1
5440_ACEOF
5441
5442fi
5443
5444
5445 fi
5446fi
5447
Michael W. Hudson54241132001-12-07 15:38:26 +00005448
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005449# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005450
5451for ac_header in term.h
5452do
5453as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5454echo "$as_me:$LINENO: checking for $ac_header" >&5
5455echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5456if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005457 echo $ECHO_N "(cached) $ECHO_C" >&6
5458else
5459 cat >conftest.$ac_ext <<_ACEOF
5460/* confdefs.h. */
5461_ACEOF
5462cat confdefs.h >>conftest.$ac_ext
5463cat >>conftest.$ac_ext <<_ACEOF
5464/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005465
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005466#ifdef HAVE_CURSES_H
5467#include <curses.h>
5468#endif
5469
5470
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005471#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005472_ACEOF
5473rm -f conftest.$ac_objext
5474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5475 (eval $ac_compile) 2>conftest.er1
5476 ac_status=$?
5477 grep -v '^ *+' conftest.er1 >conftest.err
5478 rm -f conftest.er1
5479 cat conftest.err >&5
5480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5481 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005482 { ac_try='test -z "$ac_c_werror_flag"
5483 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5485 (eval $ac_try) 2>&5
5486 ac_status=$?
5487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5488 (exit $ac_status); }; } &&
5489 { ac_try='test -s conftest.$ac_objext'
5490 { (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); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005495 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005496else
5497 echo "$as_me: failed program was:" >&5
5498sed 's/^/| /' conftest.$ac_ext >&5
5499
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005500eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005501fi
5502rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5503fi
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005504echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5505echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5506if test `eval echo '${'$as_ac_Header'}'` = yes; then
5507 cat >>confdefs.h <<_ACEOF
5508#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5509_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005510
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005511fi
5512
5513done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005514
5515
Guido van Rossum627b2d71993-12-24 10:39:16 +00005516# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005517was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005518echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5519echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005521/* confdefs.h. */
5522_ACEOF
5523cat confdefs.h >>conftest.$ac_ext
5524cat >>conftest.$ac_ext <<_ACEOF
5525/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005526#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005527
5528_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005530 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005531 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005532else
Martin v. Löwis11437992002-04-12 09:54:03 +00005533
5534
5535cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005536#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005537_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005538
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005539
Guido van Rossum627b2d71993-12-24 10:39:16 +00005540fi
5541rm -f conftest*
5542
Martin v. Löwis11437992002-04-12 09:54:03 +00005543echo "$as_me:$LINENO: result: $was_it_defined" >&5
5544echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005545
Neal Norwitz11690112002-07-30 01:08:28 +00005546# Check whether using makedev requires defining _OSF_SOURCE
5547echo "$as_me:$LINENO: checking for makedev" >&5
5548echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5549cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005550/* confdefs.h. */
5551_ACEOF
5552cat confdefs.h >>conftest.$ac_ext
5553cat >>conftest.$ac_ext <<_ACEOF
5554/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005555#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005556int
5557main ()
5558{
5559 makedev(0, 0)
5560 ;
5561 return 0;
5562}
5563_ACEOF
5564rm -f conftest.$ac_objext conftest$ac_exeext
5565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005566 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005568 grep -v '^ *+' conftest.er1 >conftest.err
5569 rm -f conftest.er1
5570 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005573 { ac_try='test -z "$ac_c_werror_flag"
5574 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5576 (eval $ac_try) 2>&5
5577 ac_status=$?
5578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579 (exit $ac_status); }; } &&
5580 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +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); }; }; then
5586 ac_cv_has_makedev=yes
5587else
5588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005589sed 's/^/| /' conftest.$ac_ext >&5
5590
Neal Norwitz11690112002-07-30 01:08:28 +00005591ac_cv_has_makedev=no
5592fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005593rm -f conftest.err conftest.$ac_objext \
5594 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005595if test "$ac_cv_has_makedev" = "no"; then
5596 # we didn't link, try if _OSF_SOURCE will allow us to link
5597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005598/* confdefs.h. */
5599_ACEOF
5600cat confdefs.h >>conftest.$ac_ext
5601cat >>conftest.$ac_ext <<_ACEOF
5602/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005603
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005604#define _OSF_SOURCE 1
5605#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005606
Neal Norwitz11690112002-07-30 01:08:28 +00005607int
5608main ()
5609{
5610 makedev(0, 0)
5611 ;
5612 return 0;
5613}
5614_ACEOF
5615rm -f conftest.$ac_objext conftest$ac_exeext
5616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005617 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005619 grep -v '^ *+' conftest.er1 >conftest.err
5620 rm -f conftest.er1
5621 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005624 { ac_try='test -z "$ac_c_werror_flag"
5625 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5627 (eval $ac_try) 2>&5
5628 ac_status=$?
5629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5630 (exit $ac_status); }; } &&
5631 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +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); }; }; then
5637 ac_cv_has_makedev=yes
5638else
5639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005640sed 's/^/| /' conftest.$ac_ext >&5
5641
Neal Norwitz11690112002-07-30 01:08:28 +00005642ac_cv_has_makedev=no
5643fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005644rm -f conftest.err conftest.$ac_objext \
5645 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005646 if test "$ac_cv_has_makedev" = "yes"; then
5647
5648cat >>confdefs.h <<\_ACEOF
5649#define _OSF_SOURCE 1
5650_ACEOF
5651
5652 fi
5653fi
5654echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5655echo "${ECHO_T}$ac_cv_has_makedev" >&6
5656if test "$ac_cv_has_makedev" = "yes"; then
5657
5658cat >>confdefs.h <<\_ACEOF
5659#define HAVE_MAKEDEV 1
5660_ACEOF
5661
5662fi
5663
Martin v. Löwis399a6892002-10-04 10:22:02 +00005664# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5665# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5666# defined, but the compiler does not support pragma redefine_extname,
5667# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5668# structures (such as rlimit64) without declaring them. As a
5669# work-around, disable LFS on such configurations
5670
5671use_lfs=yes
5672echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5673echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5674cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005675/* confdefs.h. */
5676_ACEOF
5677cat confdefs.h >>conftest.$ac_ext
5678cat >>conftest.$ac_ext <<_ACEOF
5679/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005680
5681#define _LARGEFILE_SOURCE 1
5682#define _FILE_OFFSET_BITS 64
5683#include <sys/resource.h>
5684
Martin v. Löwis399a6892002-10-04 10:22:02 +00005685int
5686main ()
5687{
5688struct rlimit foo;
5689 ;
5690 return 0;
5691}
5692_ACEOF
5693rm -f conftest.$ac_objext
5694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005695 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005697 grep -v '^ *+' conftest.er1 >conftest.err
5698 rm -f conftest.er1
5699 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5701 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005702 { ac_try='test -z "$ac_c_werror_flag"
5703 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5705 (eval $ac_try) 2>&5
5706 ac_status=$?
5707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5708 (exit $ac_status); }; } &&
5709 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +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); }; }; then
5715 sol_lfs_bug=no
5716else
5717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005718sed 's/^/| /' conftest.$ac_ext >&5
5719
Martin v. Löwis399a6892002-10-04 10:22:02 +00005720sol_lfs_bug=yes
5721fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005722rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005723echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5724echo "${ECHO_T}$sol_lfs_bug" >&6
5725if test "$sol_lfs_bug" = "yes"; then
5726 use_lfs=no
5727fi
5728
5729if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005730# Two defines needed to enable largefile support on various platforms
5731# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005732
Martin v. Löwis11437992002-04-12 09:54:03 +00005733cat >>confdefs.h <<\_ACEOF
5734#define _LARGEFILE_SOURCE 1
5735_ACEOF
5736
5737
5738cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005739#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005740_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005741
Martin v. Löwis399a6892002-10-04 10:22:02 +00005742fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005743
Guido van Rossum84e7b241996-08-19 21:59:00 +00005744# Add some code to confdefs.h so that the test for off_t works on SCO
5745cat >> confdefs.h <<\EOF
5746#if defined(SCO_DS)
5747#undef _OFF_T
5748#endif
5749EOF
5750
Guido van Rossumef2255b2000-03-10 22:30:29 +00005751# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005752echo "$as_me:$LINENO: checking for mode_t" >&5
5753echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5754if test "${ac_cv_type_mode_t+set}" = set; then
5755 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756else
Martin v. Löwis11437992002-04-12 09:54:03 +00005757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005758/* confdefs.h. */
5759_ACEOF
5760cat confdefs.h >>conftest.$ac_ext
5761cat >>conftest.$ac_ext <<_ACEOF
5762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005763$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005764int
5765main ()
5766{
5767if ((mode_t *) 0)
5768 return 0;
5769if (sizeof (mode_t))
5770 return 0;
5771 ;
5772 return 0;
5773}
5774_ACEOF
5775rm -f conftest.$ac_objext
5776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005777 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005779 grep -v '^ *+' conftest.er1 >conftest.err
5780 rm -f conftest.er1
5781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5783 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005784 { ac_try='test -z "$ac_c_werror_flag"
5785 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5787 (eval $ac_try) 2>&5
5788 ac_status=$?
5789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5790 (exit $ac_status); }; } &&
5791 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005797 ac_cv_type_mode_t=yes
5798else
Martin v. Löwis11437992002-04-12 09:54:03 +00005799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005800sed 's/^/| /' conftest.$ac_ext >&5
5801
Martin v. Löwis11437992002-04-12 09:54:03 +00005802ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005803fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005806echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5807echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5808if test $ac_cv_type_mode_t = yes; then
5809 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005810else
Martin v. Löwis11437992002-04-12 09:54:03 +00005811
5812cat >>confdefs.h <<_ACEOF
5813#define mode_t int
5814_ACEOF
5815
5816fi
5817
5818echo "$as_me:$LINENO: checking for off_t" >&5
5819echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5820if test "${ac_cv_type_off_t+set}" = set; then
5821 echo $ECHO_N "(cached) $ECHO_C" >&6
5822else
5823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005824/* confdefs.h. */
5825_ACEOF
5826cat confdefs.h >>conftest.$ac_ext
5827cat >>conftest.$ac_ext <<_ACEOF
5828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005829$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005830int
5831main ()
5832{
5833if ((off_t *) 0)
5834 return 0;
5835if (sizeof (off_t))
5836 return 0;
5837 ;
5838 return 0;
5839}
5840_ACEOF
5841rm -f conftest.$ac_objext
5842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005843 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005845 grep -v '^ *+' conftest.er1 >conftest.err
5846 rm -f conftest.er1
5847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5849 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005850 { ac_try='test -z "$ac_c_werror_flag"
5851 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5853 (eval $ac_try) 2>&5
5854 ac_status=$?
5855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5856 (exit $ac_status); }; } &&
5857 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005863 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005864else
Martin v. Löwis11437992002-04-12 09:54:03 +00005865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005866sed 's/^/| /' conftest.$ac_ext >&5
5867
Martin v. Löwis11437992002-04-12 09:54:03 +00005868ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005869fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005870rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005872echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5873echo "${ECHO_T}$ac_cv_type_off_t" >&6
5874if test $ac_cv_type_off_t = yes; then
5875 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876else
Martin v. Löwis11437992002-04-12 09:54:03 +00005877
5878cat >>confdefs.h <<_ACEOF
5879#define off_t long
5880_ACEOF
5881
5882fi
5883
5884echo "$as_me:$LINENO: checking for pid_t" >&5
5885echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5886if test "${ac_cv_type_pid_t+set}" = set; then
5887 echo $ECHO_N "(cached) $ECHO_C" >&6
5888else
5889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005890/* confdefs.h. */
5891_ACEOF
5892cat confdefs.h >>conftest.$ac_ext
5893cat >>conftest.$ac_ext <<_ACEOF
5894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005895$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005896int
5897main ()
5898{
5899if ((pid_t *) 0)
5900 return 0;
5901if (sizeof (pid_t))
5902 return 0;
5903 ;
5904 return 0;
5905}
5906_ACEOF
5907rm -f conftest.$ac_objext
5908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005909 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005911 grep -v '^ *+' conftest.er1 >conftest.err
5912 rm -f conftest.er1
5913 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5915 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005916 { ac_try='test -z "$ac_c_werror_flag"
5917 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5919 (eval $ac_try) 2>&5
5920 ac_status=$?
5921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5922 (exit $ac_status); }; } &&
5923 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005929 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005930else
Martin v. Löwis11437992002-04-12 09:54:03 +00005931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005932sed 's/^/| /' conftest.$ac_ext >&5
5933
Martin v. Löwis11437992002-04-12 09:54:03 +00005934ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005935fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005936rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005937fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005938echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5939echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5940if test $ac_cv_type_pid_t = yes; then
5941 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005942else
Martin v. Löwis11437992002-04-12 09:54:03 +00005943
5944cat >>confdefs.h <<_ACEOF
5945#define pid_t int
5946_ACEOF
5947
5948fi
5949
5950echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5951echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5952if test "${ac_cv_type_signal+set}" = set; then
5953 echo $ECHO_N "(cached) $ECHO_C" >&6
5954else
5955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005956/* confdefs.h. */
5957_ACEOF
5958cat confdefs.h >>conftest.$ac_ext
5959cat >>conftest.$ac_ext <<_ACEOF
5960/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005961#include <sys/types.h>
5962#include <signal.h>
5963#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005964# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005965#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005966#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005967extern "C" void (*signal (int, void (*)(int)))(int);
5968#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005969void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005970#endif
5971
Martin v. Löwis11437992002-04-12 09:54:03 +00005972int
5973main ()
5974{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005975int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005976 ;
5977 return 0;
5978}
5979_ACEOF
5980rm -f conftest.$ac_objext
5981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005982 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005984 grep -v '^ *+' conftest.er1 >conftest.err
5985 rm -f conftest.er1
5986 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5988 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005989 { ac_try='test -z "$ac_c_werror_flag"
5990 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5992 (eval $ac_try) 2>&5
5993 ac_status=$?
5994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5995 (exit $ac_status); }; } &&
5996 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006002 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006003else
Martin v. Löwis11437992002-04-12 09:54:03 +00006004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006005sed 's/^/| /' conftest.$ac_ext >&5
6006
Martin v. Löwis11437992002-04-12 09:54:03 +00006007ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006008fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006009rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006010fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006011echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6012echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006013
Martin v. Löwis11437992002-04-12 09:54:03 +00006014cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006015#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006016_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006017
Michael W. Hudson54241132001-12-07 15:38:26 +00006018
Martin v. Löwis11437992002-04-12 09:54:03 +00006019echo "$as_me:$LINENO: checking for size_t" >&5
6020echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6021if test "${ac_cv_type_size_t+set}" = set; then
6022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006023else
Martin v. Löwis11437992002-04-12 09:54:03 +00006024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006025/* confdefs.h. */
6026_ACEOF
6027cat confdefs.h >>conftest.$ac_ext
6028cat >>conftest.$ac_ext <<_ACEOF
6029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006030$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006031int
6032main ()
6033{
6034if ((size_t *) 0)
6035 return 0;
6036if (sizeof (size_t))
6037 return 0;
6038 ;
6039 return 0;
6040}
6041_ACEOF
6042rm -f conftest.$ac_objext
6043if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006044 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006046 grep -v '^ *+' conftest.er1 >conftest.err
6047 rm -f conftest.er1
6048 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6050 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006051 { ac_try='test -z "$ac_c_werror_flag"
6052 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6054 (eval $ac_try) 2>&5
6055 ac_status=$?
6056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6057 (exit $ac_status); }; } &&
6058 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006064 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006065else
Martin v. Löwis11437992002-04-12 09:54:03 +00006066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006067sed 's/^/| /' conftest.$ac_ext >&5
6068
Martin v. Löwis11437992002-04-12 09:54:03 +00006069ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006070fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006071rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006072fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006073echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6074echo "${ECHO_T}$ac_cv_type_size_t" >&6
6075if test $ac_cv_type_size_t = yes; then
6076 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006077else
Martin v. Löwis11437992002-04-12 09:54:03 +00006078
6079cat >>confdefs.h <<_ACEOF
6080#define size_t unsigned
6081_ACEOF
6082
6083fi
6084
6085echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6086echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6087if test "${ac_cv_type_uid_t+set}" = set; then
6088 echo $ECHO_N "(cached) $ECHO_C" >&6
6089else
6090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006091/* confdefs.h. */
6092_ACEOF
6093cat confdefs.h >>conftest.$ac_ext
6094cat >>conftest.$ac_ext <<_ACEOF
6095/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006096#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006097
6098_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006100 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006101 ac_cv_type_uid_t=yes
6102else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006103 ac_cv_type_uid_t=no
6104fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006105rm -f conftest*
6106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006108echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6109echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006110if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006111
Martin v. Löwis11437992002-04-12 09:54:03 +00006112cat >>confdefs.h <<\_ACEOF
6113#define uid_t int
6114_ACEOF
6115
6116
6117cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006118#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006119_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006120
6121fi
6122
Jack Jansendd19cf82001-12-06 22:36:17 +00006123
Michael W. Hudson54241132001-12-07 15:38:26 +00006124# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006125# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006126echo "$as_me:$LINENO: checking for int" >&5
6127echo $ECHO_N "checking for int... $ECHO_C" >&6
6128if test "${ac_cv_type_int+set}" = set; then
6129 echo $ECHO_N "(cached) $ECHO_C" >&6
6130else
6131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006132/* confdefs.h. */
6133_ACEOF
6134cat confdefs.h >>conftest.$ac_ext
6135cat >>conftest.$ac_ext <<_ACEOF
6136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006137$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006138int
6139main ()
6140{
6141if ((int *) 0)
6142 return 0;
6143if (sizeof (int))
6144 return 0;
6145 ;
6146 return 0;
6147}
6148_ACEOF
6149rm -f conftest.$ac_objext
6150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006151 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006153 grep -v '^ *+' conftest.er1 >conftest.err
6154 rm -f conftest.er1
6155 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6157 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006158 { ac_try='test -z "$ac_c_werror_flag"
6159 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6161 (eval $ac_try) 2>&5
6162 ac_status=$?
6163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164 (exit $ac_status); }; } &&
6165 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6171 ac_cv_type_int=yes
6172else
6173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006174sed 's/^/| /' conftest.$ac_ext >&5
6175
Martin v. Löwis11437992002-04-12 09:54:03 +00006176ac_cv_type_int=no
6177fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006179fi
6180echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6181echo "${ECHO_T}$ac_cv_type_int" >&6
6182
6183echo "$as_me:$LINENO: checking size of int" >&5
6184echo $ECHO_N "checking size of int... $ECHO_C" >&6
6185if test "${ac_cv_sizeof_int+set}" = set; then
6186 echo $ECHO_N "(cached) $ECHO_C" >&6
6187else
6188 if test "$ac_cv_type_int" = yes; then
6189 # The cast to unsigned long works around a bug in the HP C Compiler
6190 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6191 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6192 # This bug is HP SR number 8606223364.
6193 if test "$cross_compiling" = yes; then
6194 # Depending upon the size, compute the lo and hi bounds.
6195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006196/* confdefs.h. */
6197_ACEOF
6198cat confdefs.h >>conftest.$ac_ext
6199cat >>conftest.$ac_ext <<_ACEOF
6200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006201$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006202int
6203main ()
6204{
6205static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6206test_array [0] = 0
6207
6208 ;
6209 return 0;
6210}
6211_ACEOF
6212rm -f conftest.$ac_objext
6213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006214 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006216 grep -v '^ *+' conftest.er1 >conftest.err
6217 rm -f conftest.er1
6218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6220 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006221 { ac_try='test -z "$ac_c_werror_flag"
6222 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6224 (eval $ac_try) 2>&5
6225 ac_status=$?
6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227 (exit $ac_status); }; } &&
6228 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6234 ac_lo=0 ac_mid=0
6235 while :; do
6236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006237/* confdefs.h. */
6238_ACEOF
6239cat confdefs.h >>conftest.$ac_ext
6240cat >>conftest.$ac_ext <<_ACEOF
6241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006242$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006243int
6244main ()
6245{
6246static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6247test_array [0] = 0
6248
6249 ;
6250 return 0;
6251}
6252_ACEOF
6253rm -f conftest.$ac_objext
6254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006255 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006257 grep -v '^ *+' conftest.er1 >conftest.err
6258 rm -f conftest.er1
6259 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006262 { ac_try='test -z "$ac_c_werror_flag"
6263 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6265 (eval $ac_try) 2>&5
6266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); }; } &&
6269 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6275 ac_hi=$ac_mid; break
6276else
6277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006278sed 's/^/| /' conftest.$ac_ext >&5
6279
Martin v. Löwis11437992002-04-12 09:54:03 +00006280ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006281 if test $ac_lo -le $ac_mid; then
6282 ac_lo= ac_hi=
6283 break
6284 fi
6285 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006286fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006288 done
6289else
6290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006291sed 's/^/| /' conftest.$ac_ext >&5
6292
Martin v. Löwis11437992002-04-12 09:54:03 +00006293cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006299$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006300int
6301main ()
6302{
6303static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6304test_array [0] = 0
6305
6306 ;
6307 return 0;
6308}
6309_ACEOF
6310rm -f conftest.$ac_objext
6311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006312 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006314 grep -v '^ *+' conftest.er1 >conftest.err
6315 rm -f conftest.er1
6316 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6318 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006319 { ac_try='test -z "$ac_c_werror_flag"
6320 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6322 (eval $ac_try) 2>&5
6323 ac_status=$?
6324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6325 (exit $ac_status); }; } &&
6326 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6332 ac_hi=-1 ac_mid=-1
6333 while :; do
6334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006335/* confdefs.h. */
6336_ACEOF
6337cat confdefs.h >>conftest.$ac_ext
6338cat >>conftest.$ac_ext <<_ACEOF
6339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006340$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006341int
6342main ()
6343{
6344static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6345test_array [0] = 0
6346
6347 ;
6348 return 0;
6349}
6350_ACEOF
6351rm -f conftest.$ac_objext
6352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006353 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006355 grep -v '^ *+' conftest.er1 >conftest.err
6356 rm -f conftest.er1
6357 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6359 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006360 { ac_try='test -z "$ac_c_werror_flag"
6361 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6363 (eval $ac_try) 2>&5
6364 ac_status=$?
6365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6366 (exit $ac_status); }; } &&
6367 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6373 ac_lo=$ac_mid; break
6374else
6375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006376sed 's/^/| /' conftest.$ac_ext >&5
6377
Martin v. Löwis11437992002-04-12 09:54:03 +00006378ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006379 if test $ac_mid -le $ac_hi; then
6380 ac_lo= ac_hi=
6381 break
6382 fi
6383 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006384fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006385rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006386 done
6387else
6388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006389sed 's/^/| /' conftest.$ac_ext >&5
6390
Martin v. Löwis11437992002-04-12 09:54:03 +00006391ac_lo= ac_hi=
6392fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006393rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006394fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006395rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006396# Binary search between lo and hi bounds.
6397while test "x$ac_lo" != "x$ac_hi"; do
6398 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006400/* confdefs.h. */
6401_ACEOF
6402cat confdefs.h >>conftest.$ac_ext
6403cat >>conftest.$ac_ext <<_ACEOF
6404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006405$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006406int
6407main ()
6408{
6409static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6410test_array [0] = 0
6411
6412 ;
6413 return 0;
6414}
6415_ACEOF
6416rm -f conftest.$ac_objext
6417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006418 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006420 grep -v '^ *+' conftest.er1 >conftest.err
6421 rm -f conftest.er1
6422 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006425 { ac_try='test -z "$ac_c_werror_flag"
6426 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6428 (eval $ac_try) 2>&5
6429 ac_status=$?
6430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431 (exit $ac_status); }; } &&
6432 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6438 ac_hi=$ac_mid
6439else
6440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006441sed 's/^/| /' conftest.$ac_ext >&5
6442
Martin v. Löwis11437992002-04-12 09:54:03 +00006443ac_lo=`expr '(' $ac_mid ')' + 1`
6444fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006445rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006446done
6447case $ac_lo in
6448?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006449'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6450See \`config.log' for more details." >&5
6451echo "$as_me: error: cannot compute sizeof (int), 77
6452See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006453 { (exit 1); exit 1; }; } ;;
6454esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006455else
6456 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006457 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6458See \`config.log' for more details." >&5
6459echo "$as_me: error: cannot run test program while cross compiling
6460See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006461 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006462else
Martin v. Löwis11437992002-04-12 09:54:03 +00006463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006464/* confdefs.h. */
6465_ACEOF
6466cat confdefs.h >>conftest.$ac_ext
6467cat >>conftest.$ac_ext <<_ACEOF
6468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006469$ac_includes_default
6470long longval () { return (long) (sizeof (int)); }
6471unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006472#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006473#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006474int
6475main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006476{
Martin v. Löwis11437992002-04-12 09:54:03 +00006477
6478 FILE *f = fopen ("conftest.val", "w");
6479 if (! f)
6480 exit (1);
6481 if (((long) (sizeof (int))) < 0)
6482 {
6483 long i = longval ();
6484 if (i != ((long) (sizeof (int))))
6485 exit (1);
6486 fprintf (f, "%ld\n", i);
6487 }
6488 else
6489 {
6490 unsigned long i = ulongval ();
6491 if (i != ((long) (sizeof (int))))
6492 exit (1);
6493 fprintf (f, "%lu\n", i);
6494 }
6495 exit (ferror (f) || fclose (f) != 0);
6496
6497 ;
6498 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006499}
Martin v. Löwis11437992002-04-12 09:54:03 +00006500_ACEOF
6501rm -f conftest$ac_exeext
6502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6503 (eval $ac_link) 2>&5
6504 ac_status=$?
6505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6508 (eval $ac_try) 2>&5
6509 ac_status=$?
6510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6511 (exit $ac_status); }; }; then
6512 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006513else
Martin v. Löwis11437992002-04-12 09:54:03 +00006514 echo "$as_me: program exited with status $ac_status" >&5
6515echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006516sed 's/^/| /' conftest.$ac_ext >&5
6517
Martin v. Löwis11437992002-04-12 09:54:03 +00006518( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006519{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6520See \`config.log' for more details." >&5
6521echo "$as_me: error: cannot compute sizeof (int), 77
6522See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006523 { (exit 1); exit 1; }; }
6524fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006525rm -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 +00006526fi
6527fi
6528rm -f conftest.val
6529else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006530 ac_cv_sizeof_int=0
6531fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006532fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006533echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6534echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6535cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006536#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006537_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006538
6539
Martin v. Löwis11437992002-04-12 09:54:03 +00006540echo "$as_me:$LINENO: checking for long" >&5
6541echo $ECHO_N "checking for long... $ECHO_C" >&6
6542if test "${ac_cv_type_long+set}" = set; then
6543 echo $ECHO_N "(cached) $ECHO_C" >&6
6544else
6545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006546/* confdefs.h. */
6547_ACEOF
6548cat confdefs.h >>conftest.$ac_ext
6549cat >>conftest.$ac_ext <<_ACEOF
6550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006551$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006552int
6553main ()
6554{
6555if ((long *) 0)
6556 return 0;
6557if (sizeof (long))
6558 return 0;
6559 ;
6560 return 0;
6561}
6562_ACEOF
6563rm -f conftest.$ac_objext
6564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006565 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006567 grep -v '^ *+' conftest.er1 >conftest.err
6568 rm -f conftest.er1
6569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6571 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006572 { ac_try='test -z "$ac_c_werror_flag"
6573 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6575 (eval $ac_try) 2>&5
6576 ac_status=$?
6577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6578 (exit $ac_status); }; } &&
6579 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6585 ac_cv_type_long=yes
6586else
6587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006588sed 's/^/| /' conftest.$ac_ext >&5
6589
Martin v. Löwis11437992002-04-12 09:54:03 +00006590ac_cv_type_long=no
6591fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006592rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006593fi
6594echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6595echo "${ECHO_T}$ac_cv_type_long" >&6
6596
6597echo "$as_me:$LINENO: checking size of long" >&5
6598echo $ECHO_N "checking size of long... $ECHO_C" >&6
6599if test "${ac_cv_sizeof_long+set}" = set; then
6600 echo $ECHO_N "(cached) $ECHO_C" >&6
6601else
6602 if test "$ac_cv_type_long" = yes; then
6603 # The cast to unsigned long works around a bug in the HP C Compiler
6604 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6605 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6606 # This bug is HP SR number 8606223364.
6607 if test "$cross_compiling" = yes; then
6608 # Depending upon the size, compute the lo and hi bounds.
6609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006610/* confdefs.h. */
6611_ACEOF
6612cat confdefs.h >>conftest.$ac_ext
6613cat >>conftest.$ac_ext <<_ACEOF
6614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006615$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006616int
6617main ()
6618{
6619static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6620test_array [0] = 0
6621
6622 ;
6623 return 0;
6624}
6625_ACEOF
6626rm -f conftest.$ac_objext
6627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006628 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006630 grep -v '^ *+' conftest.er1 >conftest.err
6631 rm -f conftest.er1
6632 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006635 { ac_try='test -z "$ac_c_werror_flag"
6636 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6638 (eval $ac_try) 2>&5
6639 ac_status=$?
6640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6641 (exit $ac_status); }; } &&
6642 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6648 ac_lo=0 ac_mid=0
6649 while :; do
6650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006651/* confdefs.h. */
6652_ACEOF
6653cat confdefs.h >>conftest.$ac_ext
6654cat >>conftest.$ac_ext <<_ACEOF
6655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006656$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006657int
6658main ()
6659{
6660static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6661test_array [0] = 0
6662
6663 ;
6664 return 0;
6665}
6666_ACEOF
6667rm -f conftest.$ac_objext
6668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006669 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006671 grep -v '^ *+' conftest.er1 >conftest.err
6672 rm -f conftest.er1
6673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006676 { ac_try='test -z "$ac_c_werror_flag"
6677 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6679 (eval $ac_try) 2>&5
6680 ac_status=$?
6681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6682 (exit $ac_status); }; } &&
6683 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6689 ac_hi=$ac_mid; break
6690else
6691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006692sed 's/^/| /' conftest.$ac_ext >&5
6693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006695 if test $ac_lo -le $ac_mid; then
6696 ac_lo= ac_hi=
6697 break
6698 fi
6699 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006700fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006701rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006702 done
6703else
6704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006705sed 's/^/| /' conftest.$ac_ext >&5
6706
Martin v. Löwis11437992002-04-12 09:54:03 +00006707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006708/* confdefs.h. */
6709_ACEOF
6710cat confdefs.h >>conftest.$ac_ext
6711cat >>conftest.$ac_ext <<_ACEOF
6712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006713$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006714int
6715main ()
6716{
6717static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6718test_array [0] = 0
6719
6720 ;
6721 return 0;
6722}
6723_ACEOF
6724rm -f conftest.$ac_objext
6725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006726 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006728 grep -v '^ *+' conftest.er1 >conftest.err
6729 rm -f conftest.er1
6730 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6732 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006733 { ac_try='test -z "$ac_c_werror_flag"
6734 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6736 (eval $ac_try) 2>&5
6737 ac_status=$?
6738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6739 (exit $ac_status); }; } &&
6740 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6746 ac_hi=-1 ac_mid=-1
6747 while :; do
6748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006749/* confdefs.h. */
6750_ACEOF
6751cat confdefs.h >>conftest.$ac_ext
6752cat >>conftest.$ac_ext <<_ACEOF
6753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006754$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006755int
6756main ()
6757{
6758static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6759test_array [0] = 0
6760
6761 ;
6762 return 0;
6763}
6764_ACEOF
6765rm -f conftest.$ac_objext
6766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006767 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006769 grep -v '^ *+' conftest.er1 >conftest.err
6770 rm -f conftest.er1
6771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6773 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006774 { ac_try='test -z "$ac_c_werror_flag"
6775 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6777 (eval $ac_try) 2>&5
6778 ac_status=$?
6779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6780 (exit $ac_status); }; } &&
6781 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6787 ac_lo=$ac_mid; break
6788else
6789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006790sed 's/^/| /' conftest.$ac_ext >&5
6791
Martin v. Löwis11437992002-04-12 09:54:03 +00006792ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006793 if test $ac_mid -le $ac_hi; then
6794 ac_lo= ac_hi=
6795 break
6796 fi
6797 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006798fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006800 done
6801else
6802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006803sed 's/^/| /' conftest.$ac_ext >&5
6804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805ac_lo= ac_hi=
6806fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006807rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006808fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006809rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006810# Binary search between lo and hi bounds.
6811while test "x$ac_lo" != "x$ac_hi"; do
6812 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006814/* confdefs.h. */
6815_ACEOF
6816cat confdefs.h >>conftest.$ac_ext
6817cat >>conftest.$ac_ext <<_ACEOF
6818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006819$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006820int
6821main ()
6822{
6823static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6824test_array [0] = 0
6825
6826 ;
6827 return 0;
6828}
6829_ACEOF
6830rm -f conftest.$ac_objext
6831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006832 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006834 grep -v '^ *+' conftest.er1 >conftest.err
6835 rm -f conftest.er1
6836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6838 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006839 { ac_try='test -z "$ac_c_werror_flag"
6840 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6842 (eval $ac_try) 2>&5
6843 ac_status=$?
6844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845 (exit $ac_status); }; } &&
6846 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6852 ac_hi=$ac_mid
6853else
6854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006855sed 's/^/| /' conftest.$ac_ext >&5
6856
Martin v. Löwis11437992002-04-12 09:54:03 +00006857ac_lo=`expr '(' $ac_mid ')' + 1`
6858fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006859rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006860done
6861case $ac_lo in
6862?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006863'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6864See \`config.log' for more details." >&5
6865echo "$as_me: error: cannot compute sizeof (long), 77
6866See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006867 { (exit 1); exit 1; }; } ;;
6868esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006869else
6870 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006871 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6872See \`config.log' for more details." >&5
6873echo "$as_me: error: cannot run test program while cross compiling
6874See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006875 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006876else
Martin v. Löwis11437992002-04-12 09:54:03 +00006877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006878/* confdefs.h. */
6879_ACEOF
6880cat confdefs.h >>conftest.$ac_ext
6881cat >>conftest.$ac_ext <<_ACEOF
6882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006883$ac_includes_default
6884long longval () { return (long) (sizeof (long)); }
6885unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006886#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006887#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006888int
6889main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006890{
Martin v. Löwis11437992002-04-12 09:54:03 +00006891
6892 FILE *f = fopen ("conftest.val", "w");
6893 if (! f)
6894 exit (1);
6895 if (((long) (sizeof (long))) < 0)
6896 {
6897 long i = longval ();
6898 if (i != ((long) (sizeof (long))))
6899 exit (1);
6900 fprintf (f, "%ld\n", i);
6901 }
6902 else
6903 {
6904 unsigned long i = ulongval ();
6905 if (i != ((long) (sizeof (long))))
6906 exit (1);
6907 fprintf (f, "%lu\n", i);
6908 }
6909 exit (ferror (f) || fclose (f) != 0);
6910
6911 ;
6912 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006913}
Martin v. Löwis11437992002-04-12 09:54:03 +00006914_ACEOF
6915rm -f conftest$ac_exeext
6916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6917 (eval $ac_link) 2>&5
6918 ac_status=$?
6919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6922 (eval $ac_try) 2>&5
6923 ac_status=$?
6924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925 (exit $ac_status); }; }; then
6926 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006927else
Martin v. Löwis11437992002-04-12 09:54:03 +00006928 echo "$as_me: program exited with status $ac_status" >&5
6929echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006930sed 's/^/| /' conftest.$ac_ext >&5
6931
Martin v. Löwis11437992002-04-12 09:54:03 +00006932( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006933{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6934See \`config.log' for more details." >&5
6935echo "$as_me: error: cannot compute sizeof (long), 77
6936See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006937 { (exit 1); exit 1; }; }
6938fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006939rm -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 +00006940fi
6941fi
6942rm -f conftest.val
6943else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006944 ac_cv_sizeof_long=0
6945fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006946fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006947echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6948echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6949cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006950#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006951_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006952
6953
Martin v. Löwis11437992002-04-12 09:54:03 +00006954echo "$as_me:$LINENO: checking for void *" >&5
6955echo $ECHO_N "checking for void *... $ECHO_C" >&6
6956if test "${ac_cv_type_void_p+set}" = set; then
6957 echo $ECHO_N "(cached) $ECHO_C" >&6
6958else
6959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006960/* confdefs.h. */
6961_ACEOF
6962cat confdefs.h >>conftest.$ac_ext
6963cat >>conftest.$ac_ext <<_ACEOF
6964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006965$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006966int
6967main ()
6968{
6969if ((void * *) 0)
6970 return 0;
6971if (sizeof (void *))
6972 return 0;
6973 ;
6974 return 0;
6975}
6976_ACEOF
6977rm -f conftest.$ac_objext
6978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006979 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006981 grep -v '^ *+' conftest.er1 >conftest.err
6982 rm -f conftest.er1
6983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6985 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006986 { ac_try='test -z "$ac_c_werror_flag"
6987 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6989 (eval $ac_try) 2>&5
6990 ac_status=$?
6991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6992 (exit $ac_status); }; } &&
6993 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6999 ac_cv_type_void_p=yes
7000else
7001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007002sed 's/^/| /' conftest.$ac_ext >&5
7003
Martin v. Löwis11437992002-04-12 09:54:03 +00007004ac_cv_type_void_p=no
7005fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007006rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007007fi
7008echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7009echo "${ECHO_T}$ac_cv_type_void_p" >&6
7010
7011echo "$as_me:$LINENO: checking size of void *" >&5
7012echo $ECHO_N "checking size of void *... $ECHO_C" >&6
7013if test "${ac_cv_sizeof_void_p+set}" = set; then
7014 echo $ECHO_N "(cached) $ECHO_C" >&6
7015else
7016 if test "$ac_cv_type_void_p" = yes; then
7017 # The cast to unsigned long works around a bug in the HP C Compiler
7018 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7019 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7020 # This bug is HP SR number 8606223364.
7021 if test "$cross_compiling" = yes; then
7022 # Depending upon the size, compute the lo and hi bounds.
7023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007024/* confdefs.h. */
7025_ACEOF
7026cat confdefs.h >>conftest.$ac_ext
7027cat >>conftest.$ac_ext <<_ACEOF
7028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007029$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007030int
7031main ()
7032{
7033static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
7034test_array [0] = 0
7035
7036 ;
7037 return 0;
7038}
7039_ACEOF
7040rm -f conftest.$ac_objext
7041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007042 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007044 grep -v '^ *+' conftest.er1 >conftest.err
7045 rm -f conftest.er1
7046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7048 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007049 { ac_try='test -z "$ac_c_werror_flag"
7050 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7052 (eval $ac_try) 2>&5
7053 ac_status=$?
7054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7055 (exit $ac_status); }; } &&
7056 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7062 ac_lo=0 ac_mid=0
7063 while :; do
7064 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007065/* confdefs.h. */
7066_ACEOF
7067cat confdefs.h >>conftest.$ac_ext
7068cat >>conftest.$ac_ext <<_ACEOF
7069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007070$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007071int
7072main ()
7073{
7074static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7075test_array [0] = 0
7076
7077 ;
7078 return 0;
7079}
7080_ACEOF
7081rm -f conftest.$ac_objext
7082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007083 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007085 grep -v '^ *+' conftest.er1 >conftest.err
7086 rm -f conftest.er1
7087 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7089 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007090 { ac_try='test -z "$ac_c_werror_flag"
7091 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7093 (eval $ac_try) 2>&5
7094 ac_status=$?
7095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7096 (exit $ac_status); }; } &&
7097 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7103 ac_hi=$ac_mid; break
7104else
7105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007106sed 's/^/| /' conftest.$ac_ext >&5
7107
Martin v. Löwis11437992002-04-12 09:54:03 +00007108ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007109 if test $ac_lo -le $ac_mid; then
7110 ac_lo= ac_hi=
7111 break
7112 fi
7113 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007114fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007115rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007116 done
7117else
7118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007119sed 's/^/| /' conftest.$ac_ext >&5
7120
Martin v. Löwis11437992002-04-12 09:54:03 +00007121cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007122/* confdefs.h. */
7123_ACEOF
7124cat confdefs.h >>conftest.$ac_ext
7125cat >>conftest.$ac_ext <<_ACEOF
7126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007127$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007128int
7129main ()
7130{
7131static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7132test_array [0] = 0
7133
7134 ;
7135 return 0;
7136}
7137_ACEOF
7138rm -f conftest.$ac_objext
7139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007140 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007142 grep -v '^ *+' conftest.er1 >conftest.err
7143 rm -f conftest.er1
7144 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7146 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007147 { ac_try='test -z "$ac_c_werror_flag"
7148 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7150 (eval $ac_try) 2>&5
7151 ac_status=$?
7152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7153 (exit $ac_status); }; } &&
7154 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7160 ac_hi=-1 ac_mid=-1
7161 while :; do
7162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007163/* confdefs.h. */
7164_ACEOF
7165cat confdefs.h >>conftest.$ac_ext
7166cat >>conftest.$ac_ext <<_ACEOF
7167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007168$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007169int
7170main ()
7171{
7172static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7173test_array [0] = 0
7174
7175 ;
7176 return 0;
7177}
7178_ACEOF
7179rm -f conftest.$ac_objext
7180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007181 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007183 grep -v '^ *+' conftest.er1 >conftest.err
7184 rm -f conftest.er1
7185 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7187 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007188 { ac_try='test -z "$ac_c_werror_flag"
7189 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7191 (eval $ac_try) 2>&5
7192 ac_status=$?
7193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7194 (exit $ac_status); }; } &&
7195 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7201 ac_lo=$ac_mid; break
7202else
7203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007204sed 's/^/| /' conftest.$ac_ext >&5
7205
Martin v. Löwis11437992002-04-12 09:54:03 +00007206ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007207 if test $ac_mid -le $ac_hi; then
7208 ac_lo= ac_hi=
7209 break
7210 fi
7211 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007212fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007213rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007214 done
7215else
7216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007217sed 's/^/| /' conftest.$ac_ext >&5
7218
Martin v. Löwis11437992002-04-12 09:54:03 +00007219ac_lo= ac_hi=
7220fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007221rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007222fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007223rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007224# Binary search between lo and hi bounds.
7225while test "x$ac_lo" != "x$ac_hi"; do
7226 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007228/* confdefs.h. */
7229_ACEOF
7230cat confdefs.h >>conftest.$ac_ext
7231cat >>conftest.$ac_ext <<_ACEOF
7232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007233$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007234int
7235main ()
7236{
7237static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7238test_array [0] = 0
7239
7240 ;
7241 return 0;
7242}
7243_ACEOF
7244rm -f conftest.$ac_objext
7245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007246 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007248 grep -v '^ *+' conftest.er1 >conftest.err
7249 rm -f conftest.er1
7250 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7252 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007253 { ac_try='test -z "$ac_c_werror_flag"
7254 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7256 (eval $ac_try) 2>&5
7257 ac_status=$?
7258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7259 (exit $ac_status); }; } &&
7260 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7266 ac_hi=$ac_mid
7267else
7268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007269sed 's/^/| /' conftest.$ac_ext >&5
7270
Martin v. Löwis11437992002-04-12 09:54:03 +00007271ac_lo=`expr '(' $ac_mid ')' + 1`
7272fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007273rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007274done
7275case $ac_lo in
7276?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007277'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7278See \`config.log' for more details." >&5
7279echo "$as_me: error: cannot compute sizeof (void *), 77
7280See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007281 { (exit 1); exit 1; }; } ;;
7282esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007283else
7284 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007285 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7286See \`config.log' for more details." >&5
7287echo "$as_me: error: cannot run test program while cross compiling
7288See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007289 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007290else
Martin v. Löwis11437992002-04-12 09:54:03 +00007291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007292/* confdefs.h. */
7293_ACEOF
7294cat confdefs.h >>conftest.$ac_ext
7295cat >>conftest.$ac_ext <<_ACEOF
7296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007297$ac_includes_default
7298long longval () { return (long) (sizeof (void *)); }
7299unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007300#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007301#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007302int
7303main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007304{
Martin v. Löwis11437992002-04-12 09:54:03 +00007305
7306 FILE *f = fopen ("conftest.val", "w");
7307 if (! f)
7308 exit (1);
7309 if (((long) (sizeof (void *))) < 0)
7310 {
7311 long i = longval ();
7312 if (i != ((long) (sizeof (void *))))
7313 exit (1);
7314 fprintf (f, "%ld\n", i);
7315 }
7316 else
7317 {
7318 unsigned long i = ulongval ();
7319 if (i != ((long) (sizeof (void *))))
7320 exit (1);
7321 fprintf (f, "%lu\n", i);
7322 }
7323 exit (ferror (f) || fclose (f) != 0);
7324
7325 ;
7326 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007327}
Martin v. Löwis11437992002-04-12 09:54:03 +00007328_ACEOF
7329rm -f conftest$ac_exeext
7330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7331 (eval $ac_link) 2>&5
7332 ac_status=$?
7333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7336 (eval $ac_try) 2>&5
7337 ac_status=$?
7338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7339 (exit $ac_status); }; }; then
7340 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007341else
Martin v. Löwis11437992002-04-12 09:54:03 +00007342 echo "$as_me: program exited with status $ac_status" >&5
7343echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007344sed 's/^/| /' conftest.$ac_ext >&5
7345
Martin v. Löwis11437992002-04-12 09:54:03 +00007346( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007347{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7348See \`config.log' for more details." >&5
7349echo "$as_me: error: cannot compute sizeof (void *), 77
7350See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007351 { (exit 1); exit 1; }; }
7352fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007353rm -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 +00007354fi
7355fi
7356rm -f conftest.val
7357else
Guido van Rossumad678af1998-10-02 14:42:15 +00007358 ac_cv_sizeof_void_p=0
7359fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007361echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7362echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7363cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007364#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007365_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007366
7367
Martin v. Löwis11437992002-04-12 09:54:03 +00007368echo "$as_me:$LINENO: checking for short" >&5
7369echo $ECHO_N "checking for short... $ECHO_C" >&6
7370if test "${ac_cv_type_short+set}" = set; then
7371 echo $ECHO_N "(cached) $ECHO_C" >&6
7372else
7373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007374/* confdefs.h. */
7375_ACEOF
7376cat confdefs.h >>conftest.$ac_ext
7377cat >>conftest.$ac_ext <<_ACEOF
7378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007379$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007380int
7381main ()
7382{
7383if ((short *) 0)
7384 return 0;
7385if (sizeof (short))
7386 return 0;
7387 ;
7388 return 0;
7389}
7390_ACEOF
7391rm -f conftest.$ac_objext
7392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007393 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007395 grep -v '^ *+' conftest.er1 >conftest.err
7396 rm -f conftest.er1
7397 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007400 { ac_try='test -z "$ac_c_werror_flag"
7401 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7403 (eval $ac_try) 2>&5
7404 ac_status=$?
7405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7406 (exit $ac_status); }; } &&
7407 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7413 ac_cv_type_short=yes
7414else
7415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007416sed 's/^/| /' conftest.$ac_ext >&5
7417
Martin v. Löwis11437992002-04-12 09:54:03 +00007418ac_cv_type_short=no
7419fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007420rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007421fi
7422echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7423echo "${ECHO_T}$ac_cv_type_short" >&6
7424
7425echo "$as_me:$LINENO: checking size of short" >&5
7426echo $ECHO_N "checking size of short... $ECHO_C" >&6
7427if test "${ac_cv_sizeof_short+set}" = set; then
7428 echo $ECHO_N "(cached) $ECHO_C" >&6
7429else
7430 if test "$ac_cv_type_short" = yes; then
7431 # The cast to unsigned long works around a bug in the HP C Compiler
7432 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7433 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7434 # This bug is HP SR number 8606223364.
7435 if test "$cross_compiling" = yes; then
7436 # Depending upon the size, compute the lo and hi bounds.
7437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007438/* confdefs.h. */
7439_ACEOF
7440cat confdefs.h >>conftest.$ac_ext
7441cat >>conftest.$ac_ext <<_ACEOF
7442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007443$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007444int
7445main ()
7446{
7447static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7448test_array [0] = 0
7449
7450 ;
7451 return 0;
7452}
7453_ACEOF
7454rm -f conftest.$ac_objext
7455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007456 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007458 grep -v '^ *+' conftest.er1 >conftest.err
7459 rm -f conftest.er1
7460 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007463 { ac_try='test -z "$ac_c_werror_flag"
7464 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7466 (eval $ac_try) 2>&5
7467 ac_status=$?
7468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7469 (exit $ac_status); }; } &&
7470 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7476 ac_lo=0 ac_mid=0
7477 while :; do
7478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007479/* confdefs.h. */
7480_ACEOF
7481cat confdefs.h >>conftest.$ac_ext
7482cat >>conftest.$ac_ext <<_ACEOF
7483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007484$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007485int
7486main ()
7487{
7488static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7489test_array [0] = 0
7490
7491 ;
7492 return 0;
7493}
7494_ACEOF
7495rm -f conftest.$ac_objext
7496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007497 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007499 grep -v '^ *+' conftest.er1 >conftest.err
7500 rm -f conftest.er1
7501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7503 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007504 { ac_try='test -z "$ac_c_werror_flag"
7505 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7507 (eval $ac_try) 2>&5
7508 ac_status=$?
7509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7510 (exit $ac_status); }; } &&
7511 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7517 ac_hi=$ac_mid; break
7518else
7519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007520sed 's/^/| /' conftest.$ac_ext >&5
7521
Martin v. Löwis11437992002-04-12 09:54:03 +00007522ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007523 if test $ac_lo -le $ac_mid; then
7524 ac_lo= ac_hi=
7525 break
7526 fi
7527 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007528fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007530 done
7531else
7532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007533sed 's/^/| /' conftest.$ac_ext >&5
7534
Martin v. Löwis11437992002-04-12 09:54:03 +00007535cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007536/* confdefs.h. */
7537_ACEOF
7538cat confdefs.h >>conftest.$ac_ext
7539cat >>conftest.$ac_ext <<_ACEOF
7540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007541$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007542int
7543main ()
7544{
7545static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7546test_array [0] = 0
7547
7548 ;
7549 return 0;
7550}
7551_ACEOF
7552rm -f conftest.$ac_objext
7553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007554 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007556 grep -v '^ *+' conftest.er1 >conftest.err
7557 rm -f conftest.er1
7558 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7560 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007561 { ac_try='test -z "$ac_c_werror_flag"
7562 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7564 (eval $ac_try) 2>&5
7565 ac_status=$?
7566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7567 (exit $ac_status); }; } &&
7568 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7574 ac_hi=-1 ac_mid=-1
7575 while :; do
7576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007577/* confdefs.h. */
7578_ACEOF
7579cat confdefs.h >>conftest.$ac_ext
7580cat >>conftest.$ac_ext <<_ACEOF
7581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007582$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007583int
7584main ()
7585{
7586static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7587test_array [0] = 0
7588
7589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
7594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007595 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007597 grep -v '^ *+' conftest.er1 >conftest.err
7598 rm -f conftest.er1
7599 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7601 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007602 { ac_try='test -z "$ac_c_werror_flag"
7603 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7605 (eval $ac_try) 2>&5
7606 ac_status=$?
7607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7608 (exit $ac_status); }; } &&
7609 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7615 ac_lo=$ac_mid; break
7616else
7617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007618sed 's/^/| /' conftest.$ac_ext >&5
7619
Martin v. Löwis11437992002-04-12 09:54:03 +00007620ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007621 if test $ac_mid -le $ac_hi; then
7622 ac_lo= ac_hi=
7623 break
7624 fi
7625 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007626fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007627rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007628 done
7629else
7630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007631sed 's/^/| /' conftest.$ac_ext >&5
7632
Martin v. Löwis11437992002-04-12 09:54:03 +00007633ac_lo= ac_hi=
7634fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007636fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007637rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007638# Binary search between lo and hi bounds.
7639while test "x$ac_lo" != "x$ac_hi"; do
7640 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007642/* confdefs.h. */
7643_ACEOF
7644cat confdefs.h >>conftest.$ac_ext
7645cat >>conftest.$ac_ext <<_ACEOF
7646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007647$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007648int
7649main ()
7650{
7651static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7652test_array [0] = 0
7653
7654 ;
7655 return 0;
7656}
7657_ACEOF
7658rm -f conftest.$ac_objext
7659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007660 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007662 grep -v '^ *+' conftest.er1 >conftest.err
7663 rm -f conftest.er1
7664 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7666 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007667 { ac_try='test -z "$ac_c_werror_flag"
7668 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7670 (eval $ac_try) 2>&5
7671 ac_status=$?
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); }; } &&
7674 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7680 ac_hi=$ac_mid
7681else
7682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007683sed 's/^/| /' conftest.$ac_ext >&5
7684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685ac_lo=`expr '(' $ac_mid ')' + 1`
7686fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007687rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007688done
7689case $ac_lo in
7690?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007691'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7692See \`config.log' for more details." >&5
7693echo "$as_me: error: cannot compute sizeof (short), 77
7694See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 { (exit 1); exit 1; }; } ;;
7696esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007697else
7698 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007699 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7700See \`config.log' for more details." >&5
7701echo "$as_me: error: cannot run test program while cross compiling
7702See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007704else
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007706/* confdefs.h. */
7707_ACEOF
7708cat confdefs.h >>conftest.$ac_ext
7709cat >>conftest.$ac_ext <<_ACEOF
7710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007711$ac_includes_default
7712long longval () { return (long) (sizeof (short)); }
7713unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007714#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007715#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007716int
7717main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007718{
Martin v. Löwis11437992002-04-12 09:54:03 +00007719
7720 FILE *f = fopen ("conftest.val", "w");
7721 if (! f)
7722 exit (1);
7723 if (((long) (sizeof (short))) < 0)
7724 {
7725 long i = longval ();
7726 if (i != ((long) (sizeof (short))))
7727 exit (1);
7728 fprintf (f, "%ld\n", i);
7729 }
7730 else
7731 {
7732 unsigned long i = ulongval ();
7733 if (i != ((long) (sizeof (short))))
7734 exit (1);
7735 fprintf (f, "%lu\n", i);
7736 }
7737 exit (ferror (f) || fclose (f) != 0);
7738
7739 ;
7740 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007741}
Martin v. Löwis11437992002-04-12 09:54:03 +00007742_ACEOF
7743rm -f conftest$ac_exeext
7744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7745 (eval $ac_link) 2>&5
7746 ac_status=$?
7747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7748 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7750 (eval $ac_try) 2>&5
7751 ac_status=$?
7752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7753 (exit $ac_status); }; }; then
7754 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007755else
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 echo "$as_me: program exited with status $ac_status" >&5
7757echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007758sed 's/^/| /' conftest.$ac_ext >&5
7759
Martin v. Löwis11437992002-04-12 09:54:03 +00007760( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007761{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7762See \`config.log' for more details." >&5
7763echo "$as_me: error: cannot compute sizeof (short), 77
7764See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 { (exit 1); exit 1; }; }
7766fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007767rm -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 +00007768fi
7769fi
7770rm -f conftest.val
7771else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007772 ac_cv_sizeof_short=0
7773fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007775echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7776echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7777cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007778#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007779_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007780
7781
Martin v. Löwis11437992002-04-12 09:54:03 +00007782echo "$as_me:$LINENO: checking for float" >&5
7783echo $ECHO_N "checking for float... $ECHO_C" >&6
7784if test "${ac_cv_type_float+set}" = set; then
7785 echo $ECHO_N "(cached) $ECHO_C" >&6
7786else
7787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007788/* confdefs.h. */
7789_ACEOF
7790cat confdefs.h >>conftest.$ac_ext
7791cat >>conftest.$ac_ext <<_ACEOF
7792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007793$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007794int
7795main ()
7796{
7797if ((float *) 0)
7798 return 0;
7799if (sizeof (float))
7800 return 0;
7801 ;
7802 return 0;
7803}
7804_ACEOF
7805rm -f conftest.$ac_objext
7806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007807 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007809 grep -v '^ *+' conftest.er1 >conftest.err
7810 rm -f conftest.er1
7811 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7813 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007814 { ac_try='test -z "$ac_c_werror_flag"
7815 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7817 (eval $ac_try) 2>&5
7818 ac_status=$?
7819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7820 (exit $ac_status); }; } &&
7821 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7827 ac_cv_type_float=yes
7828else
7829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007830sed 's/^/| /' conftest.$ac_ext >&5
7831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832ac_cv_type_float=no
7833fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007834rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007835fi
7836echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7837echo "${ECHO_T}$ac_cv_type_float" >&6
7838
7839echo "$as_me:$LINENO: checking size of float" >&5
7840echo $ECHO_N "checking size of float... $ECHO_C" >&6
7841if test "${ac_cv_sizeof_float+set}" = set; then
7842 echo $ECHO_N "(cached) $ECHO_C" >&6
7843else
7844 if test "$ac_cv_type_float" = yes; then
7845 # The cast to unsigned long works around a bug in the HP C Compiler
7846 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7847 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7848 # This bug is HP SR number 8606223364.
7849 if test "$cross_compiling" = yes; then
7850 # Depending upon the size, compute the lo and hi bounds.
7851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007852/* confdefs.h. */
7853_ACEOF
7854cat confdefs.h >>conftest.$ac_ext
7855cat >>conftest.$ac_ext <<_ACEOF
7856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007857$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007858int
7859main ()
7860{
7861static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7862test_array [0] = 0
7863
7864 ;
7865 return 0;
7866}
7867_ACEOF
7868rm -f conftest.$ac_objext
7869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007870 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007872 grep -v '^ *+' conftest.er1 >conftest.err
7873 rm -f conftest.er1
7874 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007877 { ac_try='test -z "$ac_c_werror_flag"
7878 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7880 (eval $ac_try) 2>&5
7881 ac_status=$?
7882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7883 (exit $ac_status); }; } &&
7884 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7890 ac_lo=0 ac_mid=0
7891 while :; do
7892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007893/* confdefs.h. */
7894_ACEOF
7895cat confdefs.h >>conftest.$ac_ext
7896cat >>conftest.$ac_ext <<_ACEOF
7897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007898$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007899int
7900main ()
7901{
7902static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7903test_array [0] = 0
7904
7905 ;
7906 return 0;
7907}
7908_ACEOF
7909rm -f conftest.$ac_objext
7910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007911 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007913 grep -v '^ *+' conftest.er1 >conftest.err
7914 rm -f conftest.er1
7915 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7917 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007918 { ac_try='test -z "$ac_c_werror_flag"
7919 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7921 (eval $ac_try) 2>&5
7922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); }; } &&
7925 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7931 ac_hi=$ac_mid; break
7932else
7933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007934sed 's/^/| /' conftest.$ac_ext >&5
7935
Martin v. Löwis11437992002-04-12 09:54:03 +00007936ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007937 if test $ac_lo -le $ac_mid; then
7938 ac_lo= ac_hi=
7939 break
7940 fi
7941 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007942fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007943rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 done
7945else
7946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007947sed 's/^/| /' conftest.$ac_ext >&5
7948
Martin v. Löwis11437992002-04-12 09:54:03 +00007949cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007950/* confdefs.h. */
7951_ACEOF
7952cat confdefs.h >>conftest.$ac_ext
7953cat >>conftest.$ac_ext <<_ACEOF
7954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007955$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007956int
7957main ()
7958{
7959static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7960test_array [0] = 0
7961
7962 ;
7963 return 0;
7964}
7965_ACEOF
7966rm -f conftest.$ac_objext
7967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007968 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007970 grep -v '^ *+' conftest.er1 >conftest.err
7971 rm -f conftest.er1
7972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007975 { ac_try='test -z "$ac_c_werror_flag"
7976 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7978 (eval $ac_try) 2>&5
7979 ac_status=$?
7980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7981 (exit $ac_status); }; } &&
7982 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
7988 ac_hi=-1 ac_mid=-1
7989 while :; do
7990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* confdefs.h. */
7992_ACEOF
7993cat confdefs.h >>conftest.$ac_ext
7994cat >>conftest.$ac_ext <<_ACEOF
7995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007997int
7998main ()
7999{
8000static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
8001test_array [0] = 0
8002
8003 ;
8004 return 0;
8005}
8006_ACEOF
8007rm -f conftest.$ac_objext
8008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008009 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008011 grep -v '^ *+' conftest.er1 >conftest.err
8012 rm -f conftest.er1
8013 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8015 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008016 { ac_try='test -z "$ac_c_werror_flag"
8017 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8019 (eval $ac_try) 2>&5
8020 ac_status=$?
8021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022 (exit $ac_status); }; } &&
8023 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8029 ac_lo=$ac_mid; break
8030else
8031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008032sed 's/^/| /' conftest.$ac_ext >&5
8033
Martin v. Löwis11437992002-04-12 09:54:03 +00008034ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008035 if test $ac_mid -le $ac_hi; then
8036 ac_lo= ac_hi=
8037 break
8038 fi
8039 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008040fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008041rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 done
8043else
8044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008045sed 's/^/| /' conftest.$ac_ext >&5
8046
Martin v. Löwis11437992002-04-12 09:54:03 +00008047ac_lo= ac_hi=
8048fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008049rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008050fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008051rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008052# Binary search between lo and hi bounds.
8053while test "x$ac_lo" != "x$ac_hi"; do
8054 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008056/* confdefs.h. */
8057_ACEOF
8058cat confdefs.h >>conftest.$ac_ext
8059cat >>conftest.$ac_ext <<_ACEOF
8060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008061$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008062int
8063main ()
8064{
8065static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8066test_array [0] = 0
8067
8068 ;
8069 return 0;
8070}
8071_ACEOF
8072rm -f conftest.$ac_objext
8073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008074 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008076 grep -v '^ *+' conftest.er1 >conftest.err
8077 rm -f conftest.er1
8078 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8080 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008081 { ac_try='test -z "$ac_c_werror_flag"
8082 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8084 (eval $ac_try) 2>&5
8085 ac_status=$?
8086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8087 (exit $ac_status); }; } &&
8088 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8094 ac_hi=$ac_mid
8095else
8096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008097sed 's/^/| /' conftest.$ac_ext >&5
8098
Martin v. Löwis11437992002-04-12 09:54:03 +00008099ac_lo=`expr '(' $ac_mid ')' + 1`
8100fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008101rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008102done
8103case $ac_lo in
8104?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008105'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8106See \`config.log' for more details." >&5
8107echo "$as_me: error: cannot compute sizeof (float), 77
8108See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 { (exit 1); exit 1; }; } ;;
8110esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008111else
8112 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008113 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8114See \`config.log' for more details." >&5
8115echo "$as_me: error: cannot run test program while cross compiling
8116See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008118else
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008120/* confdefs.h. */
8121_ACEOF
8122cat confdefs.h >>conftest.$ac_ext
8123cat >>conftest.$ac_ext <<_ACEOF
8124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008125$ac_includes_default
8126long longval () { return (long) (sizeof (float)); }
8127unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008128#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008129#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008130int
8131main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008132{
Martin v. Löwis11437992002-04-12 09:54:03 +00008133
8134 FILE *f = fopen ("conftest.val", "w");
8135 if (! f)
8136 exit (1);
8137 if (((long) (sizeof (float))) < 0)
8138 {
8139 long i = longval ();
8140 if (i != ((long) (sizeof (float))))
8141 exit (1);
8142 fprintf (f, "%ld\n", i);
8143 }
8144 else
8145 {
8146 unsigned long i = ulongval ();
8147 if (i != ((long) (sizeof (float))))
8148 exit (1);
8149 fprintf (f, "%lu\n", i);
8150 }
8151 exit (ferror (f) || fclose (f) != 0);
8152
8153 ;
8154 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008155}
Martin v. Löwis11437992002-04-12 09:54:03 +00008156_ACEOF
8157rm -f conftest$ac_exeext
8158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8159 (eval $ac_link) 2>&5
8160 ac_status=$?
8161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8162 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8164 (eval $ac_try) 2>&5
8165 ac_status=$?
8166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8167 (exit $ac_status); }; }; then
8168 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008169else
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 echo "$as_me: program exited with status $ac_status" >&5
8171echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008172sed 's/^/| /' conftest.$ac_ext >&5
8173
Martin v. Löwis11437992002-04-12 09:54:03 +00008174( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008175{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8176See \`config.log' for more details." >&5
8177echo "$as_me: error: cannot compute sizeof (float), 77
8178See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008179 { (exit 1); exit 1; }; }
8180fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008181rm -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 +00008182fi
8183fi
8184rm -f conftest.val
8185else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008186 ac_cv_sizeof_float=0
8187fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008189echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8190echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8191cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008192#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008193_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008194
8195
Martin v. Löwis11437992002-04-12 09:54:03 +00008196echo "$as_me:$LINENO: checking for double" >&5
8197echo $ECHO_N "checking for double... $ECHO_C" >&6
8198if test "${ac_cv_type_double+set}" = set; then
8199 echo $ECHO_N "(cached) $ECHO_C" >&6
8200else
8201 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008202/* confdefs.h. */
8203_ACEOF
8204cat confdefs.h >>conftest.$ac_ext
8205cat >>conftest.$ac_ext <<_ACEOF
8206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008207$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008208int
8209main ()
8210{
8211if ((double *) 0)
8212 return 0;
8213if (sizeof (double))
8214 return 0;
8215 ;
8216 return 0;
8217}
8218_ACEOF
8219rm -f conftest.$ac_objext
8220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008221 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008223 grep -v '^ *+' conftest.er1 >conftest.err
8224 rm -f conftest.er1
8225 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8227 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008228 { ac_try='test -z "$ac_c_werror_flag"
8229 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8231 (eval $ac_try) 2>&5
8232 ac_status=$?
8233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8234 (exit $ac_status); }; } &&
8235 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8241 ac_cv_type_double=yes
8242else
8243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008244sed 's/^/| /' conftest.$ac_ext >&5
8245
Martin v. Löwis11437992002-04-12 09:54:03 +00008246ac_cv_type_double=no
8247fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008248rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008249fi
8250echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8251echo "${ECHO_T}$ac_cv_type_double" >&6
8252
8253echo "$as_me:$LINENO: checking size of double" >&5
8254echo $ECHO_N "checking size of double... $ECHO_C" >&6
8255if test "${ac_cv_sizeof_double+set}" = set; then
8256 echo $ECHO_N "(cached) $ECHO_C" >&6
8257else
8258 if test "$ac_cv_type_double" = yes; then
8259 # The cast to unsigned long works around a bug in the HP C Compiler
8260 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8261 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8262 # This bug is HP SR number 8606223364.
8263 if test "$cross_compiling" = yes; then
8264 # Depending upon the size, compute the lo and hi bounds.
8265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008266/* confdefs.h. */
8267_ACEOF
8268cat confdefs.h >>conftest.$ac_ext
8269cat >>conftest.$ac_ext <<_ACEOF
8270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008271$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008272int
8273main ()
8274{
8275static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8276test_array [0] = 0
8277
8278 ;
8279 return 0;
8280}
8281_ACEOF
8282rm -f conftest.$ac_objext
8283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008284 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008286 grep -v '^ *+' conftest.er1 >conftest.err
8287 rm -f conftest.er1
8288 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8290 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008291 { ac_try='test -z "$ac_c_werror_flag"
8292 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8294 (eval $ac_try) 2>&5
8295 ac_status=$?
8296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8297 (exit $ac_status); }; } &&
8298 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8304 ac_lo=0 ac_mid=0
8305 while :; do
8306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008307/* confdefs.h. */
8308_ACEOF
8309cat confdefs.h >>conftest.$ac_ext
8310cat >>conftest.$ac_ext <<_ACEOF
8311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008312$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008313int
8314main ()
8315{
8316static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8317test_array [0] = 0
8318
8319 ;
8320 return 0;
8321}
8322_ACEOF
8323rm -f conftest.$ac_objext
8324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008325 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008327 grep -v '^ *+' conftest.er1 >conftest.err
8328 rm -f conftest.er1
8329 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8331 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008332 { ac_try='test -z "$ac_c_werror_flag"
8333 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8335 (eval $ac_try) 2>&5
8336 ac_status=$?
8337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8338 (exit $ac_status); }; } &&
8339 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8345 ac_hi=$ac_mid; break
8346else
8347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008348sed 's/^/| /' conftest.$ac_ext >&5
8349
Martin v. Löwis11437992002-04-12 09:54:03 +00008350ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008351 if test $ac_lo -le $ac_mid; then
8352 ac_lo= ac_hi=
8353 break
8354 fi
8355 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008356fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008357rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 done
8359else
8360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008361sed 's/^/| /' conftest.$ac_ext >&5
8362
Martin v. Löwis11437992002-04-12 09:54:03 +00008363cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008364/* confdefs.h. */
8365_ACEOF
8366cat confdefs.h >>conftest.$ac_ext
8367cat >>conftest.$ac_ext <<_ACEOF
8368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008369$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008370int
8371main ()
8372{
8373static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8374test_array [0] = 0
8375
8376 ;
8377 return 0;
8378}
8379_ACEOF
8380rm -f conftest.$ac_objext
8381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008382 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008384 grep -v '^ *+' conftest.er1 >conftest.err
8385 rm -f conftest.er1
8386 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008389 { ac_try='test -z "$ac_c_werror_flag"
8390 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392 (eval $ac_try) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); }; } &&
8396 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8402 ac_hi=-1 ac_mid=-1
8403 while :; do
8404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008405/* confdefs.h. */
8406_ACEOF
8407cat confdefs.h >>conftest.$ac_ext
8408cat >>conftest.$ac_ext <<_ACEOF
8409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008410$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008411int
8412main ()
8413{
8414static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8415test_array [0] = 0
8416
8417 ;
8418 return 0;
8419}
8420_ACEOF
8421rm -f conftest.$ac_objext
8422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008423 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008425 grep -v '^ *+' conftest.er1 >conftest.err
8426 rm -f conftest.er1
8427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8429 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008430 { ac_try='test -z "$ac_c_werror_flag"
8431 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8433 (eval $ac_try) 2>&5
8434 ac_status=$?
8435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8436 (exit $ac_status); }; } &&
8437 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8443 ac_lo=$ac_mid; break
8444else
8445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008446sed 's/^/| /' conftest.$ac_ext >&5
8447
Martin v. Löwis11437992002-04-12 09:54:03 +00008448ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008449 if test $ac_mid -le $ac_hi; then
8450 ac_lo= ac_hi=
8451 break
8452 fi
8453 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008454fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 done
8457else
8458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008459sed 's/^/| /' conftest.$ac_ext >&5
8460
Martin v. Löwis11437992002-04-12 09:54:03 +00008461ac_lo= ac_hi=
8462fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008463rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008464fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008465rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008466# Binary search between lo and hi bounds.
8467while test "x$ac_lo" != "x$ac_hi"; do
8468 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008470/* confdefs.h. */
8471_ACEOF
8472cat confdefs.h >>conftest.$ac_ext
8473cat >>conftest.$ac_ext <<_ACEOF
8474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008475$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008476int
8477main ()
8478{
8479static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8480test_array [0] = 0
8481
8482 ;
8483 return 0;
8484}
8485_ACEOF
8486rm -f conftest.$ac_objext
8487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008488 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008490 grep -v '^ *+' conftest.er1 >conftest.err
8491 rm -f conftest.er1
8492 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8494 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008495 { ac_try='test -z "$ac_c_werror_flag"
8496 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8498 (eval $ac_try) 2>&5
8499 ac_status=$?
8500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8501 (exit $ac_status); }; } &&
8502 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8508 ac_hi=$ac_mid
8509else
8510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008511sed 's/^/| /' conftest.$ac_ext >&5
8512
Martin v. Löwis11437992002-04-12 09:54:03 +00008513ac_lo=`expr '(' $ac_mid ')' + 1`
8514fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008515rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516done
8517case $ac_lo in
8518?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008519'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8520See \`config.log' for more details." >&5
8521echo "$as_me: error: cannot compute sizeof (double), 77
8522See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 { (exit 1); exit 1; }; } ;;
8524esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008525else
8526 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008527 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8528See \`config.log' for more details." >&5
8529echo "$as_me: error: cannot run test program while cross compiling
8530See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008532else
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008534/* confdefs.h. */
8535_ACEOF
8536cat confdefs.h >>conftest.$ac_ext
8537cat >>conftest.$ac_ext <<_ACEOF
8538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008539$ac_includes_default
8540long longval () { return (long) (sizeof (double)); }
8541unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008542#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008543#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008544int
8545main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008546{
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
8548 FILE *f = fopen ("conftest.val", "w");
8549 if (! f)
8550 exit (1);
8551 if (((long) (sizeof (double))) < 0)
8552 {
8553 long i = longval ();
8554 if (i != ((long) (sizeof (double))))
8555 exit (1);
8556 fprintf (f, "%ld\n", i);
8557 }
8558 else
8559 {
8560 unsigned long i = ulongval ();
8561 if (i != ((long) (sizeof (double))))
8562 exit (1);
8563 fprintf (f, "%lu\n", i);
8564 }
8565 exit (ferror (f) || fclose (f) != 0);
8566
8567 ;
8568 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008569}
Martin v. Löwis11437992002-04-12 09:54:03 +00008570_ACEOF
8571rm -f conftest$ac_exeext
8572if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8573 (eval $ac_link) 2>&5
8574 ac_status=$?
8575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8576 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8578 (eval $ac_try) 2>&5
8579 ac_status=$?
8580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8581 (exit $ac_status); }; }; then
8582 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008583else
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 echo "$as_me: program exited with status $ac_status" >&5
8585echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008586sed 's/^/| /' conftest.$ac_ext >&5
8587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008589{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8590See \`config.log' for more details." >&5
8591echo "$as_me: error: cannot compute sizeof (double), 77
8592See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008593 { (exit 1); exit 1; }; }
8594fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008595rm -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 +00008596fi
8597fi
8598rm -f conftest.val
8599else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008600 ac_cv_sizeof_double=0
8601fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008603echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8604echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8605cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008606#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008607_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008608
8609
Martin v. Löwis11437992002-04-12 09:54:03 +00008610echo "$as_me:$LINENO: checking for fpos_t" >&5
8611echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8612if test "${ac_cv_type_fpos_t+set}" = set; then
8613 echo $ECHO_N "(cached) $ECHO_C" >&6
8614else
8615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008616/* confdefs.h. */
8617_ACEOF
8618cat confdefs.h >>conftest.$ac_ext
8619cat >>conftest.$ac_ext <<_ACEOF
8620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008621$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008622int
8623main ()
8624{
8625if ((fpos_t *) 0)
8626 return 0;
8627if (sizeof (fpos_t))
8628 return 0;
8629 ;
8630 return 0;
8631}
8632_ACEOF
8633rm -f conftest.$ac_objext
8634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008635 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008637 grep -v '^ *+' conftest.er1 >conftest.err
8638 rm -f conftest.er1
8639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8641 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008642 { ac_try='test -z "$ac_c_werror_flag"
8643 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8645 (eval $ac_try) 2>&5
8646 ac_status=$?
8647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648 (exit $ac_status); }; } &&
8649 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8655 ac_cv_type_fpos_t=yes
8656else
8657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008658sed 's/^/| /' conftest.$ac_ext >&5
8659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660ac_cv_type_fpos_t=no
8661fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008662rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008663fi
8664echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8665echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8666
8667echo "$as_me:$LINENO: checking size of fpos_t" >&5
8668echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8669if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8670 echo $ECHO_N "(cached) $ECHO_C" >&6
8671else
8672 if test "$ac_cv_type_fpos_t" = yes; then
8673 # The cast to unsigned long works around a bug in the HP C Compiler
8674 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8675 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8676 # This bug is HP SR number 8606223364.
8677 if test "$cross_compiling" = yes; then
8678 # Depending upon the size, compute the lo and hi bounds.
8679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008680/* confdefs.h. */
8681_ACEOF
8682cat confdefs.h >>conftest.$ac_ext
8683cat >>conftest.$ac_ext <<_ACEOF
8684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008685$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008686int
8687main ()
8688{
8689static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8690test_array [0] = 0
8691
8692 ;
8693 return 0;
8694}
8695_ACEOF
8696rm -f conftest.$ac_objext
8697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008698 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008700 grep -v '^ *+' conftest.er1 >conftest.err
8701 rm -f conftest.er1
8702 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8704 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008705 { ac_try='test -z "$ac_c_werror_flag"
8706 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8708 (eval $ac_try) 2>&5
8709 ac_status=$?
8710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8711 (exit $ac_status); }; } &&
8712 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8718 ac_lo=0 ac_mid=0
8719 while :; do
8720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008721/* confdefs.h. */
8722_ACEOF
8723cat confdefs.h >>conftest.$ac_ext
8724cat >>conftest.$ac_ext <<_ACEOF
8725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008726$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008727int
8728main ()
8729{
8730static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8731test_array [0] = 0
8732
8733 ;
8734 return 0;
8735}
8736_ACEOF
8737rm -f conftest.$ac_objext
8738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008739 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008741 grep -v '^ *+' conftest.er1 >conftest.err
8742 rm -f conftest.er1
8743 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8745 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008746 { ac_try='test -z "$ac_c_werror_flag"
8747 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8749 (eval $ac_try) 2>&5
8750 ac_status=$?
8751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8752 (exit $ac_status); }; } &&
8753 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8759 ac_hi=$ac_mid; break
8760else
8761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008762sed 's/^/| /' conftest.$ac_ext >&5
8763
Martin v. Löwis11437992002-04-12 09:54:03 +00008764ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008765 if test $ac_lo -le $ac_mid; then
8766 ac_lo= ac_hi=
8767 break
8768 fi
8769 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008770fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 done
8773else
8774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008775sed 's/^/| /' conftest.$ac_ext >&5
8776
Martin v. Löwis11437992002-04-12 09:54:03 +00008777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008778/* confdefs.h. */
8779_ACEOF
8780cat confdefs.h >>conftest.$ac_ext
8781cat >>conftest.$ac_ext <<_ACEOF
8782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008783$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008784int
8785main ()
8786{
8787static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8788test_array [0] = 0
8789
8790 ;
8791 return 0;
8792}
8793_ACEOF
8794rm -f conftest.$ac_objext
8795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008796 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008798 grep -v '^ *+' conftest.er1 >conftest.err
8799 rm -f conftest.er1
8800 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8802 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008803 { ac_try='test -z "$ac_c_werror_flag"
8804 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8806 (eval $ac_try) 2>&5
8807 ac_status=$?
8808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8809 (exit $ac_status); }; } &&
8810 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8816 ac_hi=-1 ac_mid=-1
8817 while :; do
8818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008819/* confdefs.h. */
8820_ACEOF
8821cat confdefs.h >>conftest.$ac_ext
8822cat >>conftest.$ac_ext <<_ACEOF
8823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008824$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008825int
8826main ()
8827{
8828static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8829test_array [0] = 0
8830
8831 ;
8832 return 0;
8833}
8834_ACEOF
8835rm -f conftest.$ac_objext
8836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008837 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008839 grep -v '^ *+' conftest.er1 >conftest.err
8840 rm -f conftest.er1
8841 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8843 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008844 { ac_try='test -z "$ac_c_werror_flag"
8845 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8847 (eval $ac_try) 2>&5
8848 ac_status=$?
8849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8850 (exit $ac_status); }; } &&
8851 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8857 ac_lo=$ac_mid; break
8858else
8859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008860sed 's/^/| /' conftest.$ac_ext >&5
8861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008863 if test $ac_mid -le $ac_hi; then
8864 ac_lo= ac_hi=
8865 break
8866 fi
8867 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008868fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008869rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 done
8871else
8872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008873sed 's/^/| /' conftest.$ac_ext >&5
8874
Martin v. Löwis11437992002-04-12 09:54:03 +00008875ac_lo= ac_hi=
8876fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008877rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008878fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008879rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008880# Binary search between lo and hi bounds.
8881while test "x$ac_lo" != "x$ac_hi"; do
8882 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008884/* confdefs.h. */
8885_ACEOF
8886cat confdefs.h >>conftest.$ac_ext
8887cat >>conftest.$ac_ext <<_ACEOF
8888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008889$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008890int
8891main ()
8892{
8893static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8894test_array [0] = 0
8895
8896 ;
8897 return 0;
8898}
8899_ACEOF
8900rm -f conftest.$ac_objext
8901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008902 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008904 grep -v '^ *+' conftest.er1 >conftest.err
8905 rm -f conftest.er1
8906 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8908 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008909 { ac_try='test -z "$ac_c_werror_flag"
8910 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8912 (eval $ac_try) 2>&5
8913 ac_status=$?
8914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8915 (exit $ac_status); }; } &&
8916 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
8922 ac_hi=$ac_mid
8923else
8924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008925sed 's/^/| /' conftest.$ac_ext >&5
8926
Martin v. Löwis11437992002-04-12 09:54:03 +00008927ac_lo=`expr '(' $ac_mid ')' + 1`
8928fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008929rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930done
8931case $ac_lo in
8932?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008933'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8934See \`config.log' for more details." >&5
8935echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8936See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 { (exit 1); exit 1; }; } ;;
8938esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008939else
8940 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008941 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8942See \`config.log' for more details." >&5
8943echo "$as_me: error: cannot run test program while cross compiling
8944See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008946else
Martin v. Löwis11437992002-04-12 09:54:03 +00008947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008948/* confdefs.h. */
8949_ACEOF
8950cat confdefs.h >>conftest.$ac_ext
8951cat >>conftest.$ac_ext <<_ACEOF
8952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008953$ac_includes_default
8954long longval () { return (long) (sizeof (fpos_t)); }
8955unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008956#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008957#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008958int
8959main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008960{
Martin v. Löwis11437992002-04-12 09:54:03 +00008961
8962 FILE *f = fopen ("conftest.val", "w");
8963 if (! f)
8964 exit (1);
8965 if (((long) (sizeof (fpos_t))) < 0)
8966 {
8967 long i = longval ();
8968 if (i != ((long) (sizeof (fpos_t))))
8969 exit (1);
8970 fprintf (f, "%ld\n", i);
8971 }
8972 else
8973 {
8974 unsigned long i = ulongval ();
8975 if (i != ((long) (sizeof (fpos_t))))
8976 exit (1);
8977 fprintf (f, "%lu\n", i);
8978 }
8979 exit (ferror (f) || fclose (f) != 0);
8980
8981 ;
8982 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008983}
Martin v. Löwis11437992002-04-12 09:54:03 +00008984_ACEOF
8985rm -f conftest$ac_exeext
8986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8987 (eval $ac_link) 2>&5
8988 ac_status=$?
8989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8990 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8992 (eval $ac_try) 2>&5
8993 ac_status=$?
8994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8995 (exit $ac_status); }; }; then
8996 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008997else
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 echo "$as_me: program exited with status $ac_status" >&5
8999echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009000sed 's/^/| /' conftest.$ac_ext >&5
9001
Martin v. Löwis11437992002-04-12 09:54:03 +00009002( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009003{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9004See \`config.log' for more details." >&5
9005echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9006See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 { (exit 1); exit 1; }; }
9008fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009009rm -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 +00009010fi
9011fi
9012rm -f conftest.val
9013else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009014 ac_cv_sizeof_fpos_t=0
9015fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009016fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009017echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9018echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
9019cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009020#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009022
Michael W. Hudson54241132001-12-07 15:38:26 +00009023
9024
Martin v. Löwis11437992002-04-12 09:54:03 +00009025echo "$as_me:$LINENO: checking for long long support" >&5
9026echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009027have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009028cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009029/* confdefs.h. */
9030_ACEOF
9031cat confdefs.h >>conftest.$ac_ext
9032cat >>conftest.$ac_ext <<_ACEOF
9033/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009034
Martin v. Löwis11437992002-04-12 09:54:03 +00009035int
9036main ()
9037{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009038long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ;
9040 return 0;
9041}
9042_ACEOF
9043rm -f conftest.$ac_objext
9044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009045 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009047 grep -v '^ *+' conftest.er1 >conftest.err
9048 rm -f conftest.er1
9049 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9051 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009052 { ac_try='test -z "$ac_c_werror_flag"
9053 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9055 (eval $ac_try) 2>&5
9056 ac_status=$?
9057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9058 (exit $ac_status); }; } &&
9059 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9065
9066
9067cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009068#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009069_ACEOF
9070
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009071 have_long_long=yes
9072
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009073else
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009075sed 's/^/| /' conftest.$ac_ext >&5
9076
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009077fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009078rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009079echo "$as_me:$LINENO: result: $have_long_long" >&5
9080echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009081if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009082echo "$as_me:$LINENO: checking for long long" >&5
9083echo $ECHO_N "checking for long long... $ECHO_C" >&6
9084if test "${ac_cv_type_long_long+set}" = set; then
9085 echo $ECHO_N "(cached) $ECHO_C" >&6
9086else
9087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009088/* confdefs.h. */
9089_ACEOF
9090cat confdefs.h >>conftest.$ac_ext
9091cat >>conftest.$ac_ext <<_ACEOF
9092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009093$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009094int
9095main ()
9096{
9097if ((long long *) 0)
9098 return 0;
9099if (sizeof (long long))
9100 return 0;
9101 ;
9102 return 0;
9103}
9104_ACEOF
9105rm -f conftest.$ac_objext
9106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009107 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009109 grep -v '^ *+' conftest.er1 >conftest.err
9110 rm -f conftest.er1
9111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9113 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009114 { ac_try='test -z "$ac_c_werror_flag"
9115 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9117 (eval $ac_try) 2>&5
9118 ac_status=$?
9119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9120 (exit $ac_status); }; } &&
9121 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9127 ac_cv_type_long_long=yes
9128else
9129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009130sed 's/^/| /' conftest.$ac_ext >&5
9131
Martin v. Löwis11437992002-04-12 09:54:03 +00009132ac_cv_type_long_long=no
9133fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009135fi
9136echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9137echo "${ECHO_T}$ac_cv_type_long_long" >&6
9138
9139echo "$as_me:$LINENO: checking size of long long" >&5
9140echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9141if test "${ac_cv_sizeof_long_long+set}" = set; then
9142 echo $ECHO_N "(cached) $ECHO_C" >&6
9143else
9144 if test "$ac_cv_type_long_long" = yes; then
9145 # The cast to unsigned long works around a bug in the HP C Compiler
9146 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9147 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9148 # This bug is HP SR number 8606223364.
9149 if test "$cross_compiling" = yes; then
9150 # Depending upon the size, compute the lo and hi bounds.
9151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009152/* confdefs.h. */
9153_ACEOF
9154cat confdefs.h >>conftest.$ac_ext
9155cat >>conftest.$ac_ext <<_ACEOF
9156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009157$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009158int
9159main ()
9160{
9161static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9162test_array [0] = 0
9163
9164 ;
9165 return 0;
9166}
9167_ACEOF
9168rm -f conftest.$ac_objext
9169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009170 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009172 grep -v '^ *+' conftest.er1 >conftest.err
9173 rm -f conftest.er1
9174 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009177 { ac_try='test -z "$ac_c_werror_flag"
9178 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9180 (eval $ac_try) 2>&5
9181 ac_status=$?
9182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9183 (exit $ac_status); }; } &&
9184 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9190 ac_lo=0 ac_mid=0
9191 while :; do
9192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009193/* confdefs.h. */
9194_ACEOF
9195cat confdefs.h >>conftest.$ac_ext
9196cat >>conftest.$ac_ext <<_ACEOF
9197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009198$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009199int
9200main ()
9201{
9202static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9203test_array [0] = 0
9204
9205 ;
9206 return 0;
9207}
9208_ACEOF
9209rm -f conftest.$ac_objext
9210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009211 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009213 grep -v '^ *+' conftest.er1 >conftest.err
9214 rm -f conftest.er1
9215 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9217 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009218 { ac_try='test -z "$ac_c_werror_flag"
9219 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9221 (eval $ac_try) 2>&5
9222 ac_status=$?
9223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9224 (exit $ac_status); }; } &&
9225 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9231 ac_hi=$ac_mid; break
9232else
9233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009234sed 's/^/| /' conftest.$ac_ext >&5
9235
Martin v. Löwis11437992002-04-12 09:54:03 +00009236ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009237 if test $ac_lo -le $ac_mid; then
9238 ac_lo= ac_hi=
9239 break
9240 fi
9241 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009242fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009243rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 done
9245else
9246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009247sed 's/^/| /' conftest.$ac_ext >&5
9248
Martin v. Löwis11437992002-04-12 09:54:03 +00009249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009250/* confdefs.h. */
9251_ACEOF
9252cat confdefs.h >>conftest.$ac_ext
9253cat >>conftest.$ac_ext <<_ACEOF
9254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009255$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009256int
9257main ()
9258{
9259static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9260test_array [0] = 0
9261
9262 ;
9263 return 0;
9264}
9265_ACEOF
9266rm -f conftest.$ac_objext
9267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009268 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009270 grep -v '^ *+' conftest.er1 >conftest.err
9271 rm -f conftest.er1
9272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009275 { ac_try='test -z "$ac_c_werror_flag"
9276 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9278 (eval $ac_try) 2>&5
9279 ac_status=$?
9280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9281 (exit $ac_status); }; } &&
9282 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9288 ac_hi=-1 ac_mid=-1
9289 while :; do
9290 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009291/* confdefs.h. */
9292_ACEOF
9293cat confdefs.h >>conftest.$ac_ext
9294cat >>conftest.$ac_ext <<_ACEOF
9295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009296$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009297int
9298main ()
9299{
9300static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9301test_array [0] = 0
9302
9303 ;
9304 return 0;
9305}
9306_ACEOF
9307rm -f conftest.$ac_objext
9308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009309 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009311 grep -v '^ *+' conftest.er1 >conftest.err
9312 rm -f conftest.er1
9313 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009316 { ac_try='test -z "$ac_c_werror_flag"
9317 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9319 (eval $ac_try) 2>&5
9320 ac_status=$?
9321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9322 (exit $ac_status); }; } &&
9323 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9329 ac_lo=$ac_mid; break
9330else
9331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009332sed 's/^/| /' conftest.$ac_ext >&5
9333
Martin v. Löwis11437992002-04-12 09:54:03 +00009334ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009335 if test $ac_mid -le $ac_hi; then
9336 ac_lo= ac_hi=
9337 break
9338 fi
9339 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009340fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009342 done
9343else
9344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009345sed 's/^/| /' conftest.$ac_ext >&5
9346
Martin v. Löwis11437992002-04-12 09:54:03 +00009347ac_lo= ac_hi=
9348fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009349rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009350fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009351rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009352# Binary search between lo and hi bounds.
9353while test "x$ac_lo" != "x$ac_hi"; do
9354 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009356/* confdefs.h. */
9357_ACEOF
9358cat confdefs.h >>conftest.$ac_ext
9359cat >>conftest.$ac_ext <<_ACEOF
9360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009361$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009362int
9363main ()
9364{
9365static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9366test_array [0] = 0
9367
9368 ;
9369 return 0;
9370}
9371_ACEOF
9372rm -f conftest.$ac_objext
9373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009374 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009376 grep -v '^ *+' conftest.er1 >conftest.err
9377 rm -f conftest.er1
9378 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9380 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009381 { ac_try='test -z "$ac_c_werror_flag"
9382 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9384 (eval $ac_try) 2>&5
9385 ac_status=$?
9386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9387 (exit $ac_status); }; } &&
9388 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9394 ac_hi=$ac_mid
9395else
9396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009397sed 's/^/| /' conftest.$ac_ext >&5
9398
Martin v. Löwis11437992002-04-12 09:54:03 +00009399ac_lo=`expr '(' $ac_mid ')' + 1`
9400fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009402done
9403case $ac_lo in
9404?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009405'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9406See \`config.log' for more details." >&5
9407echo "$as_me: error: cannot compute sizeof (long long), 77
9408See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 { (exit 1); exit 1; }; } ;;
9410esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009411else
9412 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009413 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9414See \`config.log' for more details." >&5
9415echo "$as_me: error: cannot run test program while cross compiling
9416See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009418else
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009420/* confdefs.h. */
9421_ACEOF
9422cat confdefs.h >>conftest.$ac_ext
9423cat >>conftest.$ac_ext <<_ACEOF
9424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009425$ac_includes_default
9426long longval () { return (long) (sizeof (long long)); }
9427unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009428#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009429#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009430int
9431main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009432{
Martin v. Löwis11437992002-04-12 09:54:03 +00009433
9434 FILE *f = fopen ("conftest.val", "w");
9435 if (! f)
9436 exit (1);
9437 if (((long) (sizeof (long long))) < 0)
9438 {
9439 long i = longval ();
9440 if (i != ((long) (sizeof (long long))))
9441 exit (1);
9442 fprintf (f, "%ld\n", i);
9443 }
9444 else
9445 {
9446 unsigned long i = ulongval ();
9447 if (i != ((long) (sizeof (long long))))
9448 exit (1);
9449 fprintf (f, "%lu\n", i);
9450 }
9451 exit (ferror (f) || fclose (f) != 0);
9452
9453 ;
9454 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009455}
Martin v. Löwis11437992002-04-12 09:54:03 +00009456_ACEOF
9457rm -f conftest$ac_exeext
9458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9459 (eval $ac_link) 2>&5
9460 ac_status=$?
9461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9464 (eval $ac_try) 2>&5
9465 ac_status=$?
9466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467 (exit $ac_status); }; }; then
9468 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009469else
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 echo "$as_me: program exited with status $ac_status" >&5
9471echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009472sed 's/^/| /' conftest.$ac_ext >&5
9473
Martin v. Löwis11437992002-04-12 09:54:03 +00009474( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009475{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9476See \`config.log' for more details." >&5
9477echo "$as_me: error: cannot compute sizeof (long long), 77
9478See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 { (exit 1); exit 1; }; }
9480fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009481rm -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 +00009482fi
9483fi
9484rm -f conftest.val
9485else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009486 ac_cv_sizeof_long_long=0
9487fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009488fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009489echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9490echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9491cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009492#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009493_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009494
Michael W. Hudson54241132001-12-07 15:38:26 +00009495
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009496fi
9497
Martin v. Löwis11437992002-04-12 09:54:03 +00009498echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9499echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009500have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009501cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009502/* confdefs.h. */
9503_ACEOF
9504cat confdefs.h >>conftest.$ac_ext
9505cat >>conftest.$ac_ext <<_ACEOF
9506/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009507
Martin v. Löwis11437992002-04-12 09:54:03 +00009508int
9509main ()
9510{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009511uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 ;
9513 return 0;
9514}
9515_ACEOF
9516rm -f conftest.$ac_objext
9517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009518 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009520 grep -v '^ *+' conftest.er1 >conftest.err
9521 rm -f conftest.er1
9522 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9524 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009525 { ac_try='test -z "$ac_c_werror_flag"
9526 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9528 (eval $ac_try) 2>&5
9529 ac_status=$?
9530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9531 (exit $ac_status); }; } &&
9532 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9538
9539
9540cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009541#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009542_ACEOF
9543
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009544 have_uintptr_t=yes
9545
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009546else
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009548sed 's/^/| /' conftest.$ac_ext >&5
9549
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009550fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009551rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009552echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9553echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009554if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009555echo "$as_me:$LINENO: checking for uintptr_t" >&5
9556echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9557if test "${ac_cv_type_uintptr_t+set}" = set; then
9558 echo $ECHO_N "(cached) $ECHO_C" >&6
9559else
9560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009561/* confdefs.h. */
9562_ACEOF
9563cat confdefs.h >>conftest.$ac_ext
9564cat >>conftest.$ac_ext <<_ACEOF
9565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009566$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009567int
9568main ()
9569{
9570if ((uintptr_t *) 0)
9571 return 0;
9572if (sizeof (uintptr_t))
9573 return 0;
9574 ;
9575 return 0;
9576}
9577_ACEOF
9578rm -f conftest.$ac_objext
9579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009580 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009582 grep -v '^ *+' conftest.er1 >conftest.err
9583 rm -f conftest.er1
9584 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9586 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009587 { ac_try='test -z "$ac_c_werror_flag"
9588 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9590 (eval $ac_try) 2>&5
9591 ac_status=$?
9592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9593 (exit $ac_status); }; } &&
9594 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9600 ac_cv_type_uintptr_t=yes
9601else
9602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009603sed 's/^/| /' conftest.$ac_ext >&5
9604
Martin v. Löwis11437992002-04-12 09:54:03 +00009605ac_cv_type_uintptr_t=no
9606fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009607rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009608fi
9609echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9610echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9611
9612echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9613echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9614if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9615 echo $ECHO_N "(cached) $ECHO_C" >&6
9616else
9617 if test "$ac_cv_type_uintptr_t" = yes; then
9618 # The cast to unsigned long works around a bug in the HP C Compiler
9619 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9620 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9621 # This bug is HP SR number 8606223364.
9622 if test "$cross_compiling" = yes; then
9623 # Depending upon the size, compute the lo and hi bounds.
9624cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* confdefs.h. */
9626_ACEOF
9627cat confdefs.h >>conftest.$ac_ext
9628cat >>conftest.$ac_ext <<_ACEOF
9629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009630$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009631int
9632main ()
9633{
9634static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9635test_array [0] = 0
9636
9637 ;
9638 return 0;
9639}
9640_ACEOF
9641rm -f conftest.$ac_objext
9642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009643 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009645 grep -v '^ *+' conftest.er1 >conftest.err
9646 rm -f conftest.er1
9647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009650 { ac_try='test -z "$ac_c_werror_flag"
9651 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9653 (eval $ac_try) 2>&5
9654 ac_status=$?
9655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9656 (exit $ac_status); }; } &&
9657 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9663 ac_lo=0 ac_mid=0
9664 while :; do
9665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009666/* confdefs.h. */
9667_ACEOF
9668cat confdefs.h >>conftest.$ac_ext
9669cat >>conftest.$ac_ext <<_ACEOF
9670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009671$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009672int
9673main ()
9674{
9675static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9676test_array [0] = 0
9677
9678 ;
9679 return 0;
9680}
9681_ACEOF
9682rm -f conftest.$ac_objext
9683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009684 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009686 grep -v '^ *+' conftest.er1 >conftest.err
9687 rm -f conftest.er1
9688 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9690 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009691 { ac_try='test -z "$ac_c_werror_flag"
9692 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9694 (eval $ac_try) 2>&5
9695 ac_status=$?
9696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9697 (exit $ac_status); }; } &&
9698 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9704 ac_hi=$ac_mid; break
9705else
9706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009707sed 's/^/| /' conftest.$ac_ext >&5
9708
Martin v. Löwis11437992002-04-12 09:54:03 +00009709ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009710 if test $ac_lo -le $ac_mid; then
9711 ac_lo= ac_hi=
9712 break
9713 fi
9714 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009715fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009716rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 done
9718else
9719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009720sed 's/^/| /' conftest.$ac_ext >&5
9721
Martin v. Löwis11437992002-04-12 09:54:03 +00009722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009723/* confdefs.h. */
9724_ACEOF
9725cat confdefs.h >>conftest.$ac_ext
9726cat >>conftest.$ac_ext <<_ACEOF
9727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009728$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009729int
9730main ()
9731{
9732static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9733test_array [0] = 0
9734
9735 ;
9736 return 0;
9737}
9738_ACEOF
9739rm -f conftest.$ac_objext
9740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009741 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009743 grep -v '^ *+' conftest.er1 >conftest.err
9744 rm -f conftest.er1
9745 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9747 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009748 { ac_try='test -z "$ac_c_werror_flag"
9749 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9751 (eval $ac_try) 2>&5
9752 ac_status=$?
9753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9754 (exit $ac_status); }; } &&
9755 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9761 ac_hi=-1 ac_mid=-1
9762 while :; do
9763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009764/* confdefs.h. */
9765_ACEOF
9766cat confdefs.h >>conftest.$ac_ext
9767cat >>conftest.$ac_ext <<_ACEOF
9768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009769$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009770int
9771main ()
9772{
9773static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9774test_array [0] = 0
9775
9776 ;
9777 return 0;
9778}
9779_ACEOF
9780rm -f conftest.$ac_objext
9781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009782 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009784 grep -v '^ *+' conftest.er1 >conftest.err
9785 rm -f conftest.er1
9786 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9788 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009789 { ac_try='test -z "$ac_c_werror_flag"
9790 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9792 (eval $ac_try) 2>&5
9793 ac_status=$?
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9795 (exit $ac_status); }; } &&
9796 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9802 ac_lo=$ac_mid; break
9803else
9804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009805sed 's/^/| /' conftest.$ac_ext >&5
9806
Martin v. Löwis11437992002-04-12 09:54:03 +00009807ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009808 if test $ac_mid -le $ac_hi; then
9809 ac_lo= ac_hi=
9810 break
9811 fi
9812 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009813fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 done
9816else
9817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009818sed 's/^/| /' conftest.$ac_ext >&5
9819
Martin v. Löwis11437992002-04-12 09:54:03 +00009820ac_lo= ac_hi=
9821fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009822rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009823fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009824rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009825# Binary search between lo and hi bounds.
9826while test "x$ac_lo" != "x$ac_hi"; do
9827 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* confdefs.h. */
9830_ACEOF
9831cat confdefs.h >>conftest.$ac_ext
9832cat >>conftest.$ac_ext <<_ACEOF
9833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009834$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009835int
9836main ()
9837{
9838static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9839test_array [0] = 0
9840
9841 ;
9842 return 0;
9843}
9844_ACEOF
9845rm -f conftest.$ac_objext
9846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009847 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009849 grep -v '^ *+' conftest.er1 >conftest.err
9850 rm -f conftest.er1
9851 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9853 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009854 { ac_try='test -z "$ac_c_werror_flag"
9855 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9857 (eval $ac_try) 2>&5
9858 ac_status=$?
9859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860 (exit $ac_status); }; } &&
9861 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
9867 ac_hi=$ac_mid
9868else
9869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009870sed 's/^/| /' conftest.$ac_ext >&5
9871
Martin v. Löwis11437992002-04-12 09:54:03 +00009872ac_lo=`expr '(' $ac_mid ')' + 1`
9873fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009874rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009875done
9876case $ac_lo in
9877?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009878'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9879See \`config.log' for more details." >&5
9880echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9881See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 { (exit 1); exit 1; }; } ;;
9883esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009884else
9885 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009886 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9887See \`config.log' for more details." >&5
9888echo "$as_me: error: cannot run test program while cross compiling
9889See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009891else
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009893/* confdefs.h. */
9894_ACEOF
9895cat confdefs.h >>conftest.$ac_ext
9896cat >>conftest.$ac_ext <<_ACEOF
9897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009898$ac_includes_default
9899long longval () { return (long) (sizeof (uintptr_t)); }
9900unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009901#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009902#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009903int
9904main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009905{
Martin v. Löwis11437992002-04-12 09:54:03 +00009906
9907 FILE *f = fopen ("conftest.val", "w");
9908 if (! f)
9909 exit (1);
9910 if (((long) (sizeof (uintptr_t))) < 0)
9911 {
9912 long i = longval ();
9913 if (i != ((long) (sizeof (uintptr_t))))
9914 exit (1);
9915 fprintf (f, "%ld\n", i);
9916 }
9917 else
9918 {
9919 unsigned long i = ulongval ();
9920 if (i != ((long) (sizeof (uintptr_t))))
9921 exit (1);
9922 fprintf (f, "%lu\n", i);
9923 }
9924 exit (ferror (f) || fclose (f) != 0);
9925
9926 ;
9927 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009928}
Martin v. Löwis11437992002-04-12 09:54:03 +00009929_ACEOF
9930rm -f conftest$ac_exeext
9931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9932 (eval $ac_link) 2>&5
9933 ac_status=$?
9934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9935 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9937 (eval $ac_try) 2>&5
9938 ac_status=$?
9939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9940 (exit $ac_status); }; }; then
9941 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009942else
Martin v. Löwis11437992002-04-12 09:54:03 +00009943 echo "$as_me: program exited with status $ac_status" >&5
9944echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009945sed 's/^/| /' conftest.$ac_ext >&5
9946
Martin v. Löwis11437992002-04-12 09:54:03 +00009947( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009948{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9949See \`config.log' for more details." >&5
9950echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9951See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009952 { (exit 1); exit 1; }; }
9953fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009954rm -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 +00009955fi
9956fi
9957rm -f conftest.val
9958else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009959 ac_cv_sizeof_uintptr_t=0
9960fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009961fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009962echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9963echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9964cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009965#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009966_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009967
Michael W. Hudson54241132001-12-07 15:38:26 +00009968
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009969fi
9970
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009971# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009972echo "$as_me:$LINENO: checking size of off_t" >&5
9973echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9974if test "${ac_cv_sizeof_off_t+set}" = set; then
9975 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009976else
9977 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009978 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009979else
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009981/* confdefs.h. */
9982_ACEOF
9983cat confdefs.h >>conftest.$ac_ext
9984cat >>conftest.$ac_ext <<_ACEOF
9985/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009986#include <stdio.h>
9987#include <sys/types.h>
9988main()
9989{
9990 FILE *f=fopen("conftestval", "w");
9991 if (!f) exit(1);
9992 fprintf(f, "%d\n", sizeof(off_t));
9993 exit(0);
9994}
Martin v. Löwis11437992002-04-12 09:54:03 +00009995_ACEOF
9996rm -f conftest$ac_exeext
9997if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9998 (eval $ac_link) 2>&5
9999 ac_status=$?
10000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10003 (eval $ac_try) 2>&5
10004 ac_status=$?
10005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10006 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010007 ac_cv_sizeof_off_t=`cat conftestval`
10008else
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 echo "$as_me: program exited with status $ac_status" >&5
10010echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010011sed 's/^/| /' conftest.$ac_ext >&5
10012
Martin v. Löwis11437992002-04-12 09:54:03 +000010013( exit $ac_status )
10014ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010015fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010016rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010017fi
10018
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010019fi
10020
Martin v. Löwis11437992002-04-12 09:54:03 +000010021echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
10022echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
10023
10024cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010025#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010026_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010027
Michael W. Hudson54241132001-12-07 15:38:26 +000010028
Martin v. Löwis11437992002-04-12 09:54:03 +000010029echo "$as_me:$LINENO: checking whether to enable large file support" >&5
10030echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010031if test "$have_long_long" = yes -a \
10032 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
10033 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010034
Martin v. Löwis11437992002-04-12 09:54:03 +000010035cat >>confdefs.h <<\_ACEOF
10036#define HAVE_LARGEFILE_SUPPORT 1
10037_ACEOF
10038
10039 echo "$as_me:$LINENO: result: yes" >&5
10040echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010041else
Martin v. Löwis11437992002-04-12 09:54:03 +000010042 echo "$as_me:$LINENO: result: no" >&5
10043echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010044fi
10045
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010046# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010047echo "$as_me:$LINENO: checking size of time_t" >&5
10048echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
10049if test "${ac_cv_sizeof_time_t+set}" = set; then
10050 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010051else
10052 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010053 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010054else
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010056/* confdefs.h. */
10057_ACEOF
10058cat confdefs.h >>conftest.$ac_ext
10059cat >>conftest.$ac_ext <<_ACEOF
10060/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010061#include <stdio.h>
10062#include <time.h>
10063main()
10064{
10065 FILE *f=fopen("conftestval", "w");
10066 if (!f) exit(1);
10067 fprintf(f, "%d\n", sizeof(time_t));
10068 exit(0);
10069}
Martin v. Löwis11437992002-04-12 09:54:03 +000010070_ACEOF
10071rm -f conftest$ac_exeext
10072if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10073 (eval $ac_link) 2>&5
10074 ac_status=$?
10075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10076 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10078 (eval $ac_try) 2>&5
10079 ac_status=$?
10080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10081 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010082 ac_cv_sizeof_time_t=`cat conftestval`
10083else
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 echo "$as_me: program exited with status $ac_status" >&5
10085echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010086sed 's/^/| /' conftest.$ac_ext >&5
10087
Martin v. Löwis11437992002-04-12 09:54:03 +000010088( exit $ac_status )
10089ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010090fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010091rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010092fi
10093
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010094fi
10095
Martin v. Löwis11437992002-04-12 09:54:03 +000010096echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10097echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10098
10099cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010100#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010101_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010102
Michael W. Hudson54241132001-12-07 15:38:26 +000010103
10104
Trent Mick635f6fb2000-08-23 21:33:05 +000010105# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010106ac_save_cc="$CC"
10107if test "$ac_cv_kpthread" = "yes"
10108then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010109elif test "$ac_cv_kthread" = "yes"
10110then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010111elif test "$ac_cv_pthread" = "yes"
10112then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010114echo "$as_me:$LINENO: checking for pthread_t" >&5
10115echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010116have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010117cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010118/* confdefs.h. */
10119_ACEOF
10120cat confdefs.h >>conftest.$ac_ext
10121cat >>conftest.$ac_ext <<_ACEOF
10122/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010123#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010124int
10125main ()
10126{
Guido van Rossum12580492000-09-24 16:47:19 +000010127pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010128 ;
10129 return 0;
10130}
10131_ACEOF
10132rm -f conftest.$ac_objext
10133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010134 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010136 grep -v '^ *+' conftest.er1 >conftest.err
10137 rm -f conftest.er1
10138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10140 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010141 { ac_try='test -z "$ac_c_werror_flag"
10142 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10144 (eval $ac_try) 2>&5
10145 ac_status=$?
10146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147 (exit $ac_status); }; } &&
10148 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010154 have_pthread_t=yes
10155else
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010157sed 's/^/| /' conftest.$ac_ext >&5
10158
Trent Mick635f6fb2000-08-23 21:33:05 +000010159fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010160rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010161echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10162echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010163if test "$have_pthread_t" = yes ; then
10164 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10166echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10167 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10168 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010169else
10170 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010171 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010172else
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010174/* confdefs.h. */
10175_ACEOF
10176cat confdefs.h >>conftest.$ac_ext
10177cat >>conftest.$ac_ext <<_ACEOF
10178/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010179#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010180#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010181 main()
10182 {
10183 FILE *f=fopen("conftestval", "w");
10184 if (!f) exit(1);
10185 fprintf(f, "%d\n", sizeof(pthread_t));
10186 exit(0);
10187 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010188_ACEOF
10189rm -f conftest$ac_exeext
10190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10191 (eval $ac_link) 2>&5
10192 ac_status=$?
10193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10194 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10196 (eval $ac_try) 2>&5
10197 ac_status=$?
10198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10199 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010200 ac_cv_sizeof_pthread_t=`cat conftestval`
10201else
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 echo "$as_me: program exited with status $ac_status" >&5
10203echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010204sed 's/^/| /' conftest.$ac_ext >&5
10205
Martin v. Löwis11437992002-04-12 09:54:03 +000010206( exit $ac_status )
10207ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010208fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010209rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010210fi
10211
Trent Mick635f6fb2000-08-23 21:33:05 +000010212fi
10213
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10215echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10216
10217cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010218#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010219_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010220
10221fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010222CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010223
Martin v. Löwis11437992002-04-12 09:54:03 +000010224echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10225echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010226# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10227if test "${enable_toolbox_glue+set}" = set; then
10228 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010229
Martin v. Löwis11437992002-04-12 09:54:03 +000010230fi;
Jack Jansene578a632001-08-15 01:27:14 +000010231
10232if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010233then
Jack Jansene578a632001-08-15 01:27:14 +000010234 case $ac_sys_system/$ac_sys_release in
10235 Darwin/*)
10236 enable_toolbox_glue="yes";;
10237 *)
10238 enable_toolbox_glue="no";;
10239 esac
10240fi
10241case "$enable_toolbox_glue" in
10242yes)
Jack Jansene578a632001-08-15 01:27:14 +000010243 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010244 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010245
10246cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010247#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010248_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010249
10250 ;;
10251*)
Jack Jansene578a632001-08-15 01:27:14 +000010252 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010253 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010254 ;;
10255esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010256echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10257echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010258
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010259
10260case $ac_sys_system/$ac_sys_release in
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010261 Darwin/[01234567].*)
10262 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10263 ;;
10264 Darwin/*)
10265 OTHER_LIBTOOL_OPT=""
10266 ;;
10267esac
10268
10269
10270case $ac_sys_system/$ac_sys_release in
10271 Darwin/[01234567].*)
10272 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only ppc"
Jack Jansenb36687a2004-07-16 08:43:47 +000010273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010274 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010275 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010276 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10277 if test ${gcc_version} '<' 4.0
10278 then
10279 LIBTOOL_CRUFT="-lcc_dynamic"
10280 else
10281 LIBTOOL_CRUFT=""
10282 fi
10283 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
Jack Jansenb36687a2004-07-16 08:43:47 +000010284 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010285 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010286esac
10287
Martin v. Löwis11437992002-04-12 09:54:03 +000010288echo "$as_me:$LINENO: checking for --enable-framework" >&5
10289echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010290if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010291then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010292 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010294 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010295
Martin v. Löwis11437992002-04-12 09:54:03 +000010296cat >>confdefs.h <<\_ACEOF
10297#define WITH_NEXT_FRAMEWORK 1
10298_ACEOF
10299
10300 echo "$as_me:$LINENO: result: yes" >&5
10301echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010302else
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 echo "$as_me:$LINENO: result: no" >&5
10304echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010305fi
10306
Martin v. Löwis11437992002-04-12 09:54:03 +000010307echo "$as_me:$LINENO: checking for dyld" >&5
10308echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010309case $ac_sys_system/$ac_sys_release in
10310 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010311
Martin v. Löwis11437992002-04-12 09:54:03 +000010312cat >>confdefs.h <<\_ACEOF
10313#define WITH_DYLD 1
10314_ACEOF
10315
10316 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10317echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010318 ;;
10319 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 echo "$as_me:$LINENO: result: no" >&5
10321echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010322 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010323esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010324
Guido van Rossum0a516c91994-09-12 10:58:40 +000010325# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010326
Michael W. Hudson54241132001-12-07 15:38:26 +000010327
10328
10329
10330
Guido van Rossum0a516c91994-09-12 10:58:40 +000010331# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010332# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010333echo "$as_me:$LINENO: checking SO" >&5
10334echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010335if test -z "$SO"
10336then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010337 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010338 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010339 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010340 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010341 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010342else
10343 # this might also be a termcap variable, see #610332
10344 echo
10345 echo '====================================================================='
10346 echo '+ +'
10347 echo '+ WARNING: You have set SO in your environment. +'
10348 echo '+ Do you really mean to change the extension for shared libraries? +'
10349 echo '+ Continuing in 10 seconds to let you to ponder. +'
10350 echo '+ +'
10351 echo '====================================================================='
10352 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010354echo "$as_me:$LINENO: result: $SO" >&5
10355echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010356# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010357# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010358# (Shared libraries in this instance are shared modules to be loaded into
10359# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010360echo "$as_me:$LINENO: checking LDSHARED" >&5
10361echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010362if test -z "$LDSHARED"
10363then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010364 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010365 AIX*)
10366 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010367 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010368 ;;
10369 BeOS*)
10370 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010371 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010372 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010373 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010374 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010376 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010377 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010378 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010379 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010380 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010381 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010382 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010383 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10384 if test "$enable_framework" ; then
10385 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010386 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10387 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010388 else
10389 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010390 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010391 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010392 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010393 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10394 if test "$enable_framework" ; then
10395 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010396 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10397 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010398 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010399 # No framework, use the Python app as bundle-loader
10400 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010401 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010402 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010403 Darwin/*)
10404 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10405 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010406 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010407 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010408 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010409 then
10410 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10411 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010412 else
10413 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10414 if test "$enable_framework" ; then
10415 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010416 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10417 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010418 else
10419 # No framework, use the Python app as bundle-loader
10420 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10421 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10422 fi
10423 fi
10424 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010425 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010426 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010427 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010428 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010429 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010430 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010431 else
10432 LDSHARED="ld -Bshareable ${LDFLAGS}"
10433 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010434 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010435 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010436 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010437 then LDSHARED='$(CC) -shared'
10438 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010439 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010440 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010441 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010442 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010443 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010444 *) LDSHARED="ld";;
10445 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010447echo "$as_me:$LINENO: result: $LDSHARED" >&5
10448echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010449BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010450# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010451# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010452echo "$as_me:$LINENO: checking CCSHARED" >&5
10453echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010454if test -z "$CCSHARED"
10455then
Guido van Rossum07397971997-04-29 21:49:50 +000010456 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010457 SunOS*) if test "$GCC" = yes;
10458 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000010459 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010460 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010461 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010462 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010463 else CCSHARED="+z";
10464 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010465 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010466 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010467 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010468 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010469 if test "$GCC" = "yes"
10470 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010471 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010472 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010473 SCO_SV*)
10474 if test "$GCC" = "yes"
10475 then CCSHARED="-fPIC"
10476 else CCSHARED="-Kpic -belf"
10477 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010478 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010479 IRIX*/6*) case $CC in
10480 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010481 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010482 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010483 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010484 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010486echo "$as_me:$LINENO: result: $CCSHARED" >&5
10487echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010488# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010489# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010490echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10491echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010492if test -z "$LINKFORSHARED"
10493then
Guido van Rossum07397971997-04-29 21:49:50 +000010494 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010495 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010496 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010497 LINKFORSHARED="-Wl,-E -Wl,+s";;
10498# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010499 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010500 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010501 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010503 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
10504 # which is
Jack Jansene578a632001-08-15 01:27:14 +000010505 # not used by the core itself but which needs to be in the core so
10506 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010507 # -prebind is no longer used, because it actually seems to give a
10508 # slowdown in stead of a speedup, maybe due to the large number of
10509 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010510
10511 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000010512 if test "$enable_framework"
10513 then
Jack Jansenda49e192005-01-07 13:08:22 +000010514 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010515 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010516 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010517 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010518 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010519 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010520 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010521 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10522 then
10523 LINKFORSHARED="-Wl,--export-dynamic"
10524 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010525 SunOS/5*) case $CC in
10526 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010527 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010528 then
10529 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010530 fi;;
10531 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010532 CYGWIN*)
10533 if test $enable_shared = "no"
10534 then
10535 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10536 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010537 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010538fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010539echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10540echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010541
Michael W. Hudson54241132001-12-07 15:38:26 +000010542
Martin v. Löwis11437992002-04-12 09:54:03 +000010543echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10544echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010545if test ! "$LIBRARY" = "$LDLIBRARY"
10546then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010547 case $ac_sys_system in
10548 CYGWIN*)
10549 # Cygwin needs CCSHARED when building extension DLLs
10550 # but not when building the interpreter DLL.
10551 CFLAGSFORSHARED='';;
10552 *)
10553 CFLAGSFORSHARED='$(CCSHARED)'
10554 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010555fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010556echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10557echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010558
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010559# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10560# library (with --enable-shared).
10561# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010562# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10563# if it is not required, since it creates a dependency of the shared library
10564# to LIBS. This, in turn, means that applications linking the shared libpython
10565# don't need to link LIBS explicitly. The default should be only changed
10566# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010567
10568echo "$as_me:$LINENO: checking SHLIBS" >&5
10569echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10570case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010571 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010572 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010573esac
10574echo "$as_me:$LINENO: result: $SHLIBS" >&5
10575echo "${ECHO_T}$SHLIBS" >&6
10576
10577
Guido van Rossum627b2d71993-12-24 10:39:16 +000010578# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010579
10580echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10581echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10582if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10583 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010584else
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010586LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010588/* confdefs.h. */
10589_ACEOF
10590cat confdefs.h >>conftest.$ac_ext
10591cat >>conftest.$ac_ext <<_ACEOF
10592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010593
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010594/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010595#ifdef __cplusplus
10596extern "C"
10597#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010598/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010599 builtin and then its argument prototype would still apply. */
10600char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010601int
10602main ()
10603{
10604dlopen ();
10605 ;
10606 return 0;
10607}
10608_ACEOF
10609rm -f conftest.$ac_objext conftest$ac_exeext
10610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010611 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010613 grep -v '^ *+' conftest.er1 >conftest.err
10614 rm -f conftest.er1
10615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10617 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010618 { ac_try='test -z "$ac_c_werror_flag"
10619 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10621 (eval $ac_try) 2>&5
10622 ac_status=$?
10623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10624 (exit $ac_status); }; } &&
10625 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
10631 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010632else
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010634sed 's/^/| /' conftest.$ac_ext >&5
10635
Martin v. Löwis11437992002-04-12 09:54:03 +000010636ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010637fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010638rm -f conftest.err conftest.$ac_objext \
10639 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010640LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010641fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010642echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10643echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10644if test $ac_cv_lib_dl_dlopen = yes; then
10645 cat >>confdefs.h <<_ACEOF
10646#define HAVE_LIBDL 1
10647_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010648
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010649 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010650
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010651fi
10652 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
10654echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10655echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10656if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010658else
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010660LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010662/* confdefs.h. */
10663_ACEOF
10664cat confdefs.h >>conftest.$ac_ext
10665cat >>conftest.$ac_ext <<_ACEOF
10666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010667
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010668/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010669#ifdef __cplusplus
10670extern "C"
10671#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010672/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010673 builtin and then its argument prototype would still apply. */
10674char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010675int
10676main ()
10677{
10678shl_load ();
10679 ;
10680 return 0;
10681}
10682_ACEOF
10683rm -f conftest.$ac_objext conftest$ac_exeext
10684if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010685 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010687 grep -v '^ *+' conftest.er1 >conftest.err
10688 rm -f conftest.er1
10689 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10691 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010692 { ac_try='test -z "$ac_c_werror_flag"
10693 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10695 (eval $ac_try) 2>&5
10696 ac_status=$?
10697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698 (exit $ac_status); }; } &&
10699 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
10705 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010706else
Martin v. Löwis11437992002-04-12 09:54:03 +000010707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010708sed 's/^/| /' conftest.$ac_ext >&5
10709
Martin v. Löwis11437992002-04-12 09:54:03 +000010710ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010711fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010712rm -f conftest.err conftest.$ac_objext \
10713 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010714LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010716echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10717echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10718if test $ac_cv_lib_dld_shl_load = yes; then
10719 cat >>confdefs.h <<_ACEOF
10720#define HAVE_LIBDLD 1
10721_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010722
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010723 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010724
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010725fi
10726 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010727
10728# only check for sem_ini if thread support is requested
10729if test "$with_threads" = "yes" -o -z "$with_threads"; then
10730 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010731echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10732if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010734else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010735 ac_func_search_save_LIBS=$LIBS
10736ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010738/* confdefs.h. */
10739_ACEOF
10740cat confdefs.h >>conftest.$ac_ext
10741cat >>conftest.$ac_ext <<_ACEOF
10742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010743
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010744/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010745#ifdef __cplusplus
10746extern "C"
10747#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010748/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010749 builtin and then its argument prototype would still apply. */
10750char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010751int
10752main ()
10753{
10754sem_init ();
10755 ;
10756 return 0;
10757}
10758_ACEOF
10759rm -f conftest.$ac_objext conftest$ac_exeext
10760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010761 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010763 grep -v '^ *+' conftest.er1 >conftest.err
10764 rm -f conftest.er1
10765 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10767 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010768 { ac_try='test -z "$ac_c_werror_flag"
10769 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10771 (eval $ac_try) 2>&5
10772 ac_status=$?
10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10774 (exit $ac_status); }; } &&
10775 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010781 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010782else
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010784sed 's/^/| /' conftest.$ac_ext >&5
10785
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010786fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010787rm -f conftest.err conftest.$ac_objext \
10788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010789if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010790 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010791 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010793/* confdefs.h. */
10794_ACEOF
10795cat confdefs.h >>conftest.$ac_ext
10796cat >>conftest.$ac_ext <<_ACEOF
10797/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010798
10799/* Override any gcc2 internal prototype to avoid an error. */
10800#ifdef __cplusplus
10801extern "C"
10802#endif
10803/* We use char because int might match the return type of a gcc2
10804 builtin and then its argument prototype would still apply. */
10805char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010806int
10807main ()
10808{
10809sem_init ();
10810 ;
10811 return 0;
10812}
Martin v. Löwis11437992002-04-12 09:54:03 +000010813_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010814rm -f conftest.$ac_objext conftest$ac_exeext
10815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010816 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010818 grep -v '^ *+' conftest.er1 >conftest.err
10819 rm -f conftest.er1
10820 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10822 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010823 { ac_try='test -z "$ac_c_werror_flag"
10824 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10826 (eval $ac_try) 2>&5
10827 ac_status=$?
10828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10829 (exit $ac_status); }; } &&
10830 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +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); }; }; then
10836 ac_cv_search_sem_init="-l$ac_lib"
10837break
10838else
10839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010840sed 's/^/| /' conftest.$ac_ext >&5
10841
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010842fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010843rm -f conftest.err conftest.$ac_objext \
10844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010845 done
10846fi
10847LIBS=$ac_func_search_save_LIBS
10848fi
10849echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10850echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10851if test "$ac_cv_search_sem_init" != no; then
10852 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010853
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010854fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010855 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010856 # posix4 on Solaris 2.6
10857 # pthread (first!) on Linux
10858fi
10859
Martin v. Löwis19d17342003-06-14 21:03:05 +000010860# check if we need libintl for locale functions
10861echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10862echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10863if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10864 echo $ECHO_N "(cached) $ECHO_C" >&6
10865else
10866 ac_check_lib_save_LIBS=$LIBS
10867LIBS="-lintl $LIBS"
10868cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010869/* confdefs.h. */
10870_ACEOF
10871cat confdefs.h >>conftest.$ac_ext
10872cat >>conftest.$ac_ext <<_ACEOF
10873/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010874
10875/* Override any gcc2 internal prototype to avoid an error. */
10876#ifdef __cplusplus
10877extern "C"
10878#endif
10879/* We use char because int might match the return type of a gcc2
10880 builtin and then its argument prototype would still apply. */
10881char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010882int
10883main ()
10884{
10885textdomain ();
10886 ;
10887 return 0;
10888}
10889_ACEOF
10890rm -f conftest.$ac_objext conftest$ac_exeext
10891if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010892 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000010893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010894 grep -v '^ *+' conftest.er1 >conftest.err
10895 rm -f conftest.er1
10896 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10898 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010899 { ac_try='test -z "$ac_c_werror_flag"
10900 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10902 (eval $ac_try) 2>&5
10903 ac_status=$?
10904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10905 (exit $ac_status); }; } &&
10906 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +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); }; }; then
10912 ac_cv_lib_intl_textdomain=yes
10913else
10914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010915sed 's/^/| /' conftest.$ac_ext >&5
10916
Martin v. Löwis19d17342003-06-14 21:03:05 +000010917ac_cv_lib_intl_textdomain=no
10918fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010919rm -f conftest.err conftest.$ac_objext \
10920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010921LIBS=$ac_check_lib_save_LIBS
10922fi
10923echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10924echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10925if test $ac_cv_lib_intl_textdomain = yes; then
10926
10927cat >>confdefs.h <<\_ACEOF
10928#define WITH_LIBINTL 1
10929_ACEOF
10930
10931fi
10932
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010933
10934# checks for system dependent C++ extensions support
10935case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010936 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10937echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* confdefs.h. */
10940_ACEOF
10941cat confdefs.h >>conftest.$ac_ext
10942cat >>conftest.$ac_ext <<_ACEOF
10943/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010944#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010945int
10946main ()
10947{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010948loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010949 ;
10950 return 0;
10951}
10952_ACEOF
10953rm -f conftest.$ac_objext conftest$ac_exeext
10954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010955 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010957 grep -v '^ *+' conftest.er1 >conftest.err
10958 rm -f conftest.er1
10959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10961 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010962 { ac_try='test -z "$ac_c_werror_flag"
10963 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10965 (eval $ac_try) 2>&5
10966 ac_status=$?
10967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10968 (exit $ac_status); }; } &&
10969 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010975
Martin v. Löwis11437992002-04-12 09:54:03 +000010976cat >>confdefs.h <<\_ACEOF
10977#define AIX_GENUINE_CPLUSPLUS 1
10978_ACEOF
10979
10980 echo "$as_me:$LINENO: result: yes" >&5
10981echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010982else
Martin v. Löwis11437992002-04-12 09:54:03 +000010983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010984sed 's/^/| /' conftest.$ac_ext >&5
10985
Martin v. Löwis11437992002-04-12 09:54:03 +000010986echo "$as_me:$LINENO: result: no" >&5
10987echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010988fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010989rm -f conftest.err conftest.$ac_objext \
10990 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010991 *) ;;
10992esac
10993
Guido van Rossum70c7f481998-03-26 18:44:10 +000010994# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010995# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000010996echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10997echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10998if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10999 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011000else
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011002LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011003cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011004/* confdefs.h. */
11005_ACEOF
11006cat confdefs.h >>conftest.$ac_ext
11007cat >>conftest.$ac_ext <<_ACEOF
11008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011009
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011010/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011011#ifdef __cplusplus
11012extern "C"
11013#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011014/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 builtin and then its argument prototype would still apply. */
11016char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011017int
11018main ()
11019{
11020t_open ();
11021 ;
11022 return 0;
11023}
11024_ACEOF
11025rm -f conftest.$ac_objext conftest$ac_exeext
11026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011027 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011029 grep -v '^ *+' conftest.er1 >conftest.err
11030 rm -f conftest.er1
11031 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11033 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011034 { ac_try='test -z "$ac_c_werror_flag"
11035 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11037 (eval $ac_try) 2>&5
11038 ac_status=$?
11039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11040 (exit $ac_status); }; } &&
11041 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
11047 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011048else
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011050sed 's/^/| /' conftest.$ac_ext >&5
11051
Martin v. Löwis11437992002-04-12 09:54:03 +000011052ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011053fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011054rm -f conftest.err conftest.$ac_objext \
11055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011056LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011057fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011058echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11059echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11060if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011061 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011062fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011063 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011064echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11065echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11066if test "${ac_cv_lib_socket_socket+set}" = set; then
11067 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011068else
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011070LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011072/* confdefs.h. */
11073_ACEOF
11074cat confdefs.h >>conftest.$ac_ext
11075cat >>conftest.$ac_ext <<_ACEOF
11076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011077
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011078/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011079#ifdef __cplusplus
11080extern "C"
11081#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011082/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 builtin and then its argument prototype would still apply. */
11084char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011085int
11086main ()
11087{
11088socket ();
11089 ;
11090 return 0;
11091}
11092_ACEOF
11093rm -f conftest.$ac_objext conftest$ac_exeext
11094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011095 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011097 grep -v '^ *+' conftest.er1 >conftest.err
11098 rm -f conftest.er1
11099 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11101 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011102 { ac_try='test -z "$ac_c_werror_flag"
11103 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11105 (eval $ac_try) 2>&5
11106 ac_status=$?
11107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11108 (exit $ac_status); }; } &&
11109 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
11115 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011116else
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011118sed 's/^/| /' conftest.$ac_ext >&5
11119
Martin v. Löwis11437992002-04-12 09:54:03 +000011120ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011121fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011122rm -f conftest.err conftest.$ac_objext \
11123 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011124LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011126echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11127echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11128if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011129 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011130fi
11131 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011132
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011133case "$ac_sys_system" in
11134BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011135echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11136echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11137if test "${ac_cv_lib_net_socket+set}" = set; then
11138 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011139else
Martin v. Löwis11437992002-04-12 09:54:03 +000011140 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011141LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011143/* confdefs.h. */
11144_ACEOF
11145cat confdefs.h >>conftest.$ac_ext
11146cat >>conftest.$ac_ext <<_ACEOF
11147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
Guido van Rossumad678af1998-10-02 14:42:15 +000011149/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011150#ifdef __cplusplus
11151extern "C"
11152#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011153/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 builtin and then its argument prototype would still apply. */
11155char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011156int
11157main ()
11158{
11159socket ();
11160 ;
11161 return 0;
11162}
11163_ACEOF
11164rm -f conftest.$ac_objext conftest$ac_exeext
11165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011166 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011168 grep -v '^ *+' conftest.er1 >conftest.err
11169 rm -f conftest.er1
11170 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11172 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011173 { ac_try='test -z "$ac_c_werror_flag"
11174 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11176 (eval $ac_try) 2>&5
11177 ac_status=$?
11178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11179 (exit $ac_status); }; } &&
11180 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
11186 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011187else
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011189sed 's/^/| /' conftest.$ac_ext >&5
11190
Martin v. Löwis11437992002-04-12 09:54:03 +000011191ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011192fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011193rm -f conftest.err conftest.$ac_objext \
11194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011195LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011197echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11198echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11199if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011200 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011201fi
11202 # BeOS
11203;;
11204esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011205
Martin v. Löwis11437992002-04-12 09:54:03 +000011206echo "$as_me:$LINENO: checking for --with-libs" >&5
11207echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11208
Guido van Rossuma68acba1996-07-31 17:36:39 +000011209# Check whether --with-libs or --without-libs was given.
11210if test "${with_libs+set}" = set; then
11211 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011212
11213echo "$as_me:$LINENO: result: $withval" >&5
11214echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011215LIBS="$withval $LIBS"
11216
11217else
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 echo "$as_me:$LINENO: result: no" >&5
11219echo "${ECHO_T}no" >&6
11220fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011221
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011222# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011223
11224
Martin v. Löwis11437992002-04-12 09:54:03 +000011225echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11226echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11227
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011228# Check whether --with-signal-module or --without-signal-module was given.
11229if test "${with_signal_module+set}" = set; then
11230 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011231
Martin v. Löwis11437992002-04-12 09:54:03 +000011232fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011233
11234if test -z "$with_signal_module"
11235then with_signal_module="yes"
11236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011237echo "$as_me:$LINENO: result: $with_signal_module" >&5
11238echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011239
11240if test "${with_signal_module}" = "yes"; then
11241 USE_SIGNAL_MODULE=""
11242 SIGNAL_OBJS=""
11243else
11244 USE_SIGNAL_MODULE="#"
11245 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11246fi
11247
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011248# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011249
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011250USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011251
Martin v. Löwis11437992002-04-12 09:54:03 +000011252echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11253echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11254
Guido van Rossumec2f0731997-01-22 20:54:01 +000011255
11256# Check whether --with-dec-threads or --without-dec-threads was given.
11257if test "${with_dec_threads+set}" = set; then
11258 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011259
11260echo "$as_me:$LINENO: result: $withval" >&5
11261echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011262LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011263if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011264 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011265fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011266else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 echo "$as_me:$LINENO: result: no" >&5
11268echo "${ECHO_T}no" >&6
11269fi;
11270
11271# Templates for things AC_DEFINEd more than once.
11272# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011273
11274
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
11276
11277
11278
11279
11280echo "$as_me:$LINENO: checking for --with-threads" >&5
11281echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11282
Guido van Rossumec2f0731997-01-22 20:54:01 +000011283# Check whether --with-threads or --without-threads was given.
11284if test "${with_threads+set}" = set; then
11285 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011286
Martin v. Löwis11437992002-04-12 09:54:03 +000011287fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011288
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011289# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011290
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011291# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011292if test "${with_thread+set}" = set; then
11293 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011294 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011295fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011296
11297if test -z "$with_threads"
11298then with_threads="yes"
11299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011300echo "$as_me:$LINENO: result: $with_threads" >&5
11301echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011302
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011303
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011304if test "$with_threads" = "no"
11305then
11306 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011307elif test "$ac_cv_pthread_is_default" = yes
11308then
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011310#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011311_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011312
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011313 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011315#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011316_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011317
11318 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011319 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011320elif test "$ac_cv_kpthread" = "yes"
11321then
11322 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011323 if test "$ac_cv_cxx_thread" = "yes"; then
11324 CXX="$CXX -Kpthread"
11325 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011327#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011328_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011329
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011330 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011331 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011332elif test "$ac_cv_kthread" = "yes"
11333then
11334 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011335 if test "$ac_cv_cxx_thread" = "yes"; then
11336 CXX="$CXX -Kthread"
11337 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011338 cat >>confdefs.h <<\_ACEOF
11339#define WITH_THREAD 1
11340_ACEOF
11341
11342 posix_threads=yes
11343 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011344elif test "$ac_cv_pthread" = "yes"
11345then
11346 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011347 if test "$ac_cv_cxx_thread" = "yes"; then
11348 CXX="$CXX -pthread"
11349 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011350 cat >>confdefs.h <<\_ACEOF
11351#define WITH_THREAD 1
11352_ACEOF
11353
11354 posix_threads=yes
11355 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011356else
11357 if test ! -z "$with_threads" -a -d "$with_threads"
11358 then LDFLAGS="$LDFLAGS -L$with_threads"
11359 fi
11360 if test ! -z "$withval" -a -d "$withval"
11361 then LDFLAGS="$LDFLAGS -L$withval"
11362 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011363
11364 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011365 # define _POSIX_THREADS in unistd.h. Some apparently don't
11366 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11368echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* confdefs.h. */
11371_ACEOF
11372cat confdefs.h >>conftest.$ac_ext
11373cat >>conftest.$ac_ext <<_ACEOF
11374/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011375
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011376#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011377#ifdef _POSIX_THREADS
11378yes
11379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011380
11381_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011383 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011384 unistd_defines_pthreads=yes
11385else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011386 unistd_defines_pthreads=no
11387fi
11388rm -f conftest*
11389
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11391echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011392
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011394#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011395_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011396
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 if test "${ac_cv_header_cthreads_h+set}" = set; then
11398 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11399echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11400if test "${ac_cv_header_cthreads_h+set}" = set; then
11401 echo $ECHO_N "(cached) $ECHO_C" >&6
11402fi
11403echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11404echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011405else
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 # Is the header compilable?
11407echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11408echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11409cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011410/* confdefs.h. */
11411_ACEOF
11412cat confdefs.h >>conftest.$ac_ext
11413cat >>conftest.$ac_ext <<_ACEOF
11414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011415$ac_includes_default
11416#include <cthreads.h>
11417_ACEOF
11418rm -f conftest.$ac_objext
11419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011420 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011422 grep -v '^ *+' conftest.er1 >conftest.err
11423 rm -f conftest.er1
11424 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11426 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011427 { ac_try='test -z "$ac_c_werror_flag"
11428 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11430 (eval $ac_try) 2>&5
11431 ac_status=$?
11432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11433 (exit $ac_status); }; } &&
11434 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
11440 ac_header_compiler=yes
11441else
11442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011443sed 's/^/| /' conftest.$ac_ext >&5
11444
Martin v. Löwis11437992002-04-12 09:54:03 +000011445ac_header_compiler=no
11446fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011447rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011448echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11449echo "${ECHO_T}$ac_header_compiler" >&6
11450
11451# Is the header present?
11452echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11453echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11454cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011455/* confdefs.h. */
11456_ACEOF
11457cat confdefs.h >>conftest.$ac_ext
11458cat >>conftest.$ac_ext <<_ACEOF
11459/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011460#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011461_ACEOF
11462if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11463 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11464 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011465 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 rm -f conftest.er1
11467 cat conftest.err >&5
11468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469 (exit $ac_status); } >/dev/null; then
11470 if test -s conftest.err; then
11471 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011472 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 else
11474 ac_cpp_err=
11475 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011476else
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 ac_cpp_err=yes
11478fi
11479if test -z "$ac_cpp_err"; then
11480 ac_header_preproc=yes
11481else
11482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011483sed 's/^/| /' conftest.$ac_ext >&5
11484
Martin v. Löwis11437992002-04-12 09:54:03 +000011485 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011487rm -f conftest.err conftest.$ac_ext
11488echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11489echo "${ECHO_T}$ac_header_preproc" >&6
11490
11491# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011492case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11493 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011494 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11495echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011496 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11497echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11498 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011499 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011500 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011501 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11502echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011503 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11504echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11505 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11506echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11507 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11508echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011509 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11510echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011511 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11512echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011513 (
11514 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011515## ------------------------------------------------ ##
11516## Report this to http://www.python.org/python-bugs ##
11517## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011518_ASBOX
11519 ) |
11520 sed "s/^/$as_me: WARNING: /" >&2
11521 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011522esac
11523echo "$as_me:$LINENO: checking for cthreads.h" >&5
11524echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11525if test "${ac_cv_header_cthreads_h+set}" = set; then
11526 echo $ECHO_N "(cached) $ECHO_C" >&6
11527else
11528 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011529fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011530echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11531echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11532
11533fi
11534if test $ac_cv_header_cthreads_h = yes; then
11535 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011536#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011537_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011538
Martin v. Löwis11437992002-04-12 09:54:03 +000011539 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011540#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011541_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011542
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
11544cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011545#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011546_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011547
11548 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011549 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011550else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011551
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11553 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11554echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11555if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11556 echo $ECHO_N "(cached) $ECHO_C" >&6
11557fi
11558echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11559echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011560else
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 # Is the header compilable?
11562echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11563echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011565/* confdefs.h. */
11566_ACEOF
11567cat confdefs.h >>conftest.$ac_ext
11568cat >>conftest.$ac_ext <<_ACEOF
11569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011570$ac_includes_default
11571#include <mach/cthreads.h>
11572_ACEOF
11573rm -f conftest.$ac_objext
11574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011575 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011577 grep -v '^ *+' conftest.er1 >conftest.err
11578 rm -f conftest.er1
11579 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11581 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011582 { ac_try='test -z "$ac_c_werror_flag"
11583 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11585 (eval $ac_try) 2>&5
11586 ac_status=$?
11587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11588 (exit $ac_status); }; } &&
11589 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
11595 ac_header_compiler=yes
11596else
11597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011598sed 's/^/| /' conftest.$ac_ext >&5
11599
Martin v. Löwis11437992002-04-12 09:54:03 +000011600ac_header_compiler=no
11601fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011603echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11604echo "${ECHO_T}$ac_header_compiler" >&6
11605
11606# Is the header present?
11607echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11608echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011610/* confdefs.h. */
11611_ACEOF
11612cat confdefs.h >>conftest.$ac_ext
11613cat >>conftest.$ac_ext <<_ACEOF
11614/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011615#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011616_ACEOF
11617if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11618 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11619 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011620 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011621 rm -f conftest.er1
11622 cat conftest.err >&5
11623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11624 (exit $ac_status); } >/dev/null; then
11625 if test -s conftest.err; then
11626 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011627 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 else
11629 ac_cpp_err=
11630 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011631else
Martin v. Löwis11437992002-04-12 09:54:03 +000011632 ac_cpp_err=yes
11633fi
11634if test -z "$ac_cpp_err"; then
11635 ac_header_preproc=yes
11636else
11637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011638sed 's/^/| /' conftest.$ac_ext >&5
11639
Martin v. Löwis11437992002-04-12 09:54:03 +000011640 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011641fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011642rm -f conftest.err conftest.$ac_ext
11643echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11644echo "${ECHO_T}$ac_header_preproc" >&6
11645
11646# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011647case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11648 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11650echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011651 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
11652echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
11653 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011654 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011655 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011656 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11657echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011658 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11659echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11660 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
11661echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
11662 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11663echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011664 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
11665echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011666 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
11667echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011668 (
11669 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011670## ------------------------------------------------ ##
11671## Report this to http://www.python.org/python-bugs ##
11672## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011673_ASBOX
11674 ) |
11675 sed "s/^/$as_me: WARNING: /" >&2
11676 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011677esac
11678echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11679echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11680if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11681 echo $ECHO_N "(cached) $ECHO_C" >&6
11682else
11683 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011684fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011685echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11686echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11687
11688fi
11689if test $ac_cv_header_mach_cthreads_h = yes; then
11690 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011691#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011692_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011693
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011695#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011696_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011697
Martin v. Löwis11437992002-04-12 09:54:03 +000011698
11699cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011700#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011701_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011702
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011703 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011704else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011705
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 echo "$as_me:$LINENO: checking for --with-pth" >&5
11707echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11708
11709# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011710if test "${with_pth+set}" = set; then
11711 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011712 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011713echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011714 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011715#define WITH_THREAD 1
11716_ACEOF
11717
11718
11719cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011720#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011721_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011722
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011723 LIBS="-lpth $LIBS"
11724 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011725else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011726 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011727echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011728
11729 # Just looking for pthread_create in libpthread is not enough:
11730 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11731 # So we really have to include pthread.h, and then link.
11732 _libs=$LIBS
11733 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11735echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011737/* confdefs.h. */
11738_ACEOF
11739cat confdefs.h >>conftest.$ac_ext
11740cat >>conftest.$ac_ext <<_ACEOF
11741/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011742#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011743
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011744void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011745int
11746main ()
11747{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011748
11749pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011750 ;
11751 return 0;
11752}
11753_ACEOF
11754rm -f conftest.$ac_objext conftest$ac_exeext
11755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011756 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011758 grep -v '^ *+' conftest.er1 >conftest.err
11759 rm -f conftest.er1
11760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11762 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011763 { ac_try='test -z "$ac_c_werror_flag"
11764 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11766 (eval $ac_try) 2>&5
11767 ac_status=$?
11768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11769 (exit $ac_status); }; } &&
11770 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
11776
11777 echo "$as_me:$LINENO: result: yes" >&5
11778echo "${ECHO_T}yes" >&6
11779 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011780#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011781_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011782
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011783 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011784 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011785else
Martin v. Löwis11437992002-04-12 09:54:03 +000011786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011787sed 's/^/| /' conftest.$ac_ext >&5
11788
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011790 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11792echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11793if test "${ac_cv_func_pthread_detach+set}" = set; then
11794 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011795else
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011797/* confdefs.h. */
11798_ACEOF
11799cat confdefs.h >>conftest.$ac_ext
11800cat >>conftest.$ac_ext <<_ACEOF
11801/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011802/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011803 which can conflict with char pthread_detach (); below.
11804 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011805 <limits.h> exists even on freestanding compilers. Under hpux,
11806 including <limits.h> includes <sys/time.h> and causes problems
11807 checking for functions defined therein. */
11808#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011809# include <limits.h>
11810#else
11811# include <assert.h>
11812#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011813/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011814#ifdef __cplusplus
11815extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011816{
Martin v. Löwis11437992002-04-12 09:54:03 +000011817#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011818/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011819 builtin and then its argument prototype would still apply. */
11820char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011821/* The GNU C library defines this for functions which it implements
11822 to always fail with ENOSYS. Some functions are actually named
11823 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011824#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011825choke me
11826#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011827char (*f) () = pthread_detach;
11828#endif
11829#ifdef __cplusplus
11830}
Guido van Rossumad678af1998-10-02 14:42:15 +000011831#endif
11832
Skip Montanaro6dead952003-09-25 14:50:04 +000011833int
11834main ()
11835{
11836return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 ;
11838 return 0;
11839}
11840_ACEOF
11841rm -f conftest.$ac_objext conftest$ac_exeext
11842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011843 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011845 grep -v '^ *+' conftest.er1 >conftest.err
11846 rm -f conftest.er1
11847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11849 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011850 { ac_try='test -z "$ac_c_werror_flag"
11851 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11853 (eval $ac_try) 2>&5
11854 ac_status=$?
11855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11856 (exit $ac_status); }; } &&
11857 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
11863 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011864else
Martin v. Löwis11437992002-04-12 09:54:03 +000011865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011866sed 's/^/| /' conftest.$ac_ext >&5
11867
Martin v. Löwis11437992002-04-12 09:54:03 +000011868ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011869fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011870rm -f conftest.err conftest.$ac_objext \
11871 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011873echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11874echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11875if test $ac_cv_func_pthread_detach = yes; then
11876 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011877#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011878_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011879
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011880 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011881 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011882else
Guido van Rossumad678af1998-10-02 14:42:15 +000011883
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011884 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11885 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11886echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11887if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11888 echo $ECHO_N "(cached) $ECHO_C" >&6
11889fi
11890echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11891echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11892else
11893 # Is the header compilable?
11894echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11895echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011897/* confdefs.h. */
11898_ACEOF
11899cat confdefs.h >>conftest.$ac_ext
11900cat >>conftest.$ac_ext <<_ACEOF
11901/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011902$ac_includes_default
11903#include <atheos/threads.h>
11904_ACEOF
11905rm -f conftest.$ac_objext
11906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011907 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011909 grep -v '^ *+' conftest.er1 >conftest.err
11910 rm -f conftest.er1
11911 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11913 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011914 { ac_try='test -z "$ac_c_werror_flag"
11915 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11917 (eval $ac_try) 2>&5
11918 ac_status=$?
11919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11920 (exit $ac_status); }; } &&
11921 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +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); }; }; then
11927 ac_header_compiler=yes
11928else
11929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011930sed 's/^/| /' conftest.$ac_ext >&5
11931
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011932ac_header_compiler=no
11933fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011935echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11936echo "${ECHO_T}$ac_header_compiler" >&6
11937
11938# Is the header present?
11939echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11940echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11941cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011942/* confdefs.h. */
11943_ACEOF
11944cat confdefs.h >>conftest.$ac_ext
11945cat >>conftest.$ac_ext <<_ACEOF
11946/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011947#include <atheos/threads.h>
11948_ACEOF
11949if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11950 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11951 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011952 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011953 rm -f conftest.er1
11954 cat conftest.err >&5
11955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11956 (exit $ac_status); } >/dev/null; then
11957 if test -s conftest.err; then
11958 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011959 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011960 else
11961 ac_cpp_err=
11962 fi
11963else
11964 ac_cpp_err=yes
11965fi
11966if test -z "$ac_cpp_err"; then
11967 ac_header_preproc=yes
11968else
11969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011970sed 's/^/| /' conftest.$ac_ext >&5
11971
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011972 ac_header_preproc=no
11973fi
11974rm -f conftest.err conftest.$ac_ext
11975echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11976echo "${ECHO_T}$ac_header_preproc" >&6
11977
11978# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011979case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11980 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011981 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11982echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
11984echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
11985 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011986 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011987 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011988 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11989echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011990 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11991echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11992 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
11993echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
11994 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
11995echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011996 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
11997echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011998 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
11999echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012000 (
12001 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012002## ------------------------------------------------ ##
12003## Report this to http://www.python.org/python-bugs ##
12004## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012005_ASBOX
12006 ) |
12007 sed "s/^/$as_me: WARNING: /" >&2
12008 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012009esac
12010echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12011echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12012if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12013 echo $ECHO_N "(cached) $ECHO_C" >&6
12014else
12015 ac_cv_header_atheos_threads_h=$ac_header_preproc
12016fi
12017echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12018echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12019
12020fi
12021if test $ac_cv_header_atheos_threads_h = yes; then
12022 cat >>confdefs.h <<\_ACEOF
12023#define WITH_THREAD 1
12024_ACEOF
12025
12026
12027cat >>confdefs.h <<\_ACEOF
12028#define ATHEOS_THREADS 1
12029_ACEOF
12030
12031 THREADOBJ="Python/thread.o"
12032else
12033
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12035 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12036echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12037if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12038 echo $ECHO_N "(cached) $ECHO_C" >&6
12039fi
12040echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12041echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012042else
Martin v. Löwis11437992002-04-12 09:54:03 +000012043 # Is the header compilable?
12044echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
12045echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
12046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012047/* confdefs.h. */
12048_ACEOF
12049cat confdefs.h >>conftest.$ac_ext
12050cat >>conftest.$ac_ext <<_ACEOF
12051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012052$ac_includes_default
12053#include <kernel/OS.h>
12054_ACEOF
12055rm -f conftest.$ac_objext
12056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012057 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012059 grep -v '^ *+' conftest.er1 >conftest.err
12060 rm -f conftest.er1
12061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12063 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012064 { ac_try='test -z "$ac_c_werror_flag"
12065 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12067 (eval $ac_try) 2>&5
12068 ac_status=$?
12069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12070 (exit $ac_status); }; } &&
12071 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
12077 ac_header_compiler=yes
12078else
12079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012080sed 's/^/| /' conftest.$ac_ext >&5
12081
Martin v. Löwis11437992002-04-12 09:54:03 +000012082ac_header_compiler=no
12083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012085echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12086echo "${ECHO_T}$ac_header_compiler" >&6
12087
12088# Is the header present?
12089echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12090echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012092/* confdefs.h. */
12093_ACEOF
12094cat confdefs.h >>conftest.$ac_ext
12095cat >>conftest.$ac_ext <<_ACEOF
12096/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012097#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012098_ACEOF
12099if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12100 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12101 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012102 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 rm -f conftest.er1
12104 cat conftest.err >&5
12105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12106 (exit $ac_status); } >/dev/null; then
12107 if test -s conftest.err; then
12108 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012109 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 else
12111 ac_cpp_err=
12112 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012113else
Martin v. Löwis11437992002-04-12 09:54:03 +000012114 ac_cpp_err=yes
12115fi
12116if test -z "$ac_cpp_err"; then
12117 ac_header_preproc=yes
12118else
12119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012120sed 's/^/| /' conftest.$ac_ext >&5
12121
Martin v. Löwis11437992002-04-12 09:54:03 +000012122 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012124rm -f conftest.err conftest.$ac_ext
12125echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12126echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012127
Martin v. Löwis11437992002-04-12 09:54:03 +000012128# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012129case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12130 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12132echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012133 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12134echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12135 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012136 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012137 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012138 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12139echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012140 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12141echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12142 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12143echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12144 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12145echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012146 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12147echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012148 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12149echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012150 (
12151 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012152## ------------------------------------------------ ##
12153## Report this to http://www.python.org/python-bugs ##
12154## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012155_ASBOX
12156 ) |
12157 sed "s/^/$as_me: WARNING: /" >&2
12158 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012159esac
12160echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12161echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12162if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12163 echo $ECHO_N "(cached) $ECHO_C" >&6
12164else
12165 ac_cv_header_kernel_OS_h=$ac_header_preproc
12166fi
12167echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12168echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12169
12170fi
12171if test $ac_cv_header_kernel_OS_h = yes; then
12172 cat >>confdefs.h <<\_ACEOF
12173#define WITH_THREAD 1
12174_ACEOF
12175
12176
12177cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012178#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012179_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012180
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012181 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012182else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012183
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12185echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12186if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12187 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188else
Martin v. Löwis11437992002-04-12 09:54:03 +000012189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012190LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012192/* confdefs.h. */
12193_ACEOF
12194cat confdefs.h >>conftest.$ac_ext
12195cat >>conftest.$ac_ext <<_ACEOF
12196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012197
Greg Steinadf63d62000-07-05 10:38:09 +000012198/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012199#ifdef __cplusplus
12200extern "C"
12201#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012202/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 builtin and then its argument prototype would still apply. */
12204char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012205int
12206main ()
12207{
12208pthread_create ();
12209 ;
12210 return 0;
12211}
12212_ACEOF
12213rm -f conftest.$ac_objext conftest$ac_exeext
12214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012215 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012217 grep -v '^ *+' conftest.er1 >conftest.err
12218 rm -f conftest.er1
12219 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12221 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012222 { ac_try='test -z "$ac_c_werror_flag"
12223 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12225 (eval $ac_try) 2>&5
12226 ac_status=$?
12227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12228 (exit $ac_status); }; } &&
12229 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
12235 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012236else
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012238sed 's/^/| /' conftest.$ac_ext >&5
12239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012241fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012242rm -f conftest.err conftest.$ac_objext \
12243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012244LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012245fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012246echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12247echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12248if test $ac_cv_lib_pthreads_pthread_create = yes; then
12249 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012250#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012251_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012252
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012253 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012254 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012255 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012256else
Greg Steinadf63d62000-07-05 10:38:09 +000012257
Martin v. Löwis11437992002-04-12 09:54:03 +000012258 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12259echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12260if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12261 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012262else
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012264LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012266/* confdefs.h. */
12267_ACEOF
12268cat confdefs.h >>conftest.$ac_ext
12269cat >>conftest.$ac_ext <<_ACEOF
12270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012271
Guido van Rossum49545951997-12-02 19:28:29 +000012272/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012273#ifdef __cplusplus
12274extern "C"
12275#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012276/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 builtin and then its argument prototype would still apply. */
12278char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012279int
12280main ()
12281{
12282pthread_create ();
12283 ;
12284 return 0;
12285}
12286_ACEOF
12287rm -f conftest.$ac_objext conftest$ac_exeext
12288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012289 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012291 grep -v '^ *+' conftest.er1 >conftest.err
12292 rm -f conftest.er1
12293 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12295 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012296 { ac_try='test -z "$ac_c_werror_flag"
12297 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12299 (eval $ac_try) 2>&5
12300 ac_status=$?
12301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12302 (exit $ac_status); }; } &&
12303 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
12309 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012310else
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012312sed 's/^/| /' conftest.$ac_ext >&5
12313
Martin v. Löwis11437992002-04-12 09:54:03 +000012314ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012315fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012316rm -f conftest.err conftest.$ac_objext \
12317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012318LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012319fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012320echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12321echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12322if test $ac_cv_lib_c_r_pthread_create = yes; then
12323 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012324#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012325_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012326
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012327 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012328 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012329 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012330else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012331
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12333echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12334if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12335 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012336else
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012338LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012340/* confdefs.h. */
12341_ACEOF
12342cat confdefs.h >>conftest.$ac_ext
12343cat >>conftest.$ac_ext <<_ACEOF
12344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012345
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012346/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012347#ifdef __cplusplus
12348extern "C"
12349#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012350/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012351 builtin and then its argument prototype would still apply. */
12352char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012353int
12354main ()
12355{
12356__pthread_create_system ();
12357 ;
12358 return 0;
12359}
12360_ACEOF
12361rm -f conftest.$ac_objext conftest$ac_exeext
12362if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012363 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012365 grep -v '^ *+' conftest.er1 >conftest.err
12366 rm -f conftest.er1
12367 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012370 { ac_try='test -z "$ac_c_werror_flag"
12371 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12373 (eval $ac_try) 2>&5
12374 ac_status=$?
12375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12376 (exit $ac_status); }; } &&
12377 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
12383 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012384else
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012386sed 's/^/| /' conftest.$ac_ext >&5
12387
Martin v. Löwis11437992002-04-12 09:54:03 +000012388ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012389fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012390rm -f conftest.err conftest.$ac_objext \
12391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012392LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012393fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012394echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12395echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12396if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12397 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012398#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012399_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012400
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012401 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012402 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012403 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012404else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012405
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12407echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12408if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12409 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012410else
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012412LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012413cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* confdefs.h. */
12415_ACEOF
12416cat confdefs.h >>conftest.$ac_ext
12417cat >>conftest.$ac_ext <<_ACEOF
12418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012419
Guido van Rossumb93a8621998-05-07 13:27:32 +000012420/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012421#ifdef __cplusplus
12422extern "C"
12423#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012424/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 builtin and then its argument prototype would still apply. */
12426char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012427int
12428main ()
12429{
12430pthread_create ();
12431 ;
12432 return 0;
12433}
12434_ACEOF
12435rm -f conftest.$ac_objext conftest$ac_exeext
12436if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012437 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012439 grep -v '^ *+' conftest.er1 >conftest.err
12440 rm -f conftest.er1
12441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12443 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012444 { ac_try='test -z "$ac_c_werror_flag"
12445 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12447 (eval $ac_try) 2>&5
12448 ac_status=$?
12449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12450 (exit $ac_status); }; } &&
12451 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
12457 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012458else
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012460sed 's/^/| /' conftest.$ac_ext >&5
12461
Martin v. Löwis11437992002-04-12 09:54:03 +000012462ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012463fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012464rm -f conftest.err conftest.$ac_objext \
12465 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012466LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012468echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12469echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12470if test $ac_cv_lib_cma_pthread_create = yes; then
12471 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012472#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012473_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012474
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012475 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012476 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012477 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012478else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012479
Martin v. Löwis130fb172001-07-19 11:00:41 +000012480 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012481fi
12482
Guido van Rossum627b2d71993-12-24 10:39:16 +000012483
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012484fi
12485
Guido van Rossum0be3e491997-05-22 20:33:33 +000012486fi
12487
Guido van Rossum49545951997-12-02 19:28:29 +000012488fi
12489
Guido van Rossumb93a8621998-05-07 13:27:32 +000012490fi
12491
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012492
Michael W. Hudson54241132001-12-07 15:38:26 +000012493fi
12494
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012495
12496fi
12497
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012498fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012499rm -f conftest.err conftest.$ac_objext \
12500 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012501fi;
12502fi
12503
12504
12505fi
12506
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012507
Michael W. Hudson54241132001-12-07 15:38:26 +000012508
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12510echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12511if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12512 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012513else
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012515LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012517/* confdefs.h. */
12518_ACEOF
12519cat confdefs.h >>conftest.$ac_ext
12520cat >>conftest.$ac_ext <<_ACEOF
12521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012522
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012523/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012524#ifdef __cplusplus
12525extern "C"
12526#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012527/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012528 builtin and then its argument prototype would still apply. */
12529char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012530int
12531main ()
12532{
12533usconfig ();
12534 ;
12535 return 0;
12536}
12537_ACEOF
12538rm -f conftest.$ac_objext conftest$ac_exeext
12539if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012540 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012542 grep -v '^ *+' conftest.er1 >conftest.err
12543 rm -f conftest.er1
12544 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012547 { ac_try='test -z "$ac_c_werror_flag"
12548 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12550 (eval $ac_try) 2>&5
12551 ac_status=$?
12552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12553 (exit $ac_status); }; } &&
12554 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
12560 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012561else
Martin v. Löwis11437992002-04-12 09:54:03 +000012562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012563sed 's/^/| /' conftest.$ac_ext >&5
12564
Martin v. Löwis11437992002-04-12 09:54:03 +000012565ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012566fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012567rm -f conftest.err conftest.$ac_objext \
12568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012569LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012570fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012571echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12572echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12573if test $ac_cv_lib_mpc_usconfig = yes; then
12574 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012575#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012576_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012577
Martin v. Löwis130fb172001-07-19 11:00:41 +000012578 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012579 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012580 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012581fi
12582
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012583
Neal Norwitza978ab02002-11-02 16:58:05 +000012584 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12586echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12587if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012589else
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012591LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012593/* confdefs.h. */
12594_ACEOF
12595cat confdefs.h >>conftest.$ac_ext
12596cat >>conftest.$ac_ext <<_ACEOF
12597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012599/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012600#ifdef __cplusplus
12601extern "C"
12602#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012603/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 builtin and then its argument prototype would still apply. */
12605char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012606int
12607main ()
12608{
12609thr_create ();
12610 ;
12611 return 0;
12612}
12613_ACEOF
12614rm -f conftest.$ac_objext conftest$ac_exeext
12615if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012616 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012618 grep -v '^ *+' conftest.er1 >conftest.err
12619 rm -f conftest.er1
12620 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12622 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012623 { ac_try='test -z "$ac_c_werror_flag"
12624 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12626 (eval $ac_try) 2>&5
12627 ac_status=$?
12628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12629 (exit $ac_status); }; } &&
12630 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
12636 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637else
Martin v. Löwis11437992002-04-12 09:54:03 +000012638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012639sed 's/^/| /' conftest.$ac_ext >&5
12640
Martin v. Löwis11437992002-04-12 09:54:03 +000012641ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012642fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012643rm -f conftest.err conftest.$ac_objext \
12644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012645LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012646fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012647echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12648echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12649if test $ac_cv_lib_thread_thr_create = yes; then
12650 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012652_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012653
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012654 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012655 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012656 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012657fi
12658
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012659 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012660
Martin v. Löwis130fb172001-07-19 11:00:41 +000012661 if test "$USE_THREAD_MODULE" != "#"
12662 then
12663 # If the above checks didn't disable threads, (at least) OSF1
12664 # needs this '-threads' argument during linking.
12665 case $ac_sys_system in
12666 OSF1) LDLAST=-threads;;
12667 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012668 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012669fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012670
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012671if test "$posix_threads" = "yes"; then
12672 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012673
12674cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012675#define _POSIX_THREADS 1
12676_ACEOF
12677
12678 fi
12679
12680 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12681 case $ac_sys_system/$ac_sys_release in
12682 SunOS/5.6)
12683cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012684#define HAVE_PTHREAD_DESTRUCTOR 1
12685_ACEOF
12686
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012687 ;;
12688 SunOS/5.8)
12689cat >>confdefs.h <<\_ACEOF
12690#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12691_ACEOF
12692
12693 ;;
12694 esac
12695
12696 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12697echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12698 if test "${ac_cv_pthread_system_supported+set}" = set; then
12699 echo $ECHO_N "(cached) $ECHO_C" >&6
12700else
12701 if test "$cross_compiling" = yes; then
12702 ac_cv_pthread_system_supported=no
12703else
12704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012705/* confdefs.h. */
12706_ACEOF
12707cat confdefs.h >>conftest.$ac_ext
12708cat >>conftest.$ac_ext <<_ACEOF
12709/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012710#include <pthread.h>
12711 void *foo(void *parm) {
12712 return NULL;
12713 }
12714 main() {
12715 pthread_attr_t attr;
12716 pthread_t id;
12717 if (pthread_attr_init(&attr)) exit(-1);
12718 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12719 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12720 exit(0);
12721 }
12722_ACEOF
12723rm -f conftest$ac_exeext
12724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12725 (eval $ac_link) 2>&5
12726 ac_status=$?
12727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12728 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12730 (eval $ac_try) 2>&5
12731 ac_status=$?
12732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12733 (exit $ac_status); }; }; then
12734 ac_cv_pthread_system_supported=yes
12735else
12736 echo "$as_me: program exited with status $ac_status" >&5
12737echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012738sed 's/^/| /' conftest.$ac_ext >&5
12739
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012740( exit $ac_status )
12741ac_cv_pthread_system_supported=no
12742fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012743rm -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 +000012744fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012745
Guido van Rossum627b2d71993-12-24 10:39:16 +000012746fi
12747
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012748 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12749echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12750 if test "$ac_cv_pthread_system_supported" = "yes"; then
12751
12752cat >>confdefs.h <<\_ACEOF
12753#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12754_ACEOF
12755
12756 fi
12757
12758for ac_func in pthread_sigmask
12759do
12760as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12761echo "$as_me:$LINENO: checking for $ac_func" >&5
12762echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12763if eval "test \"\${$as_ac_var+set}\" = set"; then
12764 echo $ECHO_N "(cached) $ECHO_C" >&6
12765else
12766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012767/* confdefs.h. */
12768_ACEOF
12769cat confdefs.h >>conftest.$ac_ext
12770cat >>conftest.$ac_ext <<_ACEOF
12771/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012772/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012773 which can conflict with char $ac_func (); below.
12774 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012775 <limits.h> exists even on freestanding compilers. Under hpux,
12776 including <limits.h> includes <sys/time.h> and causes problems
12777 checking for functions defined therein. */
12778#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012779# include <limits.h>
12780#else
12781# include <assert.h>
12782#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012783/* Override any gcc2 internal prototype to avoid an error. */
12784#ifdef __cplusplus
12785extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012786{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012787#endif
12788/* We use char because int might match the return type of a gcc2
12789 builtin and then its argument prototype would still apply. */
12790char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012791/* The GNU C library defines this for functions which it implements
12792 to always fail with ENOSYS. Some functions are actually named
12793 something starting with __ and the normal name is an alias. */
12794#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12795choke me
12796#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012797char (*f) () = $ac_func;
12798#endif
12799#ifdef __cplusplus
12800}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012801#endif
12802
Skip Montanaro6dead952003-09-25 14:50:04 +000012803int
12804main ()
12805{
12806return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012807 ;
12808 return 0;
12809}
12810_ACEOF
12811rm -f conftest.$ac_objext conftest$ac_exeext
12812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012813 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012815 grep -v '^ *+' conftest.er1 >conftest.err
12816 rm -f conftest.er1
12817 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12819 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012820 { ac_try='test -z "$ac_c_werror_flag"
12821 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12823 (eval $ac_try) 2>&5
12824 ac_status=$?
12825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12826 (exit $ac_status); }; } &&
12827 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +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); }; }; then
12833 eval "$as_ac_var=yes"
12834else
12835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012836sed 's/^/| /' conftest.$ac_ext >&5
12837
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012838eval "$as_ac_var=no"
12839fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012840rm -f conftest.err conftest.$ac_objext \
12841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012842fi
12843echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12844echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12845if test `eval echo '${'$as_ac_var'}'` = yes; then
12846 cat >>confdefs.h <<_ACEOF
12847#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12848_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012849 case $ac_sys_system in
12850 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012851
Jason Tishlerfac083d2003-07-22 15:20:49 +000012852cat >>confdefs.h <<\_ACEOF
12853#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12854_ACEOF
12855
12856 ;;
12857 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012858fi
12859done
12860
12861fi
12862
12863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012864# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
12866
12867echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12868echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012869# Check whether --enable-ipv6 or --disable-ipv6 was given.
12870if test "${enable_ipv6+set}" = set; then
12871 enableval="$enable_ipv6"
12872 case "$enableval" in
12873 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012874 echo "$as_me:$LINENO: result: no" >&5
12875echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012876 ipv6=no
12877 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012878 *) echo "$as_me:$LINENO: result: yes" >&5
12879echo "${ECHO_T}yes" >&6
12880 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012881#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012882_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012883
12884 ipv6=yes
12885 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012887else
Martin v. Löwis11437992002-04-12 09:54:03 +000012888
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012889 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 echo "$as_me:$LINENO: result: no" >&5
12891echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012892 ipv6=no
12893
12894else
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* confdefs.h. */
12897_ACEOF
12898cat confdefs.h >>conftest.$ac_ext
12899cat >>conftest.$ac_ext <<_ACEOF
12900/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012901 /* AF_INET6 available check */
12902#include <sys/types.h>
12903#include <sys/socket.h>
12904main()
12905{
12906 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12907 exit(1);
12908 else
12909 exit(0);
12910}
12911
Martin v. Löwis11437992002-04-12 09:54:03 +000012912_ACEOF
12913rm -f conftest$ac_exeext
12914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12915 (eval $ac_link) 2>&5
12916 ac_status=$?
12917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12920 (eval $ac_try) 2>&5
12921 ac_status=$?
12922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12923 (exit $ac_status); }; }; then
12924 echo "$as_me:$LINENO: result: yes" >&5
12925echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012926 ipv6=yes
12927else
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 echo "$as_me: program exited with status $ac_status" >&5
12929echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012930sed 's/^/| /' conftest.$ac_ext >&5
12931
Martin v. Löwis11437992002-04-12 09:54:03 +000012932( exit $ac_status )
12933echo "$as_me:$LINENO: result: no" >&5
12934echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012935 ipv6=no
12936fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012937rm -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 +000012938fi
12939
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012940if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12942echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012944/* confdefs.h. */
12945_ACEOF
12946cat confdefs.h >>conftest.$ac_ext
12947cat >>conftest.$ac_ext <<_ACEOF
12948/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012949#include <sys/types.h>
12950#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012951int
12952main ()
12953{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012954struct sockaddr_in6 x;
12955x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 ;
12957 return 0;
12958}
12959_ACEOF
12960rm -f conftest.$ac_objext
12961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012962 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012964 grep -v '^ *+' conftest.er1 >conftest.err
12965 rm -f conftest.er1
12966 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12968 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012969 { ac_try='test -z "$ac_c_werror_flag"
12970 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12972 (eval $ac_try) 2>&5
12973 ac_status=$?
12974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12975 (exit $ac_status); }; } &&
12976 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
12982 echo "$as_me:$LINENO: result: yes" >&5
12983echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012984 ipv6=yes
12985else
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012987sed 's/^/| /' conftest.$ac_ext >&5
12988
Martin v. Löwis11437992002-04-12 09:54:03 +000012989echo "$as_me:$LINENO: result: no" >&5
12990echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012991 ipv6=no
12992fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012994fi
12995
12996if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012998#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012999_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013000
13001fi
13002
Martin v. Löwis11437992002-04-12 09:54:03 +000013003fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013004
13005ipv6type=unknown
13006ipv6lib=none
13007ipv6trylibc=no
13008
13009if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
13011echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000013012 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
13013 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013014 case $i in
13015 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013017/* confdefs.h. */
13018_ACEOF
13019cat confdefs.h >>conftest.$ac_ext
13020cat >>conftest.$ac_ext <<_ACEOF
13021/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013022
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013023#include <netinet/in.h>
13024#ifdef IPV6_INRIA_VERSION
13025yes
13026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013027_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013029 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013030 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013031fi
13032rm -f conftest*
13033
13034 ;;
13035 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013037/* confdefs.h. */
13038_ACEOF
13039cat confdefs.h >>conftest.$ac_ext
13040cat >>conftest.$ac_ext <<_ACEOF
13041/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013042
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013043#include <netinet/in.h>
13044#ifdef __KAME__
13045yes
13046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013047_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013049 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013050 ipv6type=$i;
13051 ipv6lib=inet6
13052 ipv6libdir=/usr/local/v6/lib
13053 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013054fi
13055rm -f conftest*
13056
13057 ;;
13058 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013060/* confdefs.h. */
13061_ACEOF
13062cat confdefs.h >>conftest.$ac_ext
13063cat >>conftest.$ac_ext <<_ACEOF
13064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013066#include <features.h>
13067#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
13068yes
13069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013072 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013073 ipv6type=$i;
13074 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013075fi
13076rm -f conftest*
13077
13078 ;;
13079 linux-inet6)
13080 if test -d /usr/inet6; then
13081 ipv6type=$i
13082 ipv6lib=inet6
13083 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013084 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013085 fi
13086 ;;
13087 solaris)
13088 if test -f /etc/netconfig; then
13089 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13090 ipv6type=$i
13091 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013092 fi
13093 fi
13094 ;;
13095 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* confdefs.h. */
13098_ACEOF
13099cat confdefs.h >>conftest.$ac_ext
13100cat >>conftest.$ac_ext <<_ACEOF
13101/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013102
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013103#include <sys/param.h>
13104#ifdef _TOSHIBA_INET6
13105yes
13106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013107_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013109 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013110 ipv6type=$i;
13111 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013112 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013113fi
13114rm -f conftest*
13115
13116 ;;
13117 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013119/* confdefs.h. */
13120_ACEOF
13121cat confdefs.h >>conftest.$ac_ext
13122cat >>conftest.$ac_ext <<_ACEOF
13123/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013124
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013125#include </usr/local/v6/include/sys/v6config.h>
13126#ifdef __V6D__
13127yes
13128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013129_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013131 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013132 ipv6type=$i;
13133 ipv6lib=v6;
13134 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013135 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013136fi
13137rm -f conftest*
13138
13139 ;;
13140 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013142/* confdefs.h. */
13143_ACEOF
13144cat confdefs.h >>conftest.$ac_ext
13145cat >>conftest.$ac_ext <<_ACEOF
13146/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013147
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013148#include <sys/param.h>
13149#ifdef _ZETA_MINAMI_INET6
13150yes
13151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013152_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013154 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013155 ipv6type=$i;
13156 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013157 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013158fi
13159rm -f conftest*
13160
13161 ;;
13162 esac
13163 if test "$ipv6type" != "unknown"; then
13164 break
13165 fi
13166 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013167 echo "$as_me:$LINENO: result: $ipv6type" >&5
13168echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013169fi
13170
13171if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13172 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13173 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13174 echo "using lib$ipv6lib"
13175 else
13176 if test $ipv6trylibc = "yes"; then
13177 echo "using libc"
13178 else
13179 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13180 echo "You need to fetch lib$ipv6lib.a from appropriate"
13181 echo 'ipv6 kit and compile beforehand.'
13182 exit 1
13183 fi
13184 fi
13185fi
13186
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013187# Check for --with-doc-strings
13188echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13189echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13190
13191# Check whether --with-doc-strings or --without-doc-strings was given.
13192if test "${with_doc_strings+set}" = set; then
13193 withval="$with_doc_strings"
13194
13195fi;
13196
13197if test -z "$with_doc_strings"
13198then with_doc_strings="yes"
13199fi
13200if test "$with_doc_strings" != "no"
13201then
13202
13203cat >>confdefs.h <<\_ACEOF
13204#define WITH_DOC_STRINGS 1
13205_ACEOF
13206
13207fi
13208echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13209echo "${ECHO_T}$with_doc_strings" >&6
13210
Neil Schemenauera35c6882001-02-27 04:45:05 +000013211# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013212echo "$as_me:$LINENO: checking for --with-tsc" >&5
13213echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13214
13215# Check whether --with-tsc or --without-tsc was given.
13216if test "${with_tsc+set}" = set; then
13217 withval="$with_tsc"
13218
13219if test "$withval" != no
13220then
13221
13222cat >>confdefs.h <<\_ACEOF
13223#define WITH_TSC 1
13224_ACEOF
13225
13226 echo "$as_me:$LINENO: result: yes" >&5
13227echo "${ECHO_T}yes" >&6
13228else echo "$as_me:$LINENO: result: no" >&5
13229echo "${ECHO_T}no" >&6
13230fi
13231else
13232 echo "$as_me:$LINENO: result: no" >&5
13233echo "${ECHO_T}no" >&6
13234fi;
13235
13236# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013237echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13238echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13239
Neil Schemenauera35c6882001-02-27 04:45:05 +000013240# Check whether --with-pymalloc or --without-pymalloc was given.
13241if test "${with_pymalloc+set}" = set; then
13242 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013243
Martin v. Löwis11437992002-04-12 09:54:03 +000013244fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013245
Neil Schemenauer16c22972002-03-22 15:34:49 +000013246if test -z "$with_pymalloc"
13247then with_pymalloc="yes"
13248fi
13249if test "$with_pymalloc" != "no"
13250then
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
13252cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013253#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013254_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013255
13256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013257echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13258echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013259
Barry Warsawef82cd72000-06-30 16:21:01 +000013260# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013261echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13262echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13263
Barry Warsawef82cd72000-06-30 16:21:01 +000013264# Check whether --with-wctype-functions or --without-wctype-functions was given.
13265if test "${with_wctype_functions+set}" = set; then
13266 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013267
Barry Warsawef82cd72000-06-30 16:21:01 +000013268if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013269then
13270
13271cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013272#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013273_ACEOF
13274
13275 echo "$as_me:$LINENO: result: yes" >&5
13276echo "${ECHO_T}yes" >&6
13277else echo "$as_me:$LINENO: result: no" >&5
13278echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013279fi
13280else
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 echo "$as_me:$LINENO: result: no" >&5
13282echo "${ECHO_T}no" >&6
13283fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013284
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013285# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013286
Guido van Rossum98935bf2001-09-05 19:13:16 +000013287DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013288
Guido van Rossume97ee181999-12-20 21:27:22 +000013289# the dlopen() function means we might want to use dynload_shlib.o. some
13290# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013291
Thomas Wouters3a584202000-08-05 23:28:51 +000013292for ac_func in dlopen
13293do
Martin v. Löwis11437992002-04-12 09:54:03 +000013294as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13295echo "$as_me:$LINENO: checking for $ac_func" >&5
13296echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13297if eval "test \"\${$as_ac_var+set}\" = set"; then
13298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013299else
Martin v. Löwis11437992002-04-12 09:54:03 +000013300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013301/* confdefs.h. */
13302_ACEOF
13303cat confdefs.h >>conftest.$ac_ext
13304cat >>conftest.$ac_ext <<_ACEOF
13305/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000013306/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013307 which can conflict with char $ac_func (); below.
13308 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013309 <limits.h> exists even on freestanding compilers. Under hpux,
13310 including <limits.h> includes <sys/time.h> and causes problems
13311 checking for functions defined therein. */
13312#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013313# include <limits.h>
13314#else
13315# include <assert.h>
13316#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013317/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013318#ifdef __cplusplus
13319extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013320{
Martin v. Löwis11437992002-04-12 09:54:03 +000013321#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013322/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013323 builtin and then its argument prototype would still apply. */
13324char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013325/* The GNU C library defines this for functions which it implements
13326 to always fail with ENOSYS. Some functions are actually named
13327 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013328#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013329choke me
13330#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013331char (*f) () = $ac_func;
13332#endif
13333#ifdef __cplusplus
13334}
Guido van Rossume97ee181999-12-20 21:27:22 +000013335#endif
13336
Skip Montanaro6dead952003-09-25 14:50:04 +000013337int
13338main ()
13339{
13340return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 ;
13342 return 0;
13343}
13344_ACEOF
13345rm -f conftest.$ac_objext conftest$ac_exeext
13346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013347 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013349 grep -v '^ *+' conftest.er1 >conftest.err
13350 rm -f conftest.er1
13351 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13353 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013354 { ac_try='test -z "$ac_c_werror_flag"
13355 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13357 (eval $ac_try) 2>&5
13358 ac_status=$?
13359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13360 (exit $ac_status); }; } &&
13361 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
13367 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013368else
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013370sed 's/^/| /' conftest.$ac_ext >&5
13371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013373fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013374rm -f conftest.err conftest.$ac_objext \
13375 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013376fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013377echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13378echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13379if test `eval echo '${'$as_ac_var'}'` = yes; then
13380 cat >>confdefs.h <<_ACEOF
13381#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13382_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013383
Guido van Rossume97ee181999-12-20 21:27:22 +000013384fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013385done
Guido van Rossume97ee181999-12-20 21:27:22 +000013386
Michael W. Hudson54241132001-12-07 15:38:26 +000013387
Guido van Rossume97ee181999-12-20 21:27:22 +000013388# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13389# loading of modules.
13390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13392echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013393if test -z "$DYNLOADFILE"
13394then
13395 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013396 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13397 if test "$ac_cv_func_dlopen" = yes
13398 then DYNLOADFILE="dynload_shlib.o"
13399 else DYNLOADFILE="dynload_aix.o"
13400 fi
13401 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013402 BeOS*) DYNLOADFILE="dynload_beos.o";;
13403 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013404 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013405 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013406 *)
13407 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13408 # out any dynamic loading
13409 if test "$ac_cv_func_dlopen" = yes
13410 then DYNLOADFILE="dynload_shlib.o"
13411 else DYNLOADFILE="dynload_stub.o"
13412 fi
13413 ;;
13414 esac
13415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013416echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13417echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013418if test "$DYNLOADFILE" != "dynload_stub.o"
13419then
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
13421cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013422#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013423_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013424
13425fi
13426
Neil Schemenauer4e425612001-06-19 15:44:15 +000013427# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13428
Michael W. Hudson54241132001-12-07 15:38:26 +000013429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13431echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013432if test -z "$MACHDEP_OBJS"
13433then
Jack Jansene578a632001-08-15 01:27:14 +000013434 MACHDEP_OBJS=$extra_machdep_objs
13435else
13436 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013438echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13439echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013440
Guido van Rossum627b2d71993-12-24 10:39:16 +000013441# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013442
13443
13444
13445
13446
13447
13448
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000013513
Martin v. Löwisc3001752005-01-23 09:27:24 +000013514
13515
Martin v. Löwisd6320502004-08-12 13:45:08 +000013516for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13517 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013518 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000013519 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013520 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013521 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013522 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013523 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013524 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013525 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013526 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013527 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013528do
Martin v. Löwis11437992002-04-12 09:54:03 +000013529as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13530echo "$as_me:$LINENO: checking for $ac_func" >&5
13531echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13532if eval "test \"\${$as_ac_var+set}\" = set"; then
13533 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534else
Martin v. Löwis11437992002-04-12 09:54:03 +000013535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013536/* confdefs.h. */
13537_ACEOF
13538cat confdefs.h >>conftest.$ac_ext
13539cat >>conftest.$ac_ext <<_ACEOF
13540/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013541/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013542 which can conflict with char $ac_func (); below.
13543 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013544 <limits.h> exists even on freestanding compilers. Under hpux,
13545 including <limits.h> includes <sys/time.h> and causes problems
13546 checking for functions defined therein. */
13547#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013548# include <limits.h>
13549#else
13550# include <assert.h>
13551#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013552/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013553#ifdef __cplusplus
13554extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013555{
Martin v. Löwis11437992002-04-12 09:54:03 +000013556#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013557/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013558 builtin and then its argument prototype would still apply. */
13559char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013560/* The GNU C library defines this for functions which it implements
13561 to always fail with ENOSYS. Some functions are actually named
13562 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013564choke me
13565#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013566char (*f) () = $ac_func;
13567#endif
13568#ifdef __cplusplus
13569}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013570#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013571
Skip Montanaro6dead952003-09-25 14:50:04 +000013572int
13573main ()
13574{
13575return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 ;
13577 return 0;
13578}
13579_ACEOF
13580rm -f conftest.$ac_objext conftest$ac_exeext
13581if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013582 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013584 grep -v '^ *+' conftest.er1 >conftest.err
13585 rm -f conftest.er1
13586 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13588 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013589 { ac_try='test -z "$ac_c_werror_flag"
13590 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13592 (eval $ac_try) 2>&5
13593 ac_status=$?
13594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13595 (exit $ac_status); }; } &&
13596 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
13602 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013603else
Martin v. Löwis11437992002-04-12 09:54:03 +000013604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013605sed 's/^/| /' conftest.$ac_ext >&5
13606
Martin v. Löwis11437992002-04-12 09:54:03 +000013607eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013608fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013609rm -f conftest.err conftest.$ac_objext \
13610 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013611fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013612echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13613echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13614if test `eval echo '${'$as_ac_var'}'` = yes; then
13615 cat >>confdefs.h <<_ACEOF
13616#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13617_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013618
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013619fi
13620done
13621
Michael W. Hudson54241132001-12-07 15:38:26 +000013622
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013623# For some functions, having a definition is not sufficient, since
13624# we want to take their address.
13625echo "$as_me:$LINENO: checking for chroot" >&5
13626echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013628/* confdefs.h. */
13629_ACEOF
13630cat confdefs.h >>conftest.$ac_ext
13631cat >>conftest.$ac_ext <<_ACEOF
13632/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013633#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013634int
13635main ()
13636{
13637void *x=chroot
13638 ;
13639 return 0;
13640}
13641_ACEOF
13642rm -f conftest.$ac_objext
13643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013644 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013646 grep -v '^ *+' conftest.er1 >conftest.err
13647 rm -f conftest.er1
13648 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13650 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013651 { ac_try='test -z "$ac_c_werror_flag"
13652 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13654 (eval $ac_try) 2>&5
13655 ac_status=$?
13656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13657 (exit $ac_status); }; } &&
13658 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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); }; }; then
13664
13665cat >>confdefs.h <<\_ACEOF
13666#define HAVE_CHROOT 1
13667_ACEOF
13668
13669 echo "$as_me:$LINENO: result: yes" >&5
13670echo "${ECHO_T}yes" >&6
13671else
13672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013673sed 's/^/| /' conftest.$ac_ext >&5
13674
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013675echo "$as_me:$LINENO: result: no" >&5
13676echo "${ECHO_T}no" >&6
13677
13678fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013680echo "$as_me:$LINENO: checking for link" >&5
13681echo $ECHO_N "checking for link... $ECHO_C" >&6
13682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013683/* confdefs.h. */
13684_ACEOF
13685cat confdefs.h >>conftest.$ac_ext
13686cat >>conftest.$ac_ext <<_ACEOF
13687/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013688#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013689int
13690main ()
13691{
13692void *x=link
13693 ;
13694 return 0;
13695}
13696_ACEOF
13697rm -f conftest.$ac_objext
13698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013699 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013701 grep -v '^ *+' conftest.er1 >conftest.err
13702 rm -f conftest.er1
13703 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013706 { ac_try='test -z "$ac_c_werror_flag"
13707 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13709 (eval $ac_try) 2>&5
13710 ac_status=$?
13711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13712 (exit $ac_status); }; } &&
13713 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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); }; }; then
13719
13720cat >>confdefs.h <<\_ACEOF
13721#define HAVE_LINK 1
13722_ACEOF
13723
13724 echo "$as_me:$LINENO: result: yes" >&5
13725echo "${ECHO_T}yes" >&6
13726else
13727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013728sed 's/^/| /' conftest.$ac_ext >&5
13729
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013730echo "$as_me:$LINENO: result: no" >&5
13731echo "${ECHO_T}no" >&6
13732
13733fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013734rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013735echo "$as_me:$LINENO: checking for symlink" >&5
13736echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013738/* confdefs.h. */
13739_ACEOF
13740cat confdefs.h >>conftest.$ac_ext
13741cat >>conftest.$ac_ext <<_ACEOF
13742/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013743#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013744int
13745main ()
13746{
13747void *x=symlink
13748 ;
13749 return 0;
13750}
13751_ACEOF
13752rm -f conftest.$ac_objext
13753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013754 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013756 grep -v '^ *+' conftest.er1 >conftest.err
13757 rm -f conftest.er1
13758 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13760 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013761 { ac_try='test -z "$ac_c_werror_flag"
13762 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13764 (eval $ac_try) 2>&5
13765 ac_status=$?
13766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767 (exit $ac_status); }; } &&
13768 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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); }; }; then
13774
13775cat >>confdefs.h <<\_ACEOF
13776#define HAVE_SYMLINK 1
13777_ACEOF
13778
13779 echo "$as_me:$LINENO: result: yes" >&5
13780echo "${ECHO_T}yes" >&6
13781else
13782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013783sed 's/^/| /' conftest.$ac_ext >&5
13784
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013785echo "$as_me:$LINENO: result: no" >&5
13786echo "${ECHO_T}no" >&6
13787
13788fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013789rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013790echo "$as_me:$LINENO: checking for fchdir" >&5
13791echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013793/* confdefs.h. */
13794_ACEOF
13795cat confdefs.h >>conftest.$ac_ext
13796cat >>conftest.$ac_ext <<_ACEOF
13797/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013798#include <unistd.h>
13799int
13800main ()
13801{
13802void *x=fchdir
13803 ;
13804 return 0;
13805}
13806_ACEOF
13807rm -f conftest.$ac_objext
13808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013809 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013811 grep -v '^ *+' conftest.er1 >conftest.err
13812 rm -f conftest.er1
13813 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13815 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013816 { ac_try='test -z "$ac_c_werror_flag"
13817 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13819 (eval $ac_try) 2>&5
13820 ac_status=$?
13821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13822 (exit $ac_status); }; } &&
13823 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +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); }; }; then
13829
13830cat >>confdefs.h <<\_ACEOF
13831#define HAVE_FCHDIR 1
13832_ACEOF
13833
13834 echo "$as_me:$LINENO: result: yes" >&5
13835echo "${ECHO_T}yes" >&6
13836else
13837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013838sed 's/^/| /' conftest.$ac_ext >&5
13839
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013840echo "$as_me:$LINENO: result: no" >&5
13841echo "${ECHO_T}no" >&6
13842
13843fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013844rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013845echo "$as_me:$LINENO: checking for fsync" >&5
13846echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013848/* confdefs.h. */
13849_ACEOF
13850cat confdefs.h >>conftest.$ac_ext
13851cat >>conftest.$ac_ext <<_ACEOF
13852/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013853#include <unistd.h>
13854int
13855main ()
13856{
13857void *x=fsync
13858 ;
13859 return 0;
13860}
13861_ACEOF
13862rm -f conftest.$ac_objext
13863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013864 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013866 grep -v '^ *+' conftest.er1 >conftest.err
13867 rm -f conftest.er1
13868 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13870 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013871 { ac_try='test -z "$ac_c_werror_flag"
13872 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13874 (eval $ac_try) 2>&5
13875 ac_status=$?
13876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13877 (exit $ac_status); }; } &&
13878 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +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); }; }; then
13884
13885cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013886#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013887_ACEOF
13888
13889 echo "$as_me:$LINENO: result: yes" >&5
13890echo "${ECHO_T}yes" >&6
13891else
13892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013893sed 's/^/| /' conftest.$ac_ext >&5
13894
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013895echo "$as_me:$LINENO: result: no" >&5
13896echo "${ECHO_T}no" >&6
13897
13898fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013900echo "$as_me:$LINENO: checking for fdatasync" >&5
13901echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013903/* confdefs.h. */
13904_ACEOF
13905cat confdefs.h >>conftest.$ac_ext
13906cat >>conftest.$ac_ext <<_ACEOF
13907/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013908#include <unistd.h>
13909int
13910main ()
13911{
13912void *x=fdatasync
13913 ;
13914 return 0;
13915}
13916_ACEOF
13917rm -f conftest.$ac_objext
13918if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013919 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013921 grep -v '^ *+' conftest.er1 >conftest.err
13922 rm -f conftest.er1
13923 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13925 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013926 { ac_try='test -z "$ac_c_werror_flag"
13927 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13929 (eval $ac_try) 2>&5
13930 ac_status=$?
13931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13932 (exit $ac_status); }; } &&
13933 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +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); }; }; then
13939
13940cat >>confdefs.h <<\_ACEOF
13941#define HAVE_FDATASYNC 1
13942_ACEOF
13943
13944 echo "$as_me:$LINENO: result: yes" >&5
13945echo "${ECHO_T}yes" >&6
13946else
13947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013948sed 's/^/| /' conftest.$ac_ext >&5
13949
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013950echo "$as_me:$LINENO: result: no" >&5
13951echo "${ECHO_T}no" >&6
13952
13953fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013955
Martin v. Löwisd5843682002-11-21 20:41:28 +000013956# On some systems (eg. FreeBSD 5), we would find a definition of the
13957# functions ctermid_r, setgroups in the library, but no prototype
13958# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13959# address to avoid compiler warnings and potential miscompilations
13960# because of the missing prototypes.
13961
13962echo "$as_me:$LINENO: checking for ctermid_r" >&5
13963echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013965/* confdefs.h. */
13966_ACEOF
13967cat confdefs.h >>conftest.$ac_ext
13968cat >>conftest.$ac_ext <<_ACEOF
13969/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013970
13971#include "confdefs.h"
13972#include <stdio.h>
13973
Martin v. Löwisd5843682002-11-21 20:41:28 +000013974int
13975main ()
13976{
13977void* p = ctermid_r
13978 ;
13979 return 0;
13980}
13981_ACEOF
13982rm -f conftest.$ac_objext
13983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013984 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000013985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013986 grep -v '^ *+' conftest.er1 >conftest.err
13987 rm -f conftest.er1
13988 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13990 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013991 { ac_try='test -z "$ac_c_werror_flag"
13992 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13994 (eval $ac_try) 2>&5
13995 ac_status=$?
13996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13997 (exit $ac_status); }; } &&
13998 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +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); }; }; then
14004
14005cat >>confdefs.h <<\_ACEOF
14006#define HAVE_CTERMID_R 1
14007_ACEOF
14008
14009 echo "$as_me:$LINENO: result: yes" >&5
14010echo "${ECHO_T}yes" >&6
14011else
14012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014013sed 's/^/| /' conftest.$ac_ext >&5
14014
Martin v. Löwisd5843682002-11-21 20:41:28 +000014015echo "$as_me:$LINENO: result: no" >&5
14016echo "${ECHO_T}no" >&6
14017
14018fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014019rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014020
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014021echo "$as_me:$LINENO: checking for flock" >&5
14022echo $ECHO_N "checking for flock... $ECHO_C" >&6
14023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014024/* confdefs.h. */
14025_ACEOF
14026cat confdefs.h >>conftest.$ac_ext
14027cat >>conftest.$ac_ext <<_ACEOF
14028/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014029
14030#include "confdefs.h"
14031#include <sys/file.h>
14032
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014033int
14034main ()
14035{
14036void* p = flock
14037 ;
14038 return 0;
14039}
14040_ACEOF
14041rm -f conftest.$ac_objext
14042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014043 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014045 grep -v '^ *+' conftest.er1 >conftest.err
14046 rm -f conftest.er1
14047 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14049 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014050 { ac_try='test -z "$ac_c_werror_flag"
14051 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14053 (eval $ac_try) 2>&5
14054 ac_status=$?
14055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14056 (exit $ac_status); }; } &&
14057 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +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); }; }; then
14063
14064cat >>confdefs.h <<\_ACEOF
14065#define HAVE_FLOCK 1
14066_ACEOF
14067
14068 echo "$as_me:$LINENO: result: yes" >&5
14069echo "${ECHO_T}yes" >&6
14070else
14071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014072sed 's/^/| /' conftest.$ac_ext >&5
14073
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014074echo "$as_me:$LINENO: result: no" >&5
14075echo "${ECHO_T}no" >&6
14076
14077fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014078rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014079
14080echo "$as_me:$LINENO: checking for getpagesize" >&5
14081echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014083/* confdefs.h. */
14084_ACEOF
14085cat confdefs.h >>conftest.$ac_ext
14086cat >>conftest.$ac_ext <<_ACEOF
14087/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014088
14089#include "confdefs.h"
14090#include <unistd.h>
14091
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014092int
14093main ()
14094{
14095void* p = getpagesize
14096 ;
14097 return 0;
14098}
14099_ACEOF
14100rm -f conftest.$ac_objext
14101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014102 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014104 grep -v '^ *+' conftest.er1 >conftest.err
14105 rm -f conftest.er1
14106 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014109 { ac_try='test -z "$ac_c_werror_flag"
14110 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14112 (eval $ac_try) 2>&5
14113 ac_status=$?
14114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14115 (exit $ac_status); }; } &&
14116 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +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); }; }; then
14122
14123cat >>confdefs.h <<\_ACEOF
14124#define HAVE_GETPAGESIZE 1
14125_ACEOF
14126
14127 echo "$as_me:$LINENO: result: yes" >&5
14128echo "${ECHO_T}yes" >&6
14129else
14130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014131sed 's/^/| /' conftest.$ac_ext >&5
14132
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014133echo "$as_me:$LINENO: result: no" >&5
14134echo "${ECHO_T}no" >&6
14135
14136fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014137rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014138
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014139for ac_prog in true
14140do
14141 # Extract the first word of "$ac_prog", so it can be a program name with args.
14142set dummy $ac_prog; ac_word=$2
14143echo "$as_me:$LINENO: checking for $ac_word" >&5
14144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14145if test "${ac_cv_prog_TRUE+set}" = set; then
14146 echo $ECHO_N "(cached) $ECHO_C" >&6
14147else
14148 if test -n "$TRUE"; then
14149 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14150else
14151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14152for as_dir in $PATH
14153do
14154 IFS=$as_save_IFS
14155 test -z "$as_dir" && as_dir=.
14156 for ac_exec_ext in '' $ac_executable_extensions; do
14157 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14158 ac_cv_prog_TRUE="$ac_prog"
14159 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14160 break 2
14161 fi
14162done
14163done
14164
14165fi
14166fi
14167TRUE=$ac_cv_prog_TRUE
14168if test -n "$TRUE"; then
14169 echo "$as_me:$LINENO: result: $TRUE" >&5
14170echo "${ECHO_T}$TRUE" >&6
14171else
14172 echo "$as_me:$LINENO: result: no" >&5
14173echo "${ECHO_T}no" >&6
14174fi
14175
14176 test -n "$TRUE" && break
14177done
14178test -n "$TRUE" || TRUE="/bin/true"
14179
14180
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014181echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14182echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14183if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14184 echo $ECHO_N "(cached) $ECHO_C" >&6
14185else
14186 ac_check_lib_save_LIBS=$LIBS
14187LIBS="-lc $LIBS"
14188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014189/* confdefs.h. */
14190_ACEOF
14191cat confdefs.h >>conftest.$ac_ext
14192cat >>conftest.$ac_ext <<_ACEOF
14193/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014194
14195/* Override any gcc2 internal prototype to avoid an error. */
14196#ifdef __cplusplus
14197extern "C"
14198#endif
14199/* We use char because int might match the return type of a gcc2
14200 builtin and then its argument prototype would still apply. */
14201char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014202int
14203main ()
14204{
14205inet_aton ();
14206 ;
14207 return 0;
14208}
14209_ACEOF
14210rm -f conftest.$ac_objext conftest$ac_exeext
14211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014212 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014214 grep -v '^ *+' conftest.er1 >conftest.err
14215 rm -f conftest.er1
14216 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014219 { ac_try='test -z "$ac_c_werror_flag"
14220 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14222 (eval $ac_try) 2>&5
14223 ac_status=$?
14224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14225 (exit $ac_status); }; } &&
14226 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +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); }; }; then
14232 ac_cv_lib_c_inet_aton=yes
14233else
14234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014235sed 's/^/| /' conftest.$ac_ext >&5
14236
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014237ac_cv_lib_c_inet_aton=no
14238fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014239rm -f conftest.err conftest.$ac_objext \
14240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014241LIBS=$ac_check_lib_save_LIBS
14242fi
14243echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14244echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14245if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014246 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014247else
14248
14249echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14250echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14251if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14252 echo $ECHO_N "(cached) $ECHO_C" >&6
14253else
14254 ac_check_lib_save_LIBS=$LIBS
14255LIBS="-lresolv $LIBS"
14256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014257/* confdefs.h. */
14258_ACEOF
14259cat confdefs.h >>conftest.$ac_ext
14260cat >>conftest.$ac_ext <<_ACEOF
14261/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014262
14263/* Override any gcc2 internal prototype to avoid an error. */
14264#ifdef __cplusplus
14265extern "C"
14266#endif
14267/* We use char because int might match the return type of a gcc2
14268 builtin and then its argument prototype would still apply. */
14269char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014270int
14271main ()
14272{
14273inet_aton ();
14274 ;
14275 return 0;
14276}
14277_ACEOF
14278rm -f conftest.$ac_objext conftest$ac_exeext
14279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014280 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014282 grep -v '^ *+' conftest.er1 >conftest.err
14283 rm -f conftest.er1
14284 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14286 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014287 { ac_try='test -z "$ac_c_werror_flag"
14288 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14290 (eval $ac_try) 2>&5
14291 ac_status=$?
14292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14293 (exit $ac_status); }; } &&
14294 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +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); }; }; then
14300 ac_cv_lib_resolv_inet_aton=yes
14301else
14302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014303sed 's/^/| /' conftest.$ac_ext >&5
14304
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014305ac_cv_lib_resolv_inet_aton=no
14306fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014307rm -f conftest.err conftest.$ac_objext \
14308 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014309LIBS=$ac_check_lib_save_LIBS
14310fi
14311echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14312echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14313if test $ac_cv_lib_resolv_inet_aton = yes; then
14314 cat >>confdefs.h <<_ACEOF
14315#define HAVE_LIBRESOLV 1
14316_ACEOF
14317
14318 LIBS="-lresolv $LIBS"
14319
14320fi
14321
14322
14323fi
14324
14325
Martin v. Löwise9416172003-05-03 10:12:45 +000014326echo "$as_me:$LINENO: checking for hstrerror" >&5
14327echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014329/* confdefs.h. */
14330_ACEOF
14331cat confdefs.h >>conftest.$ac_ext
14332cat >>conftest.$ac_ext <<_ACEOF
14333/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014334
14335#include "confdefs.h"
14336#include <netdb.h>
14337
Martin v. Löwise9416172003-05-03 10:12:45 +000014338int
14339main ()
14340{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014341void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014342 ;
14343 return 0;
14344}
14345_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014346rm -f conftest.$ac_objext conftest$ac_exeext
14347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014348 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014350 grep -v '^ *+' conftest.er1 >conftest.err
14351 rm -f conftest.er1
14352 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014355 { ac_try='test -z "$ac_c_werror_flag"
14356 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14358 (eval $ac_try) 2>&5
14359 ac_status=$?
14360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14361 (exit $ac_status); }; } &&
14362 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +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); }; }; then
14368
14369cat >>confdefs.h <<\_ACEOF
14370#define HAVE_HSTRERROR 1
14371_ACEOF
14372
14373 echo "$as_me:$LINENO: result: yes" >&5
14374echo "${ECHO_T}yes" >&6
14375else
14376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014377sed 's/^/| /' conftest.$ac_ext >&5
14378
Martin v. Löwise9416172003-05-03 10:12:45 +000014379echo "$as_me:$LINENO: result: no" >&5
14380echo "${ECHO_T}no" >&6
14381
14382fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014383rm -f conftest.err conftest.$ac_objext \
14384 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014385
14386echo "$as_me:$LINENO: checking for inet_aton" >&5
14387echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014389/* confdefs.h. */
14390_ACEOF
14391cat confdefs.h >>conftest.$ac_ext
14392cat >>conftest.$ac_ext <<_ACEOF
14393/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014394
14395#include "confdefs.h"
14396#include <sys/socket.h>
14397#include <netinet/in.h>
14398#include <arpa/inet.h>
14399
Martin v. Löwise9416172003-05-03 10:12:45 +000014400int
14401main ()
14402{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014403void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014404 ;
14405 return 0;
14406}
14407_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014408rm -f conftest.$ac_objext conftest$ac_exeext
14409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014410 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014412 grep -v '^ *+' conftest.er1 >conftest.err
14413 rm -f conftest.er1
14414 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14416 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014417 { ac_try='test -z "$ac_c_werror_flag"
14418 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14420 (eval $ac_try) 2>&5
14421 ac_status=$?
14422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423 (exit $ac_status); }; } &&
14424 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +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); }; }; then
14430
14431cat >>confdefs.h <<\_ACEOF
14432#define HAVE_INET_ATON 1
14433_ACEOF
14434
14435 echo "$as_me:$LINENO: result: yes" >&5
14436echo "${ECHO_T}yes" >&6
14437else
14438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014439sed 's/^/| /' conftest.$ac_ext >&5
14440
Martin v. Löwise9416172003-05-03 10:12:45 +000014441echo "$as_me:$LINENO: result: no" >&5
14442echo "${ECHO_T}no" >&6
14443
14444fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014445rm -f conftest.err conftest.$ac_objext \
14446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014447
14448echo "$as_me:$LINENO: checking for inet_pton" >&5
14449echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14450cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014451/* confdefs.h. */
14452_ACEOF
14453cat confdefs.h >>conftest.$ac_ext
14454cat >>conftest.$ac_ext <<_ACEOF
14455/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014456
14457#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014458#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014459#include <sys/socket.h>
14460#include <netinet/in.h>
14461#include <arpa/inet.h>
14462
Martin v. Löwise9416172003-05-03 10:12:45 +000014463int
14464main ()
14465{
14466void* p = inet_pton
14467 ;
14468 return 0;
14469}
14470_ACEOF
14471rm -f conftest.$ac_objext
14472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014473 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014475 grep -v '^ *+' conftest.er1 >conftest.err
14476 rm -f conftest.er1
14477 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14479 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014480 { ac_try='test -z "$ac_c_werror_flag"
14481 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14483 (eval $ac_try) 2>&5
14484 ac_status=$?
14485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14486 (exit $ac_status); }; } &&
14487 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +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); }; }; then
14493
14494cat >>confdefs.h <<\_ACEOF
14495#define HAVE_INET_PTON 1
14496_ACEOF
14497
14498 echo "$as_me:$LINENO: result: yes" >&5
14499echo "${ECHO_T}yes" >&6
14500else
14501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014502sed 's/^/| /' conftest.$ac_ext >&5
14503
Martin v. Löwise9416172003-05-03 10:12:45 +000014504echo "$as_me:$LINENO: result: no" >&5
14505echo "${ECHO_T}no" >&6
14506
14507fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014509
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014510# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014511echo "$as_me:$LINENO: checking for setgroups" >&5
14512echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14513cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014514/* confdefs.h. */
14515_ACEOF
14516cat confdefs.h >>conftest.$ac_ext
14517cat >>conftest.$ac_ext <<_ACEOF
14518/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014519
14520#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014521#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014522#ifdef HAVE_GRP_H
14523#include <grp.h>
14524#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014525
Martin v. Löwisd5843682002-11-21 20:41:28 +000014526int
14527main ()
14528{
14529void* p = setgroups
14530 ;
14531 return 0;
14532}
14533_ACEOF
14534rm -f conftest.$ac_objext
14535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014536 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014538 grep -v '^ *+' conftest.er1 >conftest.err
14539 rm -f conftest.er1
14540 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14542 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014543 { ac_try='test -z "$ac_c_werror_flag"
14544 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14546 (eval $ac_try) 2>&5
14547 ac_status=$?
14548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14549 (exit $ac_status); }; } &&
14550 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +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); }; }; then
14556
14557cat >>confdefs.h <<\_ACEOF
14558#define HAVE_SETGROUPS 1
14559_ACEOF
14560
14561 echo "$as_me:$LINENO: result: yes" >&5
14562echo "${ECHO_T}yes" >&6
14563else
14564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014565sed 's/^/| /' conftest.$ac_ext >&5
14566
Martin v. Löwisd5843682002-11-21 20:41:28 +000014567echo "$as_me:$LINENO: result: no" >&5
14568echo "${ECHO_T}no" >&6
14569
14570fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014571rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014572
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014573# check for openpty and forkpty
14574
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014576for ac_func in openpty
14577do
Martin v. Löwis11437992002-04-12 09:54:03 +000014578as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14579echo "$as_me:$LINENO: checking for $ac_func" >&5
14580echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14581if eval "test \"\${$as_ac_var+set}\" = set"; then
14582 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014583else
Martin v. Löwis11437992002-04-12 09:54:03 +000014584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014585/* confdefs.h. */
14586_ACEOF
14587cat confdefs.h >>conftest.$ac_ext
14588cat >>conftest.$ac_ext <<_ACEOF
14589/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014590/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014591 which can conflict with char $ac_func (); below.
14592 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014593 <limits.h> exists even on freestanding compilers. Under hpux,
14594 including <limits.h> includes <sys/time.h> and causes problems
14595 checking for functions defined therein. */
14596#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014597# include <limits.h>
14598#else
14599# include <assert.h>
14600#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014601/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014602#ifdef __cplusplus
14603extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014604{
Martin v. Löwis11437992002-04-12 09:54:03 +000014605#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014606/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 builtin and then its argument prototype would still apply. */
14608char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014609/* The GNU C library defines this for functions which it implements
14610 to always fail with ENOSYS. Some functions are actually named
14611 something starting with __ and the normal name is an alias. */
14612#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14613choke me
14614#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014615char (*f) () = $ac_func;
14616#endif
14617#ifdef __cplusplus
14618}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014619#endif
14620
Skip Montanaro6dead952003-09-25 14:50:04 +000014621int
14622main ()
14623{
14624return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014625 ;
14626 return 0;
14627}
14628_ACEOF
14629rm -f conftest.$ac_objext conftest$ac_exeext
14630if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014631 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014633 grep -v '^ *+' conftest.er1 >conftest.err
14634 rm -f conftest.er1
14635 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14637 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014638 { ac_try='test -z "$ac_c_werror_flag"
14639 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14641 (eval $ac_try) 2>&5
14642 ac_status=$?
14643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14644 (exit $ac_status); }; } &&
14645 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
14651 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014652else
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014654sed 's/^/| /' conftest.$ac_ext >&5
14655
Martin v. Löwis11437992002-04-12 09:54:03 +000014656eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014657fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014658rm -f conftest.err conftest.$ac_objext \
14659 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014661echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14662echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14663if test `eval echo '${'$as_ac_var'}'` = yes; then
14664 cat >>confdefs.h <<_ACEOF
14665#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14666_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014667
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014668else
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14670echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14671if test "${ac_cv_lib_util_openpty+set}" = set; then
14672 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014673else
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014675LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014677/* confdefs.h. */
14678_ACEOF
14679cat confdefs.h >>conftest.$ac_ext
14680cat >>conftest.$ac_ext <<_ACEOF
14681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014682
Fred Drake8cef4cf2000-06-28 16:40:38 +000014683/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014684#ifdef __cplusplus
14685extern "C"
14686#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014687/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014688 builtin and then its argument prototype would still apply. */
14689char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014690int
14691main ()
14692{
14693openpty ();
14694 ;
14695 return 0;
14696}
14697_ACEOF
14698rm -f conftest.$ac_objext conftest$ac_exeext
14699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014700 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014702 grep -v '^ *+' conftest.er1 >conftest.err
14703 rm -f conftest.er1
14704 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14706 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014707 { ac_try='test -z "$ac_c_werror_flag"
14708 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14710 (eval $ac_try) 2>&5
14711 ac_status=$?
14712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713 (exit $ac_status); }; } &&
14714 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
14720 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014721else
Martin v. Löwis11437992002-04-12 09:54:03 +000014722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014723sed 's/^/| /' conftest.$ac_ext >&5
14724
Martin v. Löwis11437992002-04-12 09:54:03 +000014725ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014726fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014727rm -f conftest.err conftest.$ac_objext \
14728 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014729LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014731echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14732echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14733if test $ac_cv_lib_util_openpty = yes; then
14734 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014735#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014736_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014737 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014738fi
14739
14740fi
14741done
14742
Martin v. Löwis11437992002-04-12 09:54:03 +000014743
Fred Drake8cef4cf2000-06-28 16:40:38 +000014744for ac_func in forkpty
14745do
Martin v. Löwis11437992002-04-12 09:54:03 +000014746as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14747echo "$as_me:$LINENO: checking for $ac_func" >&5
14748echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14749if eval "test \"\${$as_ac_var+set}\" = set"; then
14750 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014751else
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014753/* confdefs.h. */
14754_ACEOF
14755cat confdefs.h >>conftest.$ac_ext
14756cat >>conftest.$ac_ext <<_ACEOF
14757/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014758/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014759 which can conflict with char $ac_func (); below.
14760 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014761 <limits.h> exists even on freestanding compilers. Under hpux,
14762 including <limits.h> includes <sys/time.h> and causes problems
14763 checking for functions defined therein. */
14764#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014765# include <limits.h>
14766#else
14767# include <assert.h>
14768#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014769/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014770#ifdef __cplusplus
14771extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014772{
Martin v. Löwis11437992002-04-12 09:54:03 +000014773#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014774/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 builtin and then its argument prototype would still apply. */
14776char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014777/* The GNU C library defines this for functions which it implements
14778 to always fail with ENOSYS. Some functions are actually named
14779 something starting with __ and the normal name is an alias. */
14780#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14781choke me
14782#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014783char (*f) () = $ac_func;
14784#endif
14785#ifdef __cplusplus
14786}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014787#endif
14788
Skip Montanaro6dead952003-09-25 14:50:04 +000014789int
14790main ()
14791{
14792return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014793 ;
14794 return 0;
14795}
14796_ACEOF
14797rm -f conftest.$ac_objext conftest$ac_exeext
14798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014799 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014801 grep -v '^ *+' conftest.er1 >conftest.err
14802 rm -f conftest.er1
14803 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14805 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014806 { ac_try='test -z "$ac_c_werror_flag"
14807 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14809 (eval $ac_try) 2>&5
14810 ac_status=$?
14811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14812 (exit $ac_status); }; } &&
14813 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
14819 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014820else
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014822sed 's/^/| /' conftest.$ac_ext >&5
14823
Martin v. Löwis11437992002-04-12 09:54:03 +000014824eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014825fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014826rm -f conftest.err conftest.$ac_objext \
14827 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014828fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014829echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14830echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14831if test `eval echo '${'$as_ac_var'}'` = yes; then
14832 cat >>confdefs.h <<_ACEOF
14833#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14834_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014835
Fred Drake8cef4cf2000-06-28 16:40:38 +000014836else
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14838echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14839if test "${ac_cv_lib_util_forkpty+set}" = set; then
14840 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014841else
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014843LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014844cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014845/* confdefs.h. */
14846_ACEOF
14847cat confdefs.h >>conftest.$ac_ext
14848cat >>conftest.$ac_ext <<_ACEOF
14849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014850
Fred Drake8cef4cf2000-06-28 16:40:38 +000014851/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014852#ifdef __cplusplus
14853extern "C"
14854#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014855/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 builtin and then its argument prototype would still apply. */
14857char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014858int
14859main ()
14860{
14861forkpty ();
14862 ;
14863 return 0;
14864}
14865_ACEOF
14866rm -f conftest.$ac_objext conftest$ac_exeext
14867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014868 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014870 grep -v '^ *+' conftest.er1 >conftest.err
14871 rm -f conftest.er1
14872 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14874 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014875 { ac_try='test -z "$ac_c_werror_flag"
14876 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14878 (eval $ac_try) 2>&5
14879 ac_status=$?
14880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14881 (exit $ac_status); }; } &&
14882 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
14888 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014889else
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014891sed 's/^/| /' conftest.$ac_ext >&5
14892
Martin v. Löwis11437992002-04-12 09:54:03 +000014893ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014894fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014895rm -f conftest.err conftest.$ac_objext \
14896 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014897LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014898fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014899echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14900echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14901if test $ac_cv_lib_util_forkpty = yes; then
14902 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014903#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014904_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014905 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014906fi
14907
14908fi
14909done
14910
Jack Jansendd19cf82001-12-06 22:36:17 +000014911
Michael W. Hudson54241132001-12-07 15:38:26 +000014912# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014913
14914
14915
14916
14917
14918
Fred Drake8cef4cf2000-06-28 16:40:38 +000014919for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14920do
Martin v. Löwis11437992002-04-12 09:54:03 +000014921as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14922echo "$as_me:$LINENO: checking for $ac_func" >&5
14923echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14924if eval "test \"\${$as_ac_var+set}\" = set"; then
14925 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014926else
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014928/* confdefs.h. */
14929_ACEOF
14930cat confdefs.h >>conftest.$ac_ext
14931cat >>conftest.$ac_ext <<_ACEOF
14932/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014933/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014934 which can conflict with char $ac_func (); below.
14935 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014936 <limits.h> exists even on freestanding compilers. Under hpux,
14937 including <limits.h> includes <sys/time.h> and causes problems
14938 checking for functions defined therein. */
14939#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014940# include <limits.h>
14941#else
14942# include <assert.h>
14943#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014944/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014945#ifdef __cplusplus
14946extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014947{
Martin v. Löwis11437992002-04-12 09:54:03 +000014948#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014949/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 builtin and then its argument prototype would still apply. */
14951char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014952/* The GNU C library defines this for functions which it implements
14953 to always fail with ENOSYS. Some functions are actually named
14954 something starting with __ and the normal name is an alias. */
14955#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14956choke me
14957#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014958char (*f) () = $ac_func;
14959#endif
14960#ifdef __cplusplus
14961}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014962#endif
14963
Skip Montanaro6dead952003-09-25 14:50:04 +000014964int
14965main ()
14966{
14967return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014968 ;
14969 return 0;
14970}
14971_ACEOF
14972rm -f conftest.$ac_objext conftest$ac_exeext
14973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014974 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014976 grep -v '^ *+' conftest.er1 >conftest.err
14977 rm -f conftest.er1
14978 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14980 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014981 { ac_try='test -z "$ac_c_werror_flag"
14982 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14984 (eval $ac_try) 2>&5
14985 ac_status=$?
14986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14987 (exit $ac_status); }; } &&
14988 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
14994 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014995else
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014997sed 's/^/| /' conftest.$ac_ext >&5
14998
Martin v. Löwis11437992002-04-12 09:54:03 +000014999eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015000fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015001rm -f conftest.err conftest.$ac_objext \
15002 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015003fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015004echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15005echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15006if test `eval echo '${'$as_ac_var'}'` = yes; then
15007 cat >>confdefs.h <<_ACEOF
15008#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15009_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015010
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015011fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015012done
15013
Michael W. Hudson54241132001-12-07 15:38:26 +000015014
Martin v. Löwis11437992002-04-12 09:54:03 +000015015
15016
15017
15018
15019
Martin v. Löwis1142de32002-03-29 16:28:31 +000015020for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000015021do
Martin v. Löwis11437992002-04-12 09:54:03 +000015022as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15023echo "$as_me:$LINENO: checking for $ac_func" >&5
15024echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15025if eval "test \"\${$as_ac_var+set}\" = set"; then
15026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015027else
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015029/* confdefs.h. */
15030_ACEOF
15031cat confdefs.h >>conftest.$ac_ext
15032cat >>conftest.$ac_ext <<_ACEOF
15033/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015034/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015035 which can conflict with char $ac_func (); below.
15036 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015037 <limits.h> exists even on freestanding compilers. Under hpux,
15038 including <limits.h> includes <sys/time.h> and causes problems
15039 checking for functions defined therein. */
15040#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015041# include <limits.h>
15042#else
15043# include <assert.h>
15044#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015045/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015046#ifdef __cplusplus
15047extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015048{
Martin v. Löwis11437992002-04-12 09:54:03 +000015049#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015050/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 builtin and then its argument prototype would still apply. */
15052char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015053/* The GNU C library defines this for functions which it implements
15054 to always fail with ENOSYS. Some functions are actually named
15055 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015056#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015057choke me
15058#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015059char (*f) () = $ac_func;
15060#endif
15061#ifdef __cplusplus
15062}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015063#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015064
Skip Montanaro6dead952003-09-25 14:50:04 +000015065int
15066main ()
15067{
15068return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 ;
15070 return 0;
15071}
15072_ACEOF
15073rm -f conftest.$ac_objext conftest$ac_exeext
15074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015075 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015077 grep -v '^ *+' conftest.er1 >conftest.err
15078 rm -f conftest.er1
15079 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15081 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015082 { ac_try='test -z "$ac_c_werror_flag"
15083 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15085 (eval $ac_try) 2>&5
15086 ac_status=$?
15087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15088 (exit $ac_status); }; } &&
15089 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
15095 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015096else
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015098sed 's/^/| /' conftest.$ac_ext >&5
15099
Martin v. Löwis11437992002-04-12 09:54:03 +000015100eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015101fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015102rm -f conftest.err conftest.$ac_objext \
15103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015105echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15106echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15107if test `eval echo '${'$as_ac_var'}'` = yes; then
15108 cat >>confdefs.h <<_ACEOF
15109#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15110_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015111
Martin v. Löwis1142de32002-03-29 16:28:31 +000015112else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015113 case $LIBOBJS in
15114 "$ac_func.$ac_objext" | \
15115 *" $ac_func.$ac_objext" | \
15116 "$ac_func.$ac_objext "* | \
15117 *" $ac_func.$ac_objext "* ) ;;
15118 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15119esac
15120
Martin v. Löwis1142de32002-03-29 16:28:31 +000015121fi
15122done
15123
15124
Martin v. Löwis11437992002-04-12 09:54:03 +000015125
Martin v. Löwis1142de32002-03-29 16:28:31 +000015126for ac_func in getpgrp
15127do
Martin v. Löwis11437992002-04-12 09:54:03 +000015128as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15129echo "$as_me:$LINENO: checking for $ac_func" >&5
15130echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15131if eval "test \"\${$as_ac_var+set}\" = set"; then
15132 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015133else
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015135/* confdefs.h. */
15136_ACEOF
15137cat confdefs.h >>conftest.$ac_ext
15138cat >>conftest.$ac_ext <<_ACEOF
15139/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000015140/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015141 which can conflict with char $ac_func (); below.
15142 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015143 <limits.h> exists even on freestanding compilers. Under hpux,
15144 including <limits.h> includes <sys/time.h> and causes problems
15145 checking for functions defined therein. */
15146#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015147# include <limits.h>
15148#else
15149# include <assert.h>
15150#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015151/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015152#ifdef __cplusplus
15153extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015154{
Martin v. Löwis11437992002-04-12 09:54:03 +000015155#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015156/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 builtin and then its argument prototype would still apply. */
15158char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015159/* The GNU C library defines this for functions which it implements
15160 to always fail with ENOSYS. Some functions are actually named
15161 something starting with __ and the normal name is an alias. */
15162#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15163choke me
15164#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015165char (*f) () = $ac_func;
15166#endif
15167#ifdef __cplusplus
15168}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015169#endif
15170
Skip Montanaro6dead952003-09-25 14:50:04 +000015171int
15172main ()
15173{
15174return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 ;
15176 return 0;
15177}
15178_ACEOF
15179rm -f conftest.$ac_objext conftest$ac_exeext
15180if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015181 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015183 grep -v '^ *+' conftest.er1 >conftest.err
15184 rm -f conftest.er1
15185 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15187 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015188 { ac_try='test -z "$ac_c_werror_flag"
15189 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15191 (eval $ac_try) 2>&5
15192 ac_status=$?
15193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15194 (exit $ac_status); }; } &&
15195 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15197 (eval $ac_try) 2>&5
15198 ac_status=$?
15199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15200 (exit $ac_status); }; }; then
15201 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015202else
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015204sed 's/^/| /' conftest.$ac_ext >&5
15205
Martin v. Löwis11437992002-04-12 09:54:03 +000015206eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015207fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015208rm -f conftest.err conftest.$ac_objext \
15209 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015211echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15212echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15213if test `eval echo '${'$as_ac_var'}'` = yes; then
15214 cat >>confdefs.h <<_ACEOF
15215#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15216_ACEOF
15217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015218/* confdefs.h. */
15219_ACEOF
15220cat confdefs.h >>conftest.$ac_ext
15221cat >>conftest.$ac_ext <<_ACEOF
15222/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015223#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015224int
15225main ()
15226{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015227getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015228 ;
15229 return 0;
15230}
15231_ACEOF
15232rm -f conftest.$ac_objext
15233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015234 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015236 grep -v '^ *+' conftest.er1 >conftest.err
15237 rm -f conftest.er1
15238 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15240 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015241 { ac_try='test -z "$ac_c_werror_flag"
15242 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15244 (eval $ac_try) 2>&5
15245 ac_status=$?
15246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15247 (exit $ac_status); }; } &&
15248 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
15254
15255cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015256#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015257_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015258
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
Guido van Rossumf78abae1997-01-21 22:02:36 +000015260else
Martin v. Löwis11437992002-04-12 09:54:03 +000015261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015262sed 's/^/| /' conftest.$ac_ext >&5
15263
Guido van Rossum627b2d71993-12-24 10:39:16 +000015264fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015265rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015266
Guido van Rossum627b2d71993-12-24 10:39:16 +000015267fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015268done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015269
Jack Jansen150753c2003-03-29 22:07:47 +000015270
15271for ac_func in setpgrp
15272do
15273as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15274echo "$as_me:$LINENO: checking for $ac_func" >&5
15275echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15276if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015278else
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015280/* confdefs.h. */
15281_ACEOF
15282cat confdefs.h >>conftest.$ac_ext
15283cat >>conftest.$ac_ext <<_ACEOF
15284/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015285/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015286 which can conflict with char $ac_func (); below.
15287 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015288 <limits.h> exists even on freestanding compilers. Under hpux,
15289 including <limits.h> includes <sys/time.h> and causes problems
15290 checking for functions defined therein. */
15291#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015292# include <limits.h>
15293#else
15294# include <assert.h>
15295#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015296/* Override any gcc2 internal prototype to avoid an error. */
15297#ifdef __cplusplus
15298extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015299{
Martin v. Löwis11437992002-04-12 09:54:03 +000015300#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015301/* We use char because int might match the return type of a gcc2
15302 builtin and then its argument prototype would still apply. */
15303char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015304/* The GNU C library defines this for functions which it implements
15305 to always fail with ENOSYS. Some functions are actually named
15306 something starting with __ and the normal name is an alias. */
15307#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15308choke me
15309#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015310char (*f) () = $ac_func;
15311#endif
15312#ifdef __cplusplus
15313}
Jack Jansen150753c2003-03-29 22:07:47 +000015314#endif
15315
Skip Montanaro6dead952003-09-25 14:50:04 +000015316int
15317main ()
15318{
15319return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 ;
15321 return 0;
15322}
15323_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015324rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015326 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015328 grep -v '^ *+' conftest.er1 >conftest.err
15329 rm -f conftest.er1
15330 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015332 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015333 { ac_try='test -z "$ac_c_werror_flag"
15334 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15336 (eval $ac_try) 2>&5
15337 ac_status=$?
15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339 (exit $ac_status); }; } &&
15340 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15342 (eval $ac_try) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015346 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015347else
Jack Jansen150753c2003-03-29 22:07:47 +000015348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015349sed 's/^/| /' conftest.$ac_ext >&5
15350
Jack Jansen150753c2003-03-29 22:07:47 +000015351eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015352fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015353rm -f conftest.err conftest.$ac_objext \
15354 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015355fi
Jack Jansen150753c2003-03-29 22:07:47 +000015356echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15357echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15358if test `eval echo '${'$as_ac_var'}'` = yes; then
15359 cat >>confdefs.h <<_ACEOF
15360#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15361_ACEOF
15362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015363/* confdefs.h. */
15364_ACEOF
15365cat confdefs.h >>conftest.$ac_ext
15366cat >>conftest.$ac_ext <<_ACEOF
15367/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015368#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015369int
15370main ()
15371{
15372setpgrp(0,0);
15373 ;
15374 return 0;
15375}
15376_ACEOF
15377rm -f conftest.$ac_objext
15378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015379 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015381 grep -v '^ *+' conftest.er1 >conftest.err
15382 rm -f conftest.er1
15383 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15385 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015386 { ac_try='test -z "$ac_c_werror_flag"
15387 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15389 (eval $ac_try) 2>&5
15390 ac_status=$?
15391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392 (exit $ac_status); }; } &&
15393 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +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); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015399
15400cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015401#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015402_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015403
Jack Jansen150753c2003-03-29 22:07:47 +000015404
15405else
15406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015407sed 's/^/| /' conftest.$ac_ext >&5
15408
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015409fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015410rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015411
15412fi
15413done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015414
Martin v. Löwis11437992002-04-12 09:54:03 +000015415
Thomas Wouters3a584202000-08-05 23:28:51 +000015416for ac_func in gettimeofday
15417do
Martin v. Löwis11437992002-04-12 09:54:03 +000015418as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15419echo "$as_me:$LINENO: checking for $ac_func" >&5
15420echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15421if eval "test \"\${$as_ac_var+set}\" = set"; then
15422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015423else
Martin v. Löwis11437992002-04-12 09:54:03 +000015424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015425/* confdefs.h. */
15426_ACEOF
15427cat confdefs.h >>conftest.$ac_ext
15428cat >>conftest.$ac_ext <<_ACEOF
15429/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015430/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015431 which can conflict with char $ac_func (); below.
15432 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015433 <limits.h> exists even on freestanding compilers. Under hpux,
15434 including <limits.h> includes <sys/time.h> and causes problems
15435 checking for functions defined therein. */
15436#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015437# include <limits.h>
15438#else
15439# include <assert.h>
15440#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015441/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015442#ifdef __cplusplus
15443extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015444{
Martin v. Löwis11437992002-04-12 09:54:03 +000015445#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015446/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015447 builtin and then its argument prototype would still apply. */
15448char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015449/* The GNU C library defines this for functions which it implements
15450 to always fail with ENOSYS. Some functions are actually named
15451 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015452#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015453choke me
15454#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015455char (*f) () = $ac_func;
15456#endif
15457#ifdef __cplusplus
15458}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015459#endif
15460
Skip Montanaro6dead952003-09-25 14:50:04 +000015461int
15462main ()
15463{
15464return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015465 ;
15466 return 0;
15467}
15468_ACEOF
15469rm -f conftest.$ac_objext conftest$ac_exeext
15470if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015471 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015473 grep -v '^ *+' conftest.er1 >conftest.err
15474 rm -f conftest.er1
15475 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015478 { ac_try='test -z "$ac_c_werror_flag"
15479 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15481 (eval $ac_try) 2>&5
15482 ac_status=$?
15483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15484 (exit $ac_status); }; } &&
15485 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15487 (eval $ac_try) 2>&5
15488 ac_status=$?
15489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15490 (exit $ac_status); }; }; then
15491 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015492else
Martin v. Löwis11437992002-04-12 09:54:03 +000015493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015494sed 's/^/| /' conftest.$ac_ext >&5
15495
Martin v. Löwis11437992002-04-12 09:54:03 +000015496eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015497fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015498rm -f conftest.err conftest.$ac_objext \
15499 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015500fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015501echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15502echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15503if test `eval echo '${'$as_ac_var'}'` = yes; then
15504 cat >>confdefs.h <<_ACEOF
15505#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15506_ACEOF
15507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015508/* confdefs.h. */
15509_ACEOF
15510cat confdefs.h >>conftest.$ac_ext
15511cat >>conftest.$ac_ext <<_ACEOF
15512/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015513#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015514int
15515main ()
15516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015517gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 ;
15519 return 0;
15520}
15521_ACEOF
15522rm -f conftest.$ac_objext
15523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015524 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015526 grep -v '^ *+' conftest.er1 >conftest.err
15527 rm -f conftest.er1
15528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015531 { ac_try='test -z "$ac_c_werror_flag"
15532 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15534 (eval $ac_try) 2>&5
15535 ac_status=$?
15536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15537 (exit $ac_status); }; } &&
15538 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015544 :
15545else
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015547sed 's/^/| /' conftest.$ac_ext >&5
15548
Martin v. Löwis11437992002-04-12 09:54:03 +000015549
15550cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015551#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015552_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015553
Martin v. Löwis11437992002-04-12 09:54:03 +000015554
Guido van Rossum627b2d71993-12-24 10:39:16 +000015555fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015556rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015557
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015558fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015559done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015560
Michael W. Hudson54241132001-12-07 15:38:26 +000015561
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015562echo "$as_me:$LINENO: checking for major" >&5
15563echo $ECHO_N "checking for major... $ECHO_C" >&6
15564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015565/* confdefs.h. */
15566_ACEOF
15567cat confdefs.h >>conftest.$ac_ext
15568cat >>conftest.$ac_ext <<_ACEOF
15569/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015570
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015571#if defined(MAJOR_IN_MKDEV)
15572#include <sys/mkdev.h>
15573#elif defined(MAJOR_IN_SYSMACROS)
15574#include <sys/sysmacros.h>
15575#else
15576#include <sys/types.h>
15577#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015578
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015579int
15580main ()
15581{
15582
15583 makedev(major(0),minor(0));
15584
15585 ;
15586 return 0;
15587}
15588_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000015589rm -f conftest.$ac_objext conftest$ac_exeext
15590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015591 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015593 grep -v '^ *+' conftest.er1 >conftest.err
15594 rm -f conftest.er1
15595 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15597 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015598 { ac_try='test -z "$ac_c_werror_flag"
15599 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15601 (eval $ac_try) 2>&5
15602 ac_status=$?
15603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15604 (exit $ac_status); }; } &&
15605 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +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); }; }; then
15611
15612
15613cat >>confdefs.h <<\_ACEOF
15614#define HAVE_DEVICE_MACROS 1
15615_ACEOF
15616
15617 echo "$as_me:$LINENO: result: yes" >&5
15618echo "${ECHO_T}yes" >&6
15619
15620else
15621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015622sed 's/^/| /' conftest.$ac_ext >&5
15623
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015624
15625 echo "$as_me:$LINENO: result: no" >&5
15626echo "${ECHO_T}no" >&6
15627
15628fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015629rm -f conftest.err conftest.$ac_objext \
15630 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015631
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015632# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015633# for [no]getaddrinfo in netdb.h.
15634echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15635echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
15636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015637/* confdefs.h. */
15638_ACEOF
15639cat confdefs.h >>conftest.$ac_ext
15640cat >>conftest.$ac_ext <<_ACEOF
15641/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015642
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015643#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015644#include <sys/socket.h>
15645#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015646#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015647
Martin v. Löwis11437992002-04-12 09:54:03 +000015648int
15649main ()
15650{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015651
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015652getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015653
Martin v. Löwis11437992002-04-12 09:54:03 +000015654 ;
15655 return 0;
15656}
15657_ACEOF
15658rm -f conftest.$ac_objext conftest$ac_exeext
15659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015660 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015662 grep -v '^ *+' conftest.er1 >conftest.err
15663 rm -f conftest.er1
15664 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15666 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015667 { ac_try='test -z "$ac_c_werror_flag"
15668 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15670 (eval $ac_try) 2>&5
15671 ac_status=$?
15672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15673 (exit $ac_status); }; } &&
15674 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
15680
15681echo "$as_me:$LINENO: result: yes" >&5
15682echo "${ECHO_T}yes" >&6
15683echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
15684echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015685if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015686 echo "$as_me:$LINENO: result: buggy" >&5
15687echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015688buggygetaddrinfo=yes
15689else
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015691/* confdefs.h. */
15692_ACEOF
15693cat confdefs.h >>conftest.$ac_ext
15694cat >>conftest.$ac_ext <<_ACEOF
15695/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015696
15697#include <sys/types.h>
15698#include <netdb.h>
15699#include <string.h>
15700#include <sys/socket.h>
15701#include <netinet/in.h>
15702
15703main()
15704{
15705 int passive, gaierr, inet4 = 0, inet6 = 0;
15706 struct addrinfo hints, *ai, *aitop;
15707 char straddr[INET6_ADDRSTRLEN], strport[16];
15708
15709 for (passive = 0; passive <= 1; passive++) {
15710 memset(&hints, 0, sizeof(hints));
15711 hints.ai_family = AF_UNSPEC;
15712 hints.ai_flags = passive ? AI_PASSIVE : 0;
15713 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015714 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015715 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15716 (void)gai_strerror(gaierr);
15717 goto bad;
15718 }
15719 for (ai = aitop; ai; ai = ai->ai_next) {
15720 if (ai->ai_addr == NULL ||
15721 ai->ai_addrlen == 0 ||
15722 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15723 straddr, sizeof(straddr), strport, sizeof(strport),
15724 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15725 goto bad;
15726 }
15727 switch (ai->ai_family) {
15728 case AF_INET:
15729 if (strcmp(strport, "54321") != 0) {
15730 goto bad;
15731 }
15732 if (passive) {
15733 if (strcmp(straddr, "0.0.0.0") != 0) {
15734 goto bad;
15735 }
15736 } else {
15737 if (strcmp(straddr, "127.0.0.1") != 0) {
15738 goto bad;
15739 }
15740 }
15741 inet4++;
15742 break;
15743 case AF_INET6:
15744 if (strcmp(strport, "54321") != 0) {
15745 goto bad;
15746 }
15747 if (passive) {
15748 if (strcmp(straddr, "::") != 0) {
15749 goto bad;
15750 }
15751 } else {
15752 if (strcmp(straddr, "::1") != 0) {
15753 goto bad;
15754 }
15755 }
15756 inet6++;
15757 break;
15758 case AF_UNSPEC:
15759 goto bad;
15760 break;
15761 default:
15762 /* another family support? */
15763 break;
15764 }
15765 }
15766 }
15767
15768 if (!(inet4 == 0 || inet4 == 2))
15769 goto bad;
15770 if (!(inet6 == 0 || inet6 == 2))
15771 goto bad;
15772
15773 if (aitop)
15774 freeaddrinfo(aitop);
15775 exit(0);
15776
15777 bad:
15778 if (aitop)
15779 freeaddrinfo(aitop);
15780 exit(1);
15781}
15782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783_ACEOF
15784rm -f conftest$ac_exeext
15785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15786 (eval $ac_link) 2>&5
15787 ac_status=$?
15788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15791 (eval $ac_try) 2>&5
15792 ac_status=$?
15793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15794 (exit $ac_status); }; }; then
15795 echo "$as_me:$LINENO: result: good" >&5
15796echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015797buggygetaddrinfo=no
15798else
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 echo "$as_me: program exited with status $ac_status" >&5
15800echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015801sed 's/^/| /' conftest.$ac_ext >&5
15802
Martin v. Löwis11437992002-04-12 09:54:03 +000015803( exit $ac_status )
15804echo "$as_me:$LINENO: result: buggy" >&5
15805echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015806buggygetaddrinfo=yes
15807fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015808rm -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 +000015809fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015810else
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015812sed 's/^/| /' conftest.$ac_ext >&5
15813
Martin v. Löwis11437992002-04-12 09:54:03 +000015814
15815echo "$as_me:$LINENO: result: no" >&5
15816echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015817buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015818
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015819fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015820rm -f conftest.err conftest.$ac_objext \
15821 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015822
15823if test "$buggygetaddrinfo" = "yes"; then
15824 if test "$ipv6" = "yes"; then
15825 echo 'Fatal: You must get working getaddrinfo() function.'
15826 echo ' or you can specify "--disable-ipv6"'.
15827 exit 1
15828 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015829else
Martin v. Löwis11437992002-04-12 09:54:03 +000015830
15831cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015832#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015833_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015834
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015837for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015838do
Martin v. Löwis11437992002-04-12 09:54:03 +000015839as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15840echo "$as_me:$LINENO: checking for $ac_func" >&5
15841echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15842if eval "test \"\${$as_ac_var+set}\" = set"; then
15843 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015844else
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015846/* confdefs.h. */
15847_ACEOF
15848cat confdefs.h >>conftest.$ac_ext
15849cat >>conftest.$ac_ext <<_ACEOF
15850/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015851/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015852 which can conflict with char $ac_func (); below.
15853 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015854 <limits.h> exists even on freestanding compilers. Under hpux,
15855 including <limits.h> includes <sys/time.h> and causes problems
15856 checking for functions defined therein. */
15857#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015858# include <limits.h>
15859#else
15860# include <assert.h>
15861#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015862/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015863#ifdef __cplusplus
15864extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015865{
Martin v. Löwis11437992002-04-12 09:54:03 +000015866#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015867/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 builtin and then its argument prototype would still apply. */
15869char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015870/* The GNU C library defines this for functions which it implements
15871 to always fail with ENOSYS. Some functions are actually named
15872 something starting with __ and the normal name is an alias. */
15873#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15874choke me
15875#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015876char (*f) () = $ac_func;
15877#endif
15878#ifdef __cplusplus
15879}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015880#endif
15881
Skip Montanaro6dead952003-09-25 14:50:04 +000015882int
15883main ()
15884{
15885return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 ;
15887 return 0;
15888}
15889_ACEOF
15890rm -f conftest.$ac_objext conftest$ac_exeext
15891if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015892 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015894 grep -v '^ *+' conftest.er1 >conftest.err
15895 rm -f conftest.er1
15896 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15898 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015899 { ac_try='test -z "$ac_c_werror_flag"
15900 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15902 (eval $ac_try) 2>&5
15903 ac_status=$?
15904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15905 (exit $ac_status); }; } &&
15906 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
15912 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015913else
Martin v. Löwis11437992002-04-12 09:54:03 +000015914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015915sed 's/^/| /' conftest.$ac_ext >&5
15916
Martin v. Löwis11437992002-04-12 09:54:03 +000015917eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015918fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015919rm -f conftest.err conftest.$ac_objext \
15920 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015921fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015922echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15923echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15924if test `eval echo '${'$as_ac_var'}'` = yes; then
15925 cat >>confdefs.h <<_ACEOF
15926#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15927_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015928
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015929fi
15930done
15931
Michael W. Hudson54241132001-12-07 15:38:26 +000015932
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015933# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015934echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15935echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15936if test "${ac_cv_header_time+set}" = set; then
15937 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015938else
Martin v. Löwis11437992002-04-12 09:54:03 +000015939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015940/* confdefs.h. */
15941_ACEOF
15942cat confdefs.h >>conftest.$ac_ext
15943cat >>conftest.$ac_ext <<_ACEOF
15944/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015945#include <sys/types.h>
15946#include <sys/time.h>
15947#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015948
Martin v. Löwis11437992002-04-12 09:54:03 +000015949int
15950main ()
15951{
15952if ((struct tm *) 0)
15953return 0;
15954 ;
15955 return 0;
15956}
15957_ACEOF
15958rm -f conftest.$ac_objext
15959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015960 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015962 grep -v '^ *+' conftest.er1 >conftest.err
15963 rm -f conftest.er1
15964 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15966 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015967 { ac_try='test -z "$ac_c_werror_flag"
15968 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15970 (eval $ac_try) 2>&5
15971 ac_status=$?
15972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15973 (exit $ac_status); }; } &&
15974 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015980 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015981else
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015983sed 's/^/| /' conftest.$ac_ext >&5
15984
Martin v. Löwis11437992002-04-12 09:54:03 +000015985ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015986fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015987rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015989echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15990echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015991if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015992
15993cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015994#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015995_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015996
15997fi
15998
Martin v. Löwis11437992002-04-12 09:54:03 +000015999echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
16000echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
16001if test "${ac_cv_struct_tm+set}" = set; then
16002 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016003else
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016005/* confdefs.h. */
16006_ACEOF
16007cat confdefs.h >>conftest.$ac_ext
16008cat >>conftest.$ac_ext <<_ACEOF
16009/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016010#include <sys/types.h>
16011#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016012
Martin v. Löwis11437992002-04-12 09:54:03 +000016013int
16014main ()
16015{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016016struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 ;
16018 return 0;
16019}
16020_ACEOF
16021rm -f conftest.$ac_objext
16022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016023 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016025 grep -v '^ *+' conftest.er1 >conftest.err
16026 rm -f conftest.er1
16027 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16029 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016030 { ac_try='test -z "$ac_c_werror_flag"
16031 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16033 (eval $ac_try) 2>&5
16034 ac_status=$?
16035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036 (exit $ac_status); }; } &&
16037 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016043 ac_cv_struct_tm=time.h
16044else
Martin v. Löwis11437992002-04-12 09:54:03 +000016045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016046sed 's/^/| /' conftest.$ac_ext >&5
16047
Martin v. Löwis11437992002-04-12 09:54:03 +000016048ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016049fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016050rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016052echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16053echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016054if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016055
16056cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016057#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016058_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016059
16060fi
16061
Martin v. Löwis11437992002-04-12 09:54:03 +000016062echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16063echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16064if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16065 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016066else
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016068/* confdefs.h. */
16069_ACEOF
16070cat confdefs.h >>conftest.$ac_ext
16071cat >>conftest.$ac_ext <<_ACEOF
16072/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016073#include <sys/types.h>
16074#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016075
16076
Martin v. Löwis11437992002-04-12 09:54:03 +000016077int
16078main ()
16079{
16080static struct tm ac_aggr;
16081if (ac_aggr.tm_zone)
16082return 0;
16083 ;
16084 return 0;
16085}
16086_ACEOF
16087rm -f conftest.$ac_objext
16088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016089 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016091 grep -v '^ *+' conftest.er1 >conftest.err
16092 rm -f conftest.er1
16093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16095 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016096 { ac_try='test -z "$ac_c_werror_flag"
16097 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16099 (eval $ac_try) 2>&5
16100 ac_status=$?
16101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16102 (exit $ac_status); }; } &&
16103 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
16109 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016110else
Martin v. Löwis11437992002-04-12 09:54:03 +000016111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016112sed 's/^/| /' conftest.$ac_ext >&5
16113
16114cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016115/* confdefs.h. */
16116_ACEOF
16117cat confdefs.h >>conftest.$ac_ext
16118cat >>conftest.$ac_ext <<_ACEOF
16119/* end confdefs.h. */
16120#include <sys/types.h>
16121#include <$ac_cv_struct_tm>
16122
16123
16124int
16125main ()
16126{
16127static struct tm ac_aggr;
16128if (sizeof ac_aggr.tm_zone)
16129return 0;
16130 ;
16131 return 0;
16132}
16133_ACEOF
16134rm -f conftest.$ac_objext
16135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016136 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016138 grep -v '^ *+' conftest.er1 >conftest.err
16139 rm -f conftest.er1
16140 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16142 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016143 { ac_try='test -z "$ac_c_werror_flag"
16144 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16146 (eval $ac_try) 2>&5
16147 ac_status=$?
16148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16149 (exit $ac_status); }; } &&
16150 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +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); }; }; then
16156 ac_cv_member_struct_tm_tm_zone=yes
16157else
16158 echo "$as_me: failed program was:" >&5
16159sed 's/^/| /' conftest.$ac_ext >&5
16160
Martin v. Löwis11437992002-04-12 09:54:03 +000016161ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016162fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016163rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016164fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016165rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016166fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016167echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16168echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16169if test $ac_cv_member_struct_tm_tm_zone = yes; then
16170
16171cat >>confdefs.h <<_ACEOF
16172#define HAVE_STRUCT_TM_TM_ZONE 1
16173_ACEOF
16174
16175
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016176fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016177
Martin v. Löwis11437992002-04-12 09:54:03 +000016178if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16179
16180cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016181#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016182_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016183
16184else
Martin v. Löwis11437992002-04-12 09:54:03 +000016185 echo "$as_me:$LINENO: checking for tzname" >&5
16186echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16187if test "${ac_cv_var_tzname+set}" = set; then
16188 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016189else
Martin v. Löwis11437992002-04-12 09:54:03 +000016190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016191/* confdefs.h. */
16192_ACEOF
16193cat confdefs.h >>conftest.$ac_ext
16194cat >>conftest.$ac_ext <<_ACEOF
16195/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016196#include <time.h>
16197#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016198extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016200
Martin v. Löwis11437992002-04-12 09:54:03 +000016201int
16202main ()
16203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016204atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 ;
16206 return 0;
16207}
16208_ACEOF
16209rm -f conftest.$ac_objext conftest$ac_exeext
16210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016211 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016213 grep -v '^ *+' conftest.er1 >conftest.err
16214 rm -f conftest.er1
16215 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16217 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016218 { ac_try='test -z "$ac_c_werror_flag"
16219 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16221 (eval $ac_try) 2>&5
16222 ac_status=$?
16223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16224 (exit $ac_status); }; } &&
16225 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016231 ac_cv_var_tzname=yes
16232else
Martin v. Löwis11437992002-04-12 09:54:03 +000016233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016234sed 's/^/| /' conftest.$ac_ext >&5
16235
Martin v. Löwis11437992002-04-12 09:54:03 +000016236ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016237fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016238rm -f conftest.err conftest.$ac_objext \
16239 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016240fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016241echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16242echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016243 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016244
16245cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016246#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016247_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016248
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016249 fi
16250fi
16251
Martin v. Löwis11437992002-04-12 09:54:03 +000016252echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16253echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16254if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16255 echo $ECHO_N "(cached) $ECHO_C" >&6
16256else
16257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016258/* confdefs.h. */
16259_ACEOF
16260cat confdefs.h >>conftest.$ac_ext
16261cat >>conftest.$ac_ext <<_ACEOF
16262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016263$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016264int
16265main ()
16266{
16267static struct stat ac_aggr;
16268if (ac_aggr.st_rdev)
16269return 0;
16270 ;
16271 return 0;
16272}
16273_ACEOF
16274rm -f conftest.$ac_objext
16275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016276 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016278 grep -v '^ *+' conftest.er1 >conftest.err
16279 rm -f conftest.er1
16280 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16282 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016283 { ac_try='test -z "$ac_c_werror_flag"
16284 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16286 (eval $ac_try) 2>&5
16287 ac_status=$?
16288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16289 (exit $ac_status); }; } &&
16290 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
16296 ac_cv_member_struct_stat_st_rdev=yes
16297else
16298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016299sed 's/^/| /' conftest.$ac_ext >&5
16300
16301cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016302/* confdefs.h. */
16303_ACEOF
16304cat confdefs.h >>conftest.$ac_ext
16305cat >>conftest.$ac_ext <<_ACEOF
16306/* end confdefs.h. */
16307$ac_includes_default
16308int
16309main ()
16310{
16311static struct stat ac_aggr;
16312if (sizeof ac_aggr.st_rdev)
16313return 0;
16314 ;
16315 return 0;
16316}
16317_ACEOF
16318rm -f conftest.$ac_objext
16319if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016320 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016322 grep -v '^ *+' conftest.er1 >conftest.err
16323 rm -f conftest.er1
16324 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16326 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016327 { ac_try='test -z "$ac_c_werror_flag"
16328 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16330 (eval $ac_try) 2>&5
16331 ac_status=$?
16332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16333 (exit $ac_status); }; } &&
16334 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16336 (eval $ac_try) 2>&5
16337 ac_status=$?
16338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16339 (exit $ac_status); }; }; then
16340 ac_cv_member_struct_stat_st_rdev=yes
16341else
16342 echo "$as_me: failed program was:" >&5
16343sed 's/^/| /' conftest.$ac_ext >&5
16344
Martin v. Löwis11437992002-04-12 09:54:03 +000016345ac_cv_member_struct_stat_st_rdev=no
16346fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016347rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016348fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016349rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016351echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16352echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16353if test $ac_cv_member_struct_stat_st_rdev = yes; then
16354
16355cat >>confdefs.h <<_ACEOF
16356#define HAVE_STRUCT_STAT_ST_RDEV 1
16357_ACEOF
16358
16359
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016360fi
16361
Martin v. Löwis11437992002-04-12 09:54:03 +000016362echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16363echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16364if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16365 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016366else
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016368/* confdefs.h. */
16369_ACEOF
16370cat confdefs.h >>conftest.$ac_ext
16371cat >>conftest.$ac_ext <<_ACEOF
16372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016373$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016374int
16375main ()
16376{
16377static struct stat ac_aggr;
16378if (ac_aggr.st_blksize)
16379return 0;
16380 ;
16381 return 0;
16382}
16383_ACEOF
16384rm -f conftest.$ac_objext
16385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016386 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016388 grep -v '^ *+' conftest.er1 >conftest.err
16389 rm -f conftest.er1
16390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16392 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016393 { ac_try='test -z "$ac_c_werror_flag"
16394 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16396 (eval $ac_try) 2>&5
16397 ac_status=$?
16398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16399 (exit $ac_status); }; } &&
16400 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
16406 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016407else
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016409sed 's/^/| /' conftest.$ac_ext >&5
16410
16411cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016412/* confdefs.h. */
16413_ACEOF
16414cat confdefs.h >>conftest.$ac_ext
16415cat >>conftest.$ac_ext <<_ACEOF
16416/* end confdefs.h. */
16417$ac_includes_default
16418int
16419main ()
16420{
16421static struct stat ac_aggr;
16422if (sizeof ac_aggr.st_blksize)
16423return 0;
16424 ;
16425 return 0;
16426}
16427_ACEOF
16428rm -f conftest.$ac_objext
16429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016430 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016432 grep -v '^ *+' conftest.er1 >conftest.err
16433 rm -f conftest.er1
16434 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16436 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016437 { ac_try='test -z "$ac_c_werror_flag"
16438 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16440 (eval $ac_try) 2>&5
16441 ac_status=$?
16442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16443 (exit $ac_status); }; } &&
16444 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +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); }; }; then
16450 ac_cv_member_struct_stat_st_blksize=yes
16451else
16452 echo "$as_me: failed program was:" >&5
16453sed 's/^/| /' conftest.$ac_ext >&5
16454
Martin v. Löwis11437992002-04-12 09:54:03 +000016455ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016456fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016457rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016458fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016459rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016460fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016461echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
16462echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
16463if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016464
Martin v. Löwis11437992002-04-12 09:54:03 +000016465cat >>confdefs.h <<_ACEOF
16466#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16467_ACEOF
16468
16469
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016470fi
16471
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000016472echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
16473echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
16474if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
16475 echo $ECHO_N "(cached) $ECHO_C" >&6
16476else
16477 cat >conftest.$ac_ext <<_ACEOF
16478/* confdefs.h. */
16479_ACEOF
16480cat confdefs.h >>conftest.$ac_ext
16481cat >>conftest.$ac_ext <<_ACEOF
16482/* end confdefs.h. */
16483$ac_includes_default
16484int
16485main ()
16486{
16487static struct stat ac_aggr;
16488if (ac_aggr.st_flags)
16489return 0;
16490 ;
16491 return 0;
16492}
16493_ACEOF
16494rm -f conftest.$ac_objext
16495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16496 (eval $ac_compile) 2>conftest.er1
16497 ac_status=$?
16498 grep -v '^ *+' conftest.er1 >conftest.err
16499 rm -f conftest.er1
16500 cat conftest.err >&5
16501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16502 (exit $ac_status); } &&
16503 { ac_try='test -z "$ac_c_werror_flag"
16504 || test ! -s conftest.err'
16505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16506 (eval $ac_try) 2>&5
16507 ac_status=$?
16508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16509 (exit $ac_status); }; } &&
16510 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
16516 ac_cv_member_struct_stat_st_flags=yes
16517else
16518 echo "$as_me: failed program was:" >&5
16519sed 's/^/| /' conftest.$ac_ext >&5
16520
16521cat >conftest.$ac_ext <<_ACEOF
16522/* confdefs.h. */
16523_ACEOF
16524cat confdefs.h >>conftest.$ac_ext
16525cat >>conftest.$ac_ext <<_ACEOF
16526/* end confdefs.h. */
16527$ac_includes_default
16528int
16529main ()
16530{
16531static struct stat ac_aggr;
16532if (sizeof ac_aggr.st_flags)
16533return 0;
16534 ;
16535 return 0;
16536}
16537_ACEOF
16538rm -f conftest.$ac_objext
16539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16540 (eval $ac_compile) 2>conftest.er1
16541 ac_status=$?
16542 grep -v '^ *+' conftest.er1 >conftest.err
16543 rm -f conftest.er1
16544 cat conftest.err >&5
16545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16546 (exit $ac_status); } &&
16547 { ac_try='test -z "$ac_c_werror_flag"
16548 || test ! -s conftest.err'
16549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16550 (eval $ac_try) 2>&5
16551 ac_status=$?
16552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16553 (exit $ac_status); }; } &&
16554 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
16560 ac_cv_member_struct_stat_st_flags=yes
16561else
16562 echo "$as_me: failed program was:" >&5
16563sed 's/^/| /' conftest.$ac_ext >&5
16564
16565ac_cv_member_struct_stat_st_flags=no
16566fi
16567rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16568fi
16569rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16570fi
16571echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
16572echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
16573if test $ac_cv_member_struct_stat_st_flags = yes; then
16574
16575cat >>confdefs.h <<_ACEOF
16576#define HAVE_STRUCT_STAT_ST_FLAGS 1
16577_ACEOF
16578
16579
16580fi
16581
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016582echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
16583echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
16584if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
16585 echo $ECHO_N "(cached) $ECHO_C" >&6
16586else
16587 cat >conftest.$ac_ext <<_ACEOF
16588/* confdefs.h. */
16589_ACEOF
16590cat confdefs.h >>conftest.$ac_ext
16591cat >>conftest.$ac_ext <<_ACEOF
16592/* end confdefs.h. */
16593$ac_includes_default
16594int
16595main ()
16596{
16597static struct stat ac_aggr;
16598if (ac_aggr.st_gen)
16599return 0;
16600 ;
16601 return 0;
16602}
16603_ACEOF
16604rm -f conftest.$ac_objext
16605if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16606 (eval $ac_compile) 2>conftest.er1
16607 ac_status=$?
16608 grep -v '^ *+' conftest.er1 >conftest.err
16609 rm -f conftest.er1
16610 cat conftest.err >&5
16611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16612 (exit $ac_status); } &&
16613 { ac_try='test -z "$ac_c_werror_flag"
16614 || test ! -s conftest.err'
16615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16616 (eval $ac_try) 2>&5
16617 ac_status=$?
16618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16619 (exit $ac_status); }; } &&
16620 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
16626 ac_cv_member_struct_stat_st_gen=yes
16627else
16628 echo "$as_me: failed program was:" >&5
16629sed 's/^/| /' conftest.$ac_ext >&5
16630
16631cat >conftest.$ac_ext <<_ACEOF
16632/* confdefs.h. */
16633_ACEOF
16634cat confdefs.h >>conftest.$ac_ext
16635cat >>conftest.$ac_ext <<_ACEOF
16636/* end confdefs.h. */
16637$ac_includes_default
16638int
16639main ()
16640{
16641static struct stat ac_aggr;
16642if (sizeof ac_aggr.st_gen)
16643return 0;
16644 ;
16645 return 0;
16646}
16647_ACEOF
16648rm -f conftest.$ac_objext
16649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16650 (eval $ac_compile) 2>conftest.er1
16651 ac_status=$?
16652 grep -v '^ *+' conftest.er1 >conftest.err
16653 rm -f conftest.er1
16654 cat conftest.err >&5
16655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16656 (exit $ac_status); } &&
16657 { ac_try='test -z "$ac_c_werror_flag"
16658 || test ! -s conftest.err'
16659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16660 (eval $ac_try) 2>&5
16661 ac_status=$?
16662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16663 (exit $ac_status); }; } &&
16664 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
16670 ac_cv_member_struct_stat_st_gen=yes
16671else
16672 echo "$as_me: failed program was:" >&5
16673sed 's/^/| /' conftest.$ac_ext >&5
16674
16675ac_cv_member_struct_stat_st_gen=no
16676fi
16677rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16678fi
16679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16680fi
16681echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
16682echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
16683if test $ac_cv_member_struct_stat_st_gen = yes; then
16684
16685cat >>confdefs.h <<_ACEOF
16686#define HAVE_STRUCT_STAT_ST_GEN 1
16687_ACEOF
16688
16689
16690fi
16691
16692echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
16693echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
16694if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
16695 echo $ECHO_N "(cached) $ECHO_C" >&6
16696else
16697 cat >conftest.$ac_ext <<_ACEOF
16698/* confdefs.h. */
16699_ACEOF
16700cat confdefs.h >>conftest.$ac_ext
16701cat >>conftest.$ac_ext <<_ACEOF
16702/* end confdefs.h. */
16703$ac_includes_default
16704int
16705main ()
16706{
16707static struct stat ac_aggr;
16708if (ac_aggr.st_birthtime)
16709return 0;
16710 ;
16711 return 0;
16712}
16713_ACEOF
16714rm -f conftest.$ac_objext
16715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16716 (eval $ac_compile) 2>conftest.er1
16717 ac_status=$?
16718 grep -v '^ *+' conftest.er1 >conftest.err
16719 rm -f conftest.er1
16720 cat conftest.err >&5
16721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16722 (exit $ac_status); } &&
16723 { ac_try='test -z "$ac_c_werror_flag"
16724 || test ! -s conftest.err'
16725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16726 (eval $ac_try) 2>&5
16727 ac_status=$?
16728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729 (exit $ac_status); }; } &&
16730 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
16736 ac_cv_member_struct_stat_st_birthtime=yes
16737else
16738 echo "$as_me: failed program was:" >&5
16739sed 's/^/| /' conftest.$ac_ext >&5
16740
16741cat >conftest.$ac_ext <<_ACEOF
16742/* confdefs.h. */
16743_ACEOF
16744cat confdefs.h >>conftest.$ac_ext
16745cat >>conftest.$ac_ext <<_ACEOF
16746/* end confdefs.h. */
16747$ac_includes_default
16748int
16749main ()
16750{
16751static struct stat ac_aggr;
16752if (sizeof ac_aggr.st_birthtime)
16753return 0;
16754 ;
16755 return 0;
16756}
16757_ACEOF
16758rm -f conftest.$ac_objext
16759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16760 (eval $ac_compile) 2>conftest.er1
16761 ac_status=$?
16762 grep -v '^ *+' conftest.er1 >conftest.err
16763 rm -f conftest.er1
16764 cat conftest.err >&5
16765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16766 (exit $ac_status); } &&
16767 { ac_try='test -z "$ac_c_werror_flag"
16768 || test ! -s conftest.err'
16769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16770 (eval $ac_try) 2>&5
16771 ac_status=$?
16772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16773 (exit $ac_status); }; } &&
16774 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
16780 ac_cv_member_struct_stat_st_birthtime=yes
16781else
16782 echo "$as_me: failed program was:" >&5
16783sed 's/^/| /' conftest.$ac_ext >&5
16784
16785ac_cv_member_struct_stat_st_birthtime=no
16786fi
16787rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16788fi
16789rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16790fi
16791echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
16792echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
16793if test $ac_cv_member_struct_stat_st_birthtime = yes; then
16794
16795cat >>confdefs.h <<_ACEOF
16796#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
16797_ACEOF
16798
16799
16800fi
16801
Martin v. Löwis11437992002-04-12 09:54:03 +000016802echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
16803echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
16804if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
16805 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016806else
Martin v. Löwis11437992002-04-12 09:54:03 +000016807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016808/* confdefs.h. */
16809_ACEOF
16810cat confdefs.h >>conftest.$ac_ext
16811cat >>conftest.$ac_ext <<_ACEOF
16812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016813$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016814int
16815main ()
16816{
16817static struct stat ac_aggr;
16818if (ac_aggr.st_blocks)
16819return 0;
16820 ;
16821 return 0;
16822}
16823_ACEOF
16824rm -f conftest.$ac_objext
16825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016826 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 grep -v '^ *+' conftest.er1 >conftest.err
16829 rm -f conftest.er1
16830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16832 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016833 { ac_try='test -z "$ac_c_werror_flag"
16834 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16836 (eval $ac_try) 2>&5
16837 ac_status=$?
16838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16839 (exit $ac_status); }; } &&
16840 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
16846 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016847else
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016849sed 's/^/| /' conftest.$ac_ext >&5
16850
16851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016852/* confdefs.h. */
16853_ACEOF
16854cat confdefs.h >>conftest.$ac_ext
16855cat >>conftest.$ac_ext <<_ACEOF
16856/* end confdefs.h. */
16857$ac_includes_default
16858int
16859main ()
16860{
16861static struct stat ac_aggr;
16862if (sizeof ac_aggr.st_blocks)
16863return 0;
16864 ;
16865 return 0;
16866}
16867_ACEOF
16868rm -f conftest.$ac_objext
16869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016870 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016872 grep -v '^ *+' conftest.er1 >conftest.err
16873 rm -f conftest.er1
16874 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16876 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016877 { ac_try='test -z "$ac_c_werror_flag"
16878 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16880 (eval $ac_try) 2>&5
16881 ac_status=$?
16882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16883 (exit $ac_status); }; } &&
16884 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16886 (eval $ac_try) 2>&5
16887 ac_status=$?
16888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16889 (exit $ac_status); }; }; then
16890 ac_cv_member_struct_stat_st_blocks=yes
16891else
16892 echo "$as_me: failed program was:" >&5
16893sed 's/^/| /' conftest.$ac_ext >&5
16894
Martin v. Löwis11437992002-04-12 09:54:03 +000016895ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016896fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016897rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016898fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016901echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
16902echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
16903if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016904
Martin v. Löwis11437992002-04-12 09:54:03 +000016905cat >>confdefs.h <<_ACEOF
16906#define HAVE_STRUCT_STAT_ST_BLOCKS 1
16907_ACEOF
16908
16909
16910cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016911#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016912_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016913
16914else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016915 case $LIBOBJS in
16916 "fileblocks.$ac_objext" | \
16917 *" fileblocks.$ac_objext" | \
16918 "fileblocks.$ac_objext "* | \
16919 *" fileblocks.$ac_objext "* ) ;;
16920 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
16921esac
16922
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016923fi
16924
Michael W. Hudson54241132001-12-07 15:38:26 +000016925
Martin v. Löwis11437992002-04-12 09:54:03 +000016926
16927echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
16928echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
16929if test "${ac_cv_header_time_altzone+set}" = set; then
16930 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016931else
Martin v. Löwis11437992002-04-12 09:54:03 +000016932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016933/* confdefs.h. */
16934_ACEOF
16935cat confdefs.h >>conftest.$ac_ext
16936cat >>conftest.$ac_ext <<_ACEOF
16937/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016938#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016939int
16940main ()
16941{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016942return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016943 ;
16944 return 0;
16945}
16946_ACEOF
16947rm -f conftest.$ac_objext
16948if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016949 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016951 grep -v '^ *+' conftest.er1 >conftest.err
16952 rm -f conftest.er1
16953 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16955 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016956 { ac_try='test -z "$ac_c_werror_flag"
16957 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16959 (eval $ac_try) 2>&5
16960 ac_status=$?
16961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16962 (exit $ac_status); }; } &&
16963 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016969 ac_cv_header_time_altzone=yes
16970else
Martin v. Löwis11437992002-04-12 09:54:03 +000016971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016972sed 's/^/| /' conftest.$ac_ext >&5
16973
Martin v. Löwis11437992002-04-12 09:54:03 +000016974ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016975fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016977fi
16978
Martin v. Löwis11437992002-04-12 09:54:03 +000016979echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
16980echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016981if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016982
16983cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016984#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016985_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016986
16987fi
16988
Guido van Rossumda88dad1995-01-26 00:46:29 +000016989was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016990echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
16991echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
16992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016993/* confdefs.h. */
16994_ACEOF
16995cat confdefs.h >>conftest.$ac_ext
16996cat >>conftest.$ac_ext <<_ACEOF
16997/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016998
16999#include <sys/types.h>
17000#include <sys/select.h>
17001#include <sys/time.h>
17002
Martin v. Löwis11437992002-04-12 09:54:03 +000017003int
17004main ()
17005{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017006;
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 ;
17008 return 0;
17009}
17010_ACEOF
17011rm -f conftest.$ac_objext
17012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017013 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017015 grep -v '^ *+' conftest.er1 >conftest.err
17016 rm -f conftest.er1
17017 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17019 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017020 { ac_try='test -z "$ac_c_werror_flag"
17021 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17023 (eval $ac_try) 2>&5
17024 ac_status=$?
17025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17026 (exit $ac_status); }; } &&
17027 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17029 (eval $ac_try) 2>&5
17030 ac_status=$?
17031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17032 (exit $ac_status); }; }; then
17033
17034
17035cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017036#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017037_ACEOF
17038
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017039 was_it_defined=yes
17040
Guido van Rossumf78abae1997-01-21 22:02:36 +000017041else
Martin v. Löwis11437992002-04-12 09:54:03 +000017042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017043sed 's/^/| /' conftest.$ac_ext >&5
17044
Guido van Rossum7f43da71994-08-01 12:15:30 +000017045fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017046rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017047echo "$as_me:$LINENO: result: $was_it_defined" >&5
17048echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000017049
Martin v. Löwis11437992002-04-12 09:54:03 +000017050echo "$as_me:$LINENO: checking for addrinfo" >&5
17051echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
17052if test "${ac_cv_struct_addrinfo+set}" = set; then
17053 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017054else
Martin v. Löwis11437992002-04-12 09:54:03 +000017055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017056/* confdefs.h. */
17057_ACEOF
17058cat confdefs.h >>conftest.$ac_ext
17059cat >>conftest.$ac_ext <<_ACEOF
17060/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017061
17062# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017063int
17064main ()
17065{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017066struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000017067 ;
17068 return 0;
17069}
17070_ACEOF
17071rm -f conftest.$ac_objext
17072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017073 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017075 grep -v '^ *+' conftest.er1 >conftest.err
17076 rm -f conftest.er1
17077 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17079 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017080 { ac_try='test -z "$ac_c_werror_flag"
17081 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17083 (eval $ac_try) 2>&5
17084 ac_status=$?
17085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17086 (exit $ac_status); }; } &&
17087 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017093 ac_cv_struct_addrinfo=yes
17094else
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017096sed 's/^/| /' conftest.$ac_ext >&5
17097
Martin v. Löwis11437992002-04-12 09:54:03 +000017098ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017099fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017100rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017101fi
17102
Martin v. Löwis11437992002-04-12 09:54:03 +000017103echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
17104echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017105if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017106
17107cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017108#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017109_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017110
17111fi
17112
Martin v. Löwis11437992002-04-12 09:54:03 +000017113echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
17114echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
17115if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
17116 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017117else
Martin v. Löwis11437992002-04-12 09:54:03 +000017118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017119/* confdefs.h. */
17120_ACEOF
17121cat confdefs.h >>conftest.$ac_ext
17122cat >>conftest.$ac_ext <<_ACEOF
17123/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017124
17125# include <sys/types.h>
17126# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017127int
17128main ()
17129{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017130struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000017131 ;
17132 return 0;
17133}
17134_ACEOF
17135rm -f conftest.$ac_objext
17136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017137 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017139 grep -v '^ *+' conftest.er1 >conftest.err
17140 rm -f conftest.er1
17141 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17143 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017144 { ac_try='test -z "$ac_c_werror_flag"
17145 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17147 (eval $ac_try) 2>&5
17148 ac_status=$?
17149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150 (exit $ac_status); }; } &&
17151 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017157 ac_cv_struct_sockaddr_storage=yes
17158else
Martin v. Löwis11437992002-04-12 09:54:03 +000017159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017160sed 's/^/| /' conftest.$ac_ext >&5
17161
Martin v. Löwis11437992002-04-12 09:54:03 +000017162ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017163fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017164rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017165fi
17166
Martin v. Löwis11437992002-04-12 09:54:03 +000017167echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
17168echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017169if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017170
17171cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017172#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017173_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017174
17175fi
17176
Guido van Rossum627b2d71993-12-24 10:39:16 +000017177# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000017178
Michael W. Hudson54241132001-12-07 15:38:26 +000017179
Martin v. Löwis11437992002-04-12 09:54:03 +000017180echo "$as_me:$LINENO: checking whether char is unsigned" >&5
17181echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
17182if test "${ac_cv_c_char_unsigned+set}" = set; then
17183 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000017184else
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017186/* confdefs.h. */
17187_ACEOF
17188cat confdefs.h >>conftest.$ac_ext
17189cat >>conftest.$ac_ext <<_ACEOF
17190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017191$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017192int
17193main ()
17194{
17195static int test_array [1 - 2 * !(((char) -1) < 0)];
17196test_array [0] = 0
17197
17198 ;
17199 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000017200}
Martin v. Löwis11437992002-04-12 09:54:03 +000017201_ACEOF
17202rm -f conftest.$ac_objext
17203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017204 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017206 grep -v '^ *+' conftest.er1 >conftest.err
17207 rm -f conftest.er1
17208 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17210 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017211 { ac_try='test -z "$ac_c_werror_flag"
17212 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17214 (eval $ac_try) 2>&5
17215 ac_status=$?
17216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17217 (exit $ac_status); }; } &&
17218 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017224 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017225else
17226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017227sed 's/^/| /' conftest.$ac_ext >&5
17228
Martin v. Löwis11437992002-04-12 09:54:03 +000017229ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017230fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017231rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017233echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
17234echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017235if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017236 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017237#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017238_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017239
17240fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000017241
Martin v. Löwis11437992002-04-12 09:54:03 +000017242echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
17243echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17244if test "${ac_cv_c_const+set}" = set; then
17245 echo $ECHO_N "(cached) $ECHO_C" >&6
17246else
17247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017248/* confdefs.h. */
17249_ACEOF
17250cat confdefs.h >>conftest.$ac_ext
17251cat >>conftest.$ac_ext <<_ACEOF
17252/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017253
Martin v. Löwis11437992002-04-12 09:54:03 +000017254int
17255main ()
17256{
17257/* FIXME: Include the comments suggested by Paul. */
17258#ifndef __cplusplus
17259 /* Ultrix mips cc rejects this. */
17260 typedef int charset[2];
17261 const charset x;
17262 /* SunOS 4.1.1 cc rejects this. */
17263 char const *const *ccp;
17264 char **p;
17265 /* NEC SVR4.0.2 mips cc rejects this. */
17266 struct point {int x, y;};
17267 static struct point const zero = {0,0};
17268 /* AIX XL C 1.02.0.0 rejects this.
17269 It does not let you subtract one const X* pointer from another in
17270 an arm of an if-expression whose if-part is not a constant
17271 expression */
17272 const char *g = "string";
17273 ccp = &g + (g ? g-g : 0);
17274 /* HPUX 7.0 cc rejects these. */
17275 ++ccp;
17276 p = (char**) ccp;
17277 ccp = (char const *const *) p;
17278 { /* SCO 3.2v4 cc rejects this. */
17279 char *t;
17280 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017281
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 *t++ = 0;
17283 }
17284 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17285 int x[] = {25, 17};
17286 const int *foo = &x[0];
17287 ++foo;
17288 }
17289 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17290 typedef const int *iptr;
17291 iptr p = 0;
17292 ++p;
17293 }
17294 { /* AIX XL C 1.02.0.0 rejects this saying
17295 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17296 struct s { int j; const int *ap[3]; };
17297 struct s *b; b->j = 5;
17298 }
17299 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17300 const int foo = 10;
17301 }
17302#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000017303
Martin v. Löwis11437992002-04-12 09:54:03 +000017304 ;
17305 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000017306}
Martin v. Löwis11437992002-04-12 09:54:03 +000017307_ACEOF
17308rm -f conftest.$ac_objext
17309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017310 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017312 grep -v '^ *+' conftest.er1 >conftest.err
17313 rm -f conftest.er1
17314 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17316 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017317 { ac_try='test -z "$ac_c_werror_flag"
17318 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17320 (eval $ac_try) 2>&5
17321 ac_status=$?
17322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17323 (exit $ac_status); }; } &&
17324 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017330 ac_cv_c_const=yes
17331else
Martin v. Löwis11437992002-04-12 09:54:03 +000017332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017333sed 's/^/| /' conftest.$ac_ext >&5
17334
Martin v. Löwis11437992002-04-12 09:54:03 +000017335ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017336fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017337rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017339echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
17340echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017341if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017342
17343cat >>confdefs.h <<\_ACEOF
17344#define const
17345_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017346
17347fi
17348
Michael W. Hudson54241132001-12-07 15:38:26 +000017349
Guido van Rossumda88dad1995-01-26 00:46:29 +000017350works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017351echo "$as_me:$LINENO: checking for working volatile" >&5
17352echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
17353cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017354/* confdefs.h. */
17355_ACEOF
17356cat confdefs.h >>conftest.$ac_ext
17357cat >>conftest.$ac_ext <<_ACEOF
17358/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017359
Martin v. Löwis11437992002-04-12 09:54:03 +000017360int
17361main ()
17362{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017363volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017364 ;
17365 return 0;
17366}
17367_ACEOF
17368rm -f conftest.$ac_objext
17369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017370 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017372 grep -v '^ *+' conftest.er1 >conftest.err
17373 rm -f conftest.er1
17374 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17376 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017377 { ac_try='test -z "$ac_c_werror_flag"
17378 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17380 (eval $ac_try) 2>&5
17381 ac_status=$?
17382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17383 (exit $ac_status); }; } &&
17384 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017390 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017391else
Martin v. Löwis11437992002-04-12 09:54:03 +000017392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017393sed 's/^/| /' conftest.$ac_ext >&5
17394
Martin v. Löwis11437992002-04-12 09:54:03 +000017395
17396cat >>confdefs.h <<\_ACEOF
17397#define volatile
17398_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017399
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017400
Guido van Rossum627b2d71993-12-24 10:39:16 +000017401fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017402rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017403echo "$as_me:$LINENO: result: $works" >&5
17404echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017405
Guido van Rossumda88dad1995-01-26 00:46:29 +000017406works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017407echo "$as_me:$LINENO: checking for working signed char" >&5
17408echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
17409cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017410/* confdefs.h. */
17411_ACEOF
17412cat confdefs.h >>conftest.$ac_ext
17413cat >>conftest.$ac_ext <<_ACEOF
17414/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017415
Martin v. Löwis11437992002-04-12 09:54:03 +000017416int
17417main ()
17418{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017419signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017420 ;
17421 return 0;
17422}
17423_ACEOF
17424rm -f conftest.$ac_objext
17425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017426 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017428 grep -v '^ *+' conftest.er1 >conftest.err
17429 rm -f conftest.er1
17430 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17432 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017433 { ac_try='test -z "$ac_c_werror_flag"
17434 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17436 (eval $ac_try) 2>&5
17437 ac_status=$?
17438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17439 (exit $ac_status); }; } &&
17440 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017446 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017447else
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017449sed 's/^/| /' conftest.$ac_ext >&5
17450
Martin v. Löwis11437992002-04-12 09:54:03 +000017451
17452cat >>confdefs.h <<\_ACEOF
17453#define signed
17454_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017455
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017456
Guido van Rossum7f43da71994-08-01 12:15:30 +000017457fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017458rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017459echo "$as_me:$LINENO: result: $works" >&5
17460echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017461
Guido van Rossumda88dad1995-01-26 00:46:29 +000017462have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017463echo "$as_me:$LINENO: checking for prototypes" >&5
17464echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
17465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017466/* confdefs.h. */
17467_ACEOF
17468cat confdefs.h >>conftest.$ac_ext
17469cat >>conftest.$ac_ext <<_ACEOF
17470/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017471int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017472int
17473main ()
17474{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017475return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000017476 ;
17477 return 0;
17478}
17479_ACEOF
17480rm -f conftest.$ac_objext
17481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017482 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017484 grep -v '^ *+' conftest.er1 >conftest.err
17485 rm -f conftest.er1
17486 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017489 { ac_try='test -z "$ac_c_werror_flag"
17490 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17492 (eval $ac_try) 2>&5
17493 ac_status=$?
17494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17495 (exit $ac_status); }; } &&
17496 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
17502
17503
17504cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017505#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017506_ACEOF
17507
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017508 have_prototypes=yes
17509
Guido van Rossumf78abae1997-01-21 22:02:36 +000017510else
Martin v. Löwis11437992002-04-12 09:54:03 +000017511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017512sed 's/^/| /' conftest.$ac_ext >&5
17513
Guido van Rossum7f43da71994-08-01 12:15:30 +000017514fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017515rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017516echo "$as_me:$LINENO: result: $have_prototypes" >&5
17517echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017518
Guido van Rossumda88dad1995-01-26 00:46:29 +000017519works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017520echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17521echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017523/* confdefs.h. */
17524_ACEOF
17525cat confdefs.h >>conftest.$ac_ext
17526cat >>conftest.$ac_ext <<_ACEOF
17527/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017528
17529#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017530int foo(int x, ...) {
17531 va_list va;
17532 va_start(va, x);
17533 va_arg(va, int);
17534 va_arg(va, char *);
17535 va_arg(va, double);
17536 return 0;
17537}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017538
Martin v. Löwis11437992002-04-12 09:54:03 +000017539int
17540main ()
17541{
Guido van Rossum90eea071996-08-30 20:58:57 +000017542return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017543 ;
17544 return 0;
17545}
17546_ACEOF
17547rm -f conftest.$ac_objext
17548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017549 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017551 grep -v '^ *+' conftest.er1 >conftest.err
17552 rm -f conftest.er1
17553 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17555 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017556 { ac_try='test -z "$ac_c_werror_flag"
17557 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17559 (eval $ac_try) 2>&5
17560 ac_status=$?
17561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17562 (exit $ac_status); }; } &&
17563 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
17569
17570
17571cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017572#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017573_ACEOF
17574
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017575 works=yes
17576
Guido van Rossumf78abae1997-01-21 22:02:36 +000017577else
Martin v. Löwis11437992002-04-12 09:54:03 +000017578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017579sed 's/^/| /' conftest.$ac_ext >&5
17580
Guido van Rossum627b2d71993-12-24 10:39:16 +000017581fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017583echo "$as_me:$LINENO: result: $works" >&5
17584echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017585
Martin v. Löwisd6320502004-08-12 13:45:08 +000017586# check for socketpair
17587echo "$as_me:$LINENO: checking for socketpair" >&5
17588echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17589cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017590/* confdefs.h. */
17591_ACEOF
17592cat confdefs.h >>conftest.$ac_ext
17593cat >>conftest.$ac_ext <<_ACEOF
17594/* end confdefs.h. */
17595
17596#include <sys/types.h>
17597#include <sys/socket.h>
17598
17599int
17600main ()
17601{
17602void *x=socketpair
17603 ;
17604 return 0;
17605}
17606_ACEOF
17607rm -f conftest.$ac_objext
17608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017609 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017611 grep -v '^ *+' conftest.er1 >conftest.err
17612 rm -f conftest.er1
17613 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17615 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017616 { ac_try='test -z "$ac_c_werror_flag"
17617 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17619 (eval $ac_try) 2>&5
17620 ac_status=$?
17621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17622 (exit $ac_status); }; } &&
17623 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +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); }; }; then
17629
17630cat >>confdefs.h <<\_ACEOF
17631#define HAVE_SOCKETPAIR 1
17632_ACEOF
17633
17634 echo "$as_me:$LINENO: result: yes" >&5
17635echo "${ECHO_T}yes" >&6
17636else
17637 echo "$as_me: failed program was:" >&5
17638sed 's/^/| /' conftest.$ac_ext >&5
17639
17640echo "$as_me:$LINENO: result: no" >&5
17641echo "${ECHO_T}no" >&6
17642
17643fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017644rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017645
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017646# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017647echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17648echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17649cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017650/* confdefs.h. */
17651_ACEOF
17652cat confdefs.h >>conftest.$ac_ext
17653cat >>conftest.$ac_ext <<_ACEOF
17654/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017655#include <sys/types.h>
17656#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017657int
17658main ()
17659{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017660struct sockaddr x;
17661x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017662 ;
17663 return 0;
17664}
17665_ACEOF
17666rm -f conftest.$ac_objext
17667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017668 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017670 grep -v '^ *+' conftest.er1 >conftest.err
17671 rm -f conftest.er1
17672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17674 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017675 { ac_try='test -z "$ac_c_werror_flag"
17676 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17678 (eval $ac_try) 2>&5
17679 ac_status=$?
17680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17681 (exit $ac_status); }; } &&
17682 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
17688 echo "$as_me:$LINENO: result: yes" >&5
17689echo "${ECHO_T}yes" >&6
17690
17691cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017692#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017693_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017694
17695else
Martin v. Löwis11437992002-04-12 09:54:03 +000017696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017697sed 's/^/| /' conftest.$ac_ext >&5
17698
Martin v. Löwis11437992002-04-12 09:54:03 +000017699echo "$as_me:$LINENO: result: no" >&5
17700echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017701fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017702rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017703
Guido van Rossumda88dad1995-01-26 00:46:29 +000017704va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017705echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17706echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017708/* confdefs.h. */
17709_ACEOF
17710cat confdefs.h >>conftest.$ac_ext
17711cat >>conftest.$ac_ext <<_ACEOF
17712/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017713
17714#ifdef HAVE_STDARG_PROTOTYPES
17715#include <stdarg.h>
17716#else
17717#include <varargs.h>
17718#endif
17719
Martin v. Löwis11437992002-04-12 09:54:03 +000017720int
17721main ()
17722{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017723va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017724 ;
17725 return 0;
17726}
17727_ACEOF
17728rm -f conftest.$ac_objext
17729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017730 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017732 grep -v '^ *+' conftest.er1 >conftest.err
17733 rm -f conftest.er1
17734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17736 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017737 { ac_try='test -z "$ac_c_werror_flag"
17738 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17740 (eval $ac_try) 2>&5
17741 ac_status=$?
17742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17743 (exit $ac_status); }; } &&
17744 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17746 (eval $ac_try) 2>&5
17747 ac_status=$?
17748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17749 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017750 :
17751else
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017753sed 's/^/| /' conftest.$ac_ext >&5
17754
Martin v. Löwis11437992002-04-12 09:54:03 +000017755
17756
17757cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017758#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017759_ACEOF
17760
Guido van Rossumda88dad1995-01-26 00:46:29 +000017761 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017762
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017763fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017764rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017765echo "$as_me:$LINENO: result: $va_list_is_array" >&5
17766echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017767
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017768# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017769
17770
17771
17772echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17773echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17774if test "${ac_cv_func_gethostbyname_r+set}" = set; then
17775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017776else
Martin v. Löwis11437992002-04-12 09:54:03 +000017777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017778/* confdefs.h. */
17779_ACEOF
17780cat confdefs.h >>conftest.$ac_ext
17781cat >>conftest.$ac_ext <<_ACEOF
17782/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017783/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017784 which can conflict with char gethostbyname_r (); below.
17785 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017786 <limits.h> exists even on freestanding compilers. Under hpux,
17787 including <limits.h> includes <sys/time.h> and causes problems
17788 checking for functions defined therein. */
17789#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017790# include <limits.h>
17791#else
17792# include <assert.h>
17793#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017794/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017795#ifdef __cplusplus
17796extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017797{
Martin v. Löwis11437992002-04-12 09:54:03 +000017798#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017799/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 builtin and then its argument prototype would still apply. */
17801char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017802/* The GNU C library defines this for functions which it implements
17803 to always fail with ENOSYS. Some functions are actually named
17804 something starting with __ and the normal name is an alias. */
17805#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
17806choke me
17807#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017808char (*f) () = gethostbyname_r;
17809#endif
17810#ifdef __cplusplus
17811}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017812#endif
17813
Skip Montanaro6dead952003-09-25 14:50:04 +000017814int
17815main ()
17816{
17817return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000017818 ;
17819 return 0;
17820}
17821_ACEOF
17822rm -f conftest.$ac_objext conftest$ac_exeext
17823if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017824 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017826 grep -v '^ *+' conftest.er1 >conftest.err
17827 rm -f conftest.er1
17828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17830 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017831 { ac_try='test -z "$ac_c_werror_flag"
17832 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17834 (eval $ac_try) 2>&5
17835 ac_status=$?
17836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17837 (exit $ac_status); }; } &&
17838 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
17844 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017845else
Martin v. Löwis11437992002-04-12 09:54:03 +000017846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017847sed 's/^/| /' conftest.$ac_ext >&5
17848
Martin v. Löwis11437992002-04-12 09:54:03 +000017849ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017850fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017851rm -f conftest.err conftest.$ac_objext \
17852 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017854echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
17855echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
17856if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017857
Martin v. Löwis11437992002-04-12 09:54:03 +000017858 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017859#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017860_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017861
Martin v. Löwis11437992002-04-12 09:54:03 +000017862 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
17863echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017864 OLD_CFLAGS=$CFLAGS
17865 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017867/* confdefs.h. */
17868_ACEOF
17869cat confdefs.h >>conftest.$ac_ext
17870cat >>conftest.$ac_ext <<_ACEOF
17871/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017872
17873# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017874
Martin v. Löwis11437992002-04-12 09:54:03 +000017875int
17876main ()
17877{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017878
17879 char *name;
17880 struct hostent *he, *res;
17881 char buffer[2048];
17882 int buflen = 2048;
17883 int h_errnop;
17884
17885 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017886
17887 ;
17888 return 0;
17889}
17890_ACEOF
17891rm -f conftest.$ac_objext
17892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017893 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017895 grep -v '^ *+' conftest.er1 >conftest.err
17896 rm -f conftest.er1
17897 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17899 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017900 { ac_try='test -z "$ac_c_werror_flag"
17901 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17903 (eval $ac_try) 2>&5
17904 ac_status=$?
17905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17906 (exit $ac_status); }; } &&
17907 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
17913
17914 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017915#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017916_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017917
Martin v. Löwis11437992002-04-12 09:54:03 +000017918
17919cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017920#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017921_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017922
Martin v. Löwis11437992002-04-12 09:54:03 +000017923 echo "$as_me:$LINENO: result: yes" >&5
17924echo "${ECHO_T}yes" >&6
17925
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017926else
Martin v. Löwis11437992002-04-12 09:54:03 +000017927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017928sed 's/^/| /' conftest.$ac_ext >&5
17929
Martin v. Löwis11437992002-04-12 09:54:03 +000017930
17931 echo "$as_me:$LINENO: result: no" >&5
17932echo "${ECHO_T}no" >&6
17933 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
17934echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
17935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017936/* confdefs.h. */
17937_ACEOF
17938cat confdefs.h >>conftest.$ac_ext
17939cat >>conftest.$ac_ext <<_ACEOF
17940/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017941
17942# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017943
Martin v. Löwis11437992002-04-12 09:54:03 +000017944int
17945main ()
17946{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017947
17948 char *name;
17949 struct hostent *he;
17950 char buffer[2048];
17951 int buflen = 2048;
17952 int h_errnop;
17953
17954 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017955
17956 ;
17957 return 0;
17958}
17959_ACEOF
17960rm -f conftest.$ac_objext
17961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017962 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017964 grep -v '^ *+' conftest.er1 >conftest.err
17965 rm -f conftest.er1
17966 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17968 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017969 { ac_try='test -z "$ac_c_werror_flag"
17970 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17972 (eval $ac_try) 2>&5
17973 ac_status=$?
17974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17975 (exit $ac_status); }; } &&
17976 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
17982
17983 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017984#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017985_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017986
Martin v. Löwis11437992002-04-12 09:54:03 +000017987
17988cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017989#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017990_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017991
Martin v. Löwis11437992002-04-12 09:54:03 +000017992 echo "$as_me:$LINENO: result: yes" >&5
17993echo "${ECHO_T}yes" >&6
17994
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017995else
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017997sed 's/^/| /' conftest.$ac_ext >&5
17998
Martin v. Löwis11437992002-04-12 09:54:03 +000017999
18000 echo "$as_me:$LINENO: result: no" >&5
18001echo "${ECHO_T}no" >&6
18002 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
18003echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
18004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018005/* confdefs.h. */
18006_ACEOF
18007cat confdefs.h >>conftest.$ac_ext
18008cat >>conftest.$ac_ext <<_ACEOF
18009/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018010
18011# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018012
Martin v. Löwis11437992002-04-12 09:54:03 +000018013int
18014main ()
18015{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018016
18017 char *name;
18018 struct hostent *he;
18019 struct hostent_data data;
18020
18021 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000018022
18023 ;
18024 return 0;
18025}
18026_ACEOF
18027rm -f conftest.$ac_objext
18028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018029 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018031 grep -v '^ *+' conftest.er1 >conftest.err
18032 rm -f conftest.er1
18033 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18035 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018036 { ac_try='test -z "$ac_c_werror_flag"
18037 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18039 (eval $ac_try) 2>&5
18040 ac_status=$?
18041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18042 (exit $ac_status); }; } &&
18043 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18049
18050 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018051#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018052_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018053
Martin v. Löwis11437992002-04-12 09:54:03 +000018054
18055cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018056#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018057_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018058
Martin v. Löwis11437992002-04-12 09:54:03 +000018059 echo "$as_me:$LINENO: result: yes" >&5
18060echo "${ECHO_T}yes" >&6
18061
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018062else
Martin v. Löwis11437992002-04-12 09:54:03 +000018063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018064sed 's/^/| /' conftest.$ac_ext >&5
18065
Martin v. Löwis11437992002-04-12 09:54:03 +000018066
18067 echo "$as_me:$LINENO: result: no" >&5
18068echo "${ECHO_T}no" >&6
18069
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018070fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018071rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018072
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018073fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018075
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018078 CFLAGS=$OLD_CFLAGS
18079
18080else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018081
Martin v. Löwis11437992002-04-12 09:54:03 +000018082
18083for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000018084do
Martin v. Löwis11437992002-04-12 09:54:03 +000018085as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18086echo "$as_me:$LINENO: checking for $ac_func" >&5
18087echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18088if eval "test \"\${$as_ac_var+set}\" = set"; then
18089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018090else
Martin v. Löwis11437992002-04-12 09:54:03 +000018091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018092/* confdefs.h. */
18093_ACEOF
18094cat confdefs.h >>conftest.$ac_ext
18095cat >>conftest.$ac_ext <<_ACEOF
18096/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018097/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018098 which can conflict with char $ac_func (); below.
18099 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018100 <limits.h> exists even on freestanding compilers. Under hpux,
18101 including <limits.h> includes <sys/time.h> and causes problems
18102 checking for functions defined therein. */
18103#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018104# include <limits.h>
18105#else
18106# include <assert.h>
18107#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018108/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018109#ifdef __cplusplus
18110extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018111{
Martin v. Löwis11437992002-04-12 09:54:03 +000018112#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018113/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018114 builtin and then its argument prototype would still apply. */
18115char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018116/* The GNU C library defines this for functions which it implements
18117 to always fail with ENOSYS. Some functions are actually named
18118 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000018119#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018120choke me
18121#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018122char (*f) () = $ac_func;
18123#endif
18124#ifdef __cplusplus
18125}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018126#endif
18127
Skip Montanaro6dead952003-09-25 14:50:04 +000018128int
18129main ()
18130{
18131return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018132 ;
18133 return 0;
18134}
18135_ACEOF
18136rm -f conftest.$ac_objext conftest$ac_exeext
18137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018138 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018140 grep -v '^ *+' conftest.er1 >conftest.err
18141 rm -f conftest.er1
18142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18144 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018145 { ac_try='test -z "$ac_c_werror_flag"
18146 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18148 (eval $ac_try) 2>&5
18149 ac_status=$?
18150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18151 (exit $ac_status); }; } &&
18152 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18158 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018159else
Martin v. Löwis11437992002-04-12 09:54:03 +000018160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018161sed 's/^/| /' conftest.$ac_ext >&5
18162
Martin v. Löwis11437992002-04-12 09:54:03 +000018163eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018164fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018165rm -f conftest.err conftest.$ac_objext \
18166 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018168echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18169echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18170if test `eval echo '${'$as_ac_var'}'` = yes; then
18171 cat >>confdefs.h <<_ACEOF
18172#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18173_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018174
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018175fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018176done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018177
Michael W. Hudson54241132001-12-07 15:38:26 +000018178
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018179fi
18180
Michael W. Hudson54241132001-12-07 15:38:26 +000018181
18182
18183
18184
18185
18186
Guido van Rossum627b2d71993-12-24 10:39:16 +000018187# checks for system services
18188# (none yet)
18189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018190# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000018191echo "$as_me:$LINENO: checking for __fpu_control" >&5
18192echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
18193if test "${ac_cv_func___fpu_control+set}" = set; then
18194 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018195else
Martin v. Löwis11437992002-04-12 09:54:03 +000018196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018197/* confdefs.h. */
18198_ACEOF
18199cat confdefs.h >>conftest.$ac_ext
18200cat >>conftest.$ac_ext <<_ACEOF
18201/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018202/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018203 which can conflict with char __fpu_control (); below.
18204 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018205 <limits.h> exists even on freestanding compilers. Under hpux,
18206 including <limits.h> includes <sys/time.h> and causes problems
18207 checking for functions defined therein. */
18208#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018209# include <limits.h>
18210#else
18211# include <assert.h>
18212#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018213/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018214#ifdef __cplusplus
18215extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018216{
Martin v. Löwis11437992002-04-12 09:54:03 +000018217#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018218/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018219 builtin and then its argument prototype would still apply. */
18220char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018221/* The GNU C library defines this for functions which it implements
18222 to always fail with ENOSYS. Some functions are actually named
18223 something starting with __ and the normal name is an alias. */
18224#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
18225choke me
18226#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018227char (*f) () = __fpu_control;
18228#endif
18229#ifdef __cplusplus
18230}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018231#endif
18232
Skip Montanaro6dead952003-09-25 14:50:04 +000018233int
18234main ()
18235{
18236return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000018237 ;
18238 return 0;
18239}
18240_ACEOF
18241rm -f conftest.$ac_objext conftest$ac_exeext
18242if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018243 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018245 grep -v '^ *+' conftest.er1 >conftest.err
18246 rm -f conftest.er1
18247 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18249 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018250 { ac_try='test -z "$ac_c_werror_flag"
18251 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18253 (eval $ac_try) 2>&5
18254 ac_status=$?
18255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18256 (exit $ac_status); }; } &&
18257 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18263 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018264else
Martin v. Löwis11437992002-04-12 09:54:03 +000018265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018266sed 's/^/| /' conftest.$ac_ext >&5
18267
Martin v. Löwis11437992002-04-12 09:54:03 +000018268ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018269fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018270rm -f conftest.err conftest.$ac_objext \
18271 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018273echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
18274echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
18275if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018276 :
18277else
Martin v. Löwis11437992002-04-12 09:54:03 +000018278
18279echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
18280echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
18281if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
18282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018283else
Martin v. Löwis11437992002-04-12 09:54:03 +000018284 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018285LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018287/* confdefs.h. */
18288_ACEOF
18289cat confdefs.h >>conftest.$ac_ext
18290cat >>conftest.$ac_ext <<_ACEOF
18291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018292
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018293/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018294#ifdef __cplusplus
18295extern "C"
18296#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018297/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018298 builtin and then its argument prototype would still apply. */
18299char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018300int
18301main ()
18302{
18303__fpu_control ();
18304 ;
18305 return 0;
18306}
18307_ACEOF
18308rm -f conftest.$ac_objext conftest$ac_exeext
18309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018310 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018312 grep -v '^ *+' conftest.er1 >conftest.err
18313 rm -f conftest.er1
18314 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18316 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018317 { ac_try='test -z "$ac_c_werror_flag"
18318 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18320 (eval $ac_try) 2>&5
18321 ac_status=$?
18322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18323 (exit $ac_status); }; } &&
18324 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18330 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018331else
Martin v. Löwis11437992002-04-12 09:54:03 +000018332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018333sed 's/^/| /' conftest.$ac_ext >&5
18334
Martin v. Löwis11437992002-04-12 09:54:03 +000018335ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018336fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018337rm -f conftest.err conftest.$ac_objext \
18338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018339LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018340fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018341echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
18342echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
18343if test $ac_cv_lib_ieee___fpu_control = yes; then
18344 cat >>confdefs.h <<_ACEOF
18345#define HAVE_LIBIEEE 1
18346_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018347
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018348 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018349
Guido van Rossum627b2d71993-12-24 10:39:16 +000018350fi
18351
Michael W. Hudson54241132001-12-07 15:38:26 +000018352
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018353fi
18354
Michael W. Hudson54241132001-12-07 15:38:26 +000018355
Guido van Rossum7f253911997-05-09 02:42:48 +000018356# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000018357echo "$as_me:$LINENO: checking for --with-fpectl" >&5
18358echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
18359
Guido van Rossum7f253911997-05-09 02:42:48 +000018360# Check whether --with-fpectl or --without-fpectl was given.
18361if test "${with_fpectl+set}" = set; then
18362 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000018363
Guido van Rossum7f253911997-05-09 02:42:48 +000018364if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018365then
18366
18367cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000018368#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018369_ACEOF
18370
18371 echo "$as_me:$LINENO: result: yes" >&5
18372echo "${ECHO_T}yes" >&6
18373else echo "$as_me:$LINENO: result: no" >&5
18374echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018375fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018376else
Martin v. Löwis11437992002-04-12 09:54:03 +000018377 echo "$as_me:$LINENO: result: no" >&5
18378echo "${ECHO_T}no" >&6
18379fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000018380
Guido van Rossum7f43da71994-08-01 12:15:30 +000018381# check for --with-libm=...
18382
Guido van Rossum563e7081996-09-10 18:20:48 +000018383case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000018384Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000018385BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000018386*) LIBM=-lm
18387esac
Martin v. Löwis11437992002-04-12 09:54:03 +000018388echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
18389echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
18390
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018391# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018392if test "${with_libm+set}" = set; then
18393 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000018394
Guido van Rossum7f253911997-05-09 02:42:48 +000018395if test "$withval" = no
18396then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000018397 echo "$as_me:$LINENO: result: force LIBM empty" >&5
18398echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018399elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018400then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
18402echo "${ECHO_T}set LIBM=\"$withval\"" >&6
18403else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
18404echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
18405 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018406fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018407else
Martin v. Löwis11437992002-04-12 09:54:03 +000018408 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
18409echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
18410fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018411
18412# check for --with-libc=...
18413
Martin v. Löwis11437992002-04-12 09:54:03 +000018414echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18415echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18416
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018417# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018418if test "${with_libc+set}" = set; then
18419 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018420
Guido van Rossum7f253911997-05-09 02:42:48 +000018421if test "$withval" = no
18422then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018423 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18424echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018425elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018426then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018427 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18428echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18429else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18430echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18431 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018432fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018433else
Martin v. Löwis11437992002-04-12 09:54:03 +000018434 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18435echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18436fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018437
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018438# check for hypot() in math library
18439LIBS_SAVE=$LIBS
18440LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018441
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018442for ac_func in hypot
18443do
Martin v. Löwis11437992002-04-12 09:54:03 +000018444as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18445echo "$as_me:$LINENO: checking for $ac_func" >&5
18446echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18447if eval "test \"\${$as_ac_var+set}\" = set"; then
18448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018449else
Martin v. Löwis11437992002-04-12 09:54:03 +000018450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018451/* confdefs.h. */
18452_ACEOF
18453cat confdefs.h >>conftest.$ac_ext
18454cat >>conftest.$ac_ext <<_ACEOF
18455/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018456/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018457 which can conflict with char $ac_func (); below.
18458 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018459 <limits.h> exists even on freestanding compilers. Under hpux,
18460 including <limits.h> includes <sys/time.h> and causes problems
18461 checking for functions defined therein. */
18462#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018463# include <limits.h>
18464#else
18465# include <assert.h>
18466#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018467/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018468#ifdef __cplusplus
18469extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018470{
Martin v. Löwis11437992002-04-12 09:54:03 +000018471#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018472/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018473 builtin and then its argument prototype would still apply. */
18474char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018475/* The GNU C library defines this for functions which it implements
18476 to always fail with ENOSYS. Some functions are actually named
18477 something starting with __ and the normal name is an alias. */
18478#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18479choke me
18480#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018481char (*f) () = $ac_func;
18482#endif
18483#ifdef __cplusplus
18484}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018485#endif
18486
Skip Montanaro6dead952003-09-25 14:50:04 +000018487int
18488main ()
18489{
18490return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018491 ;
18492 return 0;
18493}
18494_ACEOF
18495rm -f conftest.$ac_objext conftest$ac_exeext
18496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018497 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018499 grep -v '^ *+' conftest.er1 >conftest.err
18500 rm -f conftest.er1
18501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18503 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018504 { ac_try='test -z "$ac_c_werror_flag"
18505 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18507 (eval $ac_try) 2>&5
18508 ac_status=$?
18509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18510 (exit $ac_status); }; } &&
18511 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18517 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018518else
Martin v. Löwis11437992002-04-12 09:54:03 +000018519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018520sed 's/^/| /' conftest.$ac_ext >&5
18521
Martin v. Löwis11437992002-04-12 09:54:03 +000018522eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018523fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018524rm -f conftest.err conftest.$ac_objext \
18525 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018527echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18528echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18529if test `eval echo '${'$as_ac_var'}'` = yes; then
18530 cat >>confdefs.h <<_ACEOF
18531#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18532_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018533
Michael W. Hudson54241132001-12-07 15:38:26 +000018534else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018535 case $LIBOBJS in
18536 "$ac_func.$ac_objext" | \
18537 *" $ac_func.$ac_objext" | \
18538 "$ac_func.$ac_objext "* | \
18539 *" $ac_func.$ac_objext "* ) ;;
18540 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18541esac
18542
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018543fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018544done
18545
Michael W. Hudson54241132001-12-07 15:38:26 +000018546
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018547LIBS=$LIBS_SAVE
18548
Guido van Rossumef2255b2000-03-10 22:30:29 +000018549# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018550if test "${ac_cv_header_wchar_h+set}" = set; then
18551 echo "$as_me:$LINENO: checking for wchar.h" >&5
18552echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18553if test "${ac_cv_header_wchar_h+set}" = set; then
18554 echo $ECHO_N "(cached) $ECHO_C" >&6
18555fi
18556echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18557echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018558else
Martin v. Löwis11437992002-04-12 09:54:03 +000018559 # Is the header compilable?
18560echo "$as_me:$LINENO: checking wchar.h usability" >&5
18561echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018563/* confdefs.h. */
18564_ACEOF
18565cat confdefs.h >>conftest.$ac_ext
18566cat >>conftest.$ac_ext <<_ACEOF
18567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018568$ac_includes_default
18569#include <wchar.h>
18570_ACEOF
18571rm -f conftest.$ac_objext
18572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018573 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018575 grep -v '^ *+' conftest.er1 >conftest.err
18576 rm -f conftest.er1
18577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18579 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018580 { ac_try='test -z "$ac_c_werror_flag"
18581 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18583 (eval $ac_try) 2>&5
18584 ac_status=$?
18585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18586 (exit $ac_status); }; } &&
18587 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18593 ac_header_compiler=yes
18594else
18595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018596sed 's/^/| /' conftest.$ac_ext >&5
18597
Martin v. Löwis11437992002-04-12 09:54:03 +000018598ac_header_compiler=no
18599fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018600rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018601echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18602echo "${ECHO_T}$ac_header_compiler" >&6
18603
18604# Is the header present?
18605echo "$as_me:$LINENO: checking wchar.h presence" >&5
18606echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018608/* confdefs.h. */
18609_ACEOF
18610cat confdefs.h >>conftest.$ac_ext
18611cat >>conftest.$ac_ext <<_ACEOF
18612/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018613#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018614_ACEOF
18615if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18616 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18617 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018618 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018619 rm -f conftest.er1
18620 cat conftest.err >&5
18621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18622 (exit $ac_status); } >/dev/null; then
18623 if test -s conftest.err; then
18624 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018625 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 else
18627 ac_cpp_err=
18628 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018629else
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 ac_cpp_err=yes
18631fi
18632if test -z "$ac_cpp_err"; then
18633 ac_header_preproc=yes
18634else
18635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018636sed 's/^/| /' conftest.$ac_ext >&5
18637
Martin v. Löwis11437992002-04-12 09:54:03 +000018638 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018639fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018640rm -f conftest.err conftest.$ac_ext
18641echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18642echo "${ECHO_T}$ac_header_preproc" >&6
18643
18644# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018645case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18646 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018647 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18648echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018649 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18650echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18651 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018652 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018653 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018654 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18655echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018656 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18657echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18658 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18659echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18660 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18661echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018662 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18663echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018664 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18665echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018666 (
18667 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000018668## ------------------------------------------------ ##
18669## Report this to http://www.python.org/python-bugs ##
18670## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018671_ASBOX
18672 ) |
18673 sed "s/^/$as_me: WARNING: /" >&2
18674 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018675esac
18676echo "$as_me:$LINENO: checking for wchar.h" >&5
18677echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18678if test "${ac_cv_header_wchar_h+set}" = set; then
18679 echo $ECHO_N "(cached) $ECHO_C" >&6
18680else
18681 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018682fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018683echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18684echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18685
18686fi
18687if test $ac_cv_header_wchar_h = yes; then
18688
18689
18690cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018691#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018692_ACEOF
18693
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018694 wchar_h="yes"
18695
Guido van Rossumef2255b2000-03-10 22:30:29 +000018696else
Martin v. Löwis11437992002-04-12 09:54:03 +000018697 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018698
18699fi
18700
Michael W. Hudson54241132001-12-07 15:38:26 +000018701
Martin v. Löwis11437992002-04-12 09:54:03 +000018702
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018703# determine wchar_t size
18704if test "$wchar_h" = yes
18705then
Martin v. Löwis11437992002-04-12 09:54:03 +000018706 echo "$as_me:$LINENO: checking for wchar_t" >&5
18707echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18708if test "${ac_cv_type_wchar_t+set}" = set; then
18709 echo $ECHO_N "(cached) $ECHO_C" >&6
18710else
18711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018712/* confdefs.h. */
18713_ACEOF
18714cat confdefs.h >>conftest.$ac_ext
18715cat >>conftest.$ac_ext <<_ACEOF
18716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018717#include <wchar.h>
18718
Martin v. Löwis11437992002-04-12 09:54:03 +000018719int
18720main ()
18721{
18722if ((wchar_t *) 0)
18723 return 0;
18724if (sizeof (wchar_t))
18725 return 0;
18726 ;
18727 return 0;
18728}
18729_ACEOF
18730rm -f conftest.$ac_objext
18731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018732 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018734 grep -v '^ *+' conftest.er1 >conftest.err
18735 rm -f conftest.er1
18736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18738 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018739 { ac_try='test -z "$ac_c_werror_flag"
18740 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18742 (eval $ac_try) 2>&5
18743 ac_status=$?
18744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18745 (exit $ac_status); }; } &&
18746 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18752 ac_cv_type_wchar_t=yes
18753else
18754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018755sed 's/^/| /' conftest.$ac_ext >&5
18756
Martin v. Löwis11437992002-04-12 09:54:03 +000018757ac_cv_type_wchar_t=no
18758fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018760fi
18761echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18762echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18763
18764echo "$as_me:$LINENO: checking size of wchar_t" >&5
18765echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18766if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18767 echo $ECHO_N "(cached) $ECHO_C" >&6
18768else
18769 if test "$ac_cv_type_wchar_t" = yes; then
18770 # The cast to unsigned long works around a bug in the HP C Compiler
18771 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18772 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18773 # This bug is HP SR number 8606223364.
18774 if test "$cross_compiling" = yes; then
18775 # Depending upon the size, compute the lo and hi bounds.
18776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018777/* confdefs.h. */
18778_ACEOF
18779cat confdefs.h >>conftest.$ac_ext
18780cat >>conftest.$ac_ext <<_ACEOF
18781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018782#include <wchar.h>
18783
Martin v. Löwis11437992002-04-12 09:54:03 +000018784int
18785main ()
18786{
18787static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
18788test_array [0] = 0
18789
18790 ;
18791 return 0;
18792}
18793_ACEOF
18794rm -f conftest.$ac_objext
18795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018796 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018798 grep -v '^ *+' conftest.er1 >conftest.err
18799 rm -f conftest.er1
18800 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18802 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018803 { ac_try='test -z "$ac_c_werror_flag"
18804 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18806 (eval $ac_try) 2>&5
18807 ac_status=$?
18808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18809 (exit $ac_status); }; } &&
18810 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18816 ac_lo=0 ac_mid=0
18817 while :; do
18818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018819/* confdefs.h. */
18820_ACEOF
18821cat confdefs.h >>conftest.$ac_ext
18822cat >>conftest.$ac_ext <<_ACEOF
18823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018824#include <wchar.h>
18825
Martin v. Löwis11437992002-04-12 09:54:03 +000018826int
18827main ()
18828{
18829static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18830test_array [0] = 0
18831
18832 ;
18833 return 0;
18834}
18835_ACEOF
18836rm -f conftest.$ac_objext
18837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018838 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018840 grep -v '^ *+' conftest.er1 >conftest.err
18841 rm -f conftest.er1
18842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18844 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018845 { ac_try='test -z "$ac_c_werror_flag"
18846 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18848 (eval $ac_try) 2>&5
18849 ac_status=$?
18850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18851 (exit $ac_status); }; } &&
18852 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18858 ac_hi=$ac_mid; break
18859else
18860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018861sed 's/^/| /' conftest.$ac_ext >&5
18862
Martin v. Löwis11437992002-04-12 09:54:03 +000018863ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018864 if test $ac_lo -le $ac_mid; then
18865 ac_lo= ac_hi=
18866 break
18867 fi
18868 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000018869fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018870rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018871 done
18872else
18873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018874sed 's/^/| /' conftest.$ac_ext >&5
18875
Martin v. Löwis11437992002-04-12 09:54:03 +000018876cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018877/* confdefs.h. */
18878_ACEOF
18879cat confdefs.h >>conftest.$ac_ext
18880cat >>conftest.$ac_ext <<_ACEOF
18881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018882#include <wchar.h>
18883
Martin v. Löwis11437992002-04-12 09:54:03 +000018884int
18885main ()
18886{
18887static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
18888test_array [0] = 0
18889
18890 ;
18891 return 0;
18892}
18893_ACEOF
18894rm -f conftest.$ac_objext
18895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018896 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018898 grep -v '^ *+' conftest.er1 >conftest.err
18899 rm -f conftest.er1
18900 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18902 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018903 { ac_try='test -z "$ac_c_werror_flag"
18904 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18906 (eval $ac_try) 2>&5
18907 ac_status=$?
18908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18909 (exit $ac_status); }; } &&
18910 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18916 ac_hi=-1 ac_mid=-1
18917 while :; do
18918 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018919/* confdefs.h. */
18920_ACEOF
18921cat confdefs.h >>conftest.$ac_ext
18922cat >>conftest.$ac_ext <<_ACEOF
18923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018924#include <wchar.h>
18925
Martin v. Löwis11437992002-04-12 09:54:03 +000018926int
18927main ()
18928{
18929static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
18930test_array [0] = 0
18931
18932 ;
18933 return 0;
18934}
18935_ACEOF
18936rm -f conftest.$ac_objext
18937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018938 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018940 grep -v '^ *+' conftest.er1 >conftest.err
18941 rm -f conftest.er1
18942 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18944 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018945 { ac_try='test -z "$ac_c_werror_flag"
18946 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18948 (eval $ac_try) 2>&5
18949 ac_status=$?
18950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18951 (exit $ac_status); }; } &&
18952 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
18958 ac_lo=$ac_mid; break
18959else
18960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018961sed 's/^/| /' conftest.$ac_ext >&5
18962
Martin v. Löwis11437992002-04-12 09:54:03 +000018963ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018964 if test $ac_mid -le $ac_hi; then
18965 ac_lo= ac_hi=
18966 break
18967 fi
18968 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000018969fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018970rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018971 done
18972else
18973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018974sed 's/^/| /' conftest.$ac_ext >&5
18975
Martin v. Löwis11437992002-04-12 09:54:03 +000018976ac_lo= ac_hi=
18977fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018978rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018979fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018980rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018981# Binary search between lo and hi bounds.
18982while test "x$ac_lo" != "x$ac_hi"; do
18983 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018985/* confdefs.h. */
18986_ACEOF
18987cat confdefs.h >>conftest.$ac_ext
18988cat >>conftest.$ac_ext <<_ACEOF
18989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018990#include <wchar.h>
18991
Martin v. Löwis11437992002-04-12 09:54:03 +000018992int
18993main ()
18994{
18995static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18996test_array [0] = 0
18997
18998 ;
18999 return 0;
19000}
19001_ACEOF
19002rm -f conftest.$ac_objext
19003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019004 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019006 grep -v '^ *+' conftest.er1 >conftest.err
19007 rm -f conftest.er1
19008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19010 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019011 { ac_try='test -z "$ac_c_werror_flag"
19012 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19014 (eval $ac_try) 2>&5
19015 ac_status=$?
19016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19017 (exit $ac_status); }; } &&
19018 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
19024 ac_hi=$ac_mid
19025else
19026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019027sed 's/^/| /' conftest.$ac_ext >&5
19028
Martin v. Löwis11437992002-04-12 09:54:03 +000019029ac_lo=`expr '(' $ac_mid ')' + 1`
19030fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019032done
19033case $ac_lo in
19034?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019035'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19036See \`config.log' for more details." >&5
19037echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19038See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019039 { (exit 1); exit 1; }; } ;;
19040esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019041else
19042 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000019043 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19044See \`config.log' for more details." >&5
19045echo "$as_me: error: cannot run test program while cross compiling
19046See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019047 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000019048else
Martin v. Löwis11437992002-04-12 09:54:03 +000019049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019050/* confdefs.h. */
19051_ACEOF
19052cat confdefs.h >>conftest.$ac_ext
19053cat >>conftest.$ac_ext <<_ACEOF
19054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019055#include <wchar.h>
19056
19057long longval () { return (long) (sizeof (wchar_t)); }
19058unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000019059#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019060#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019061int
19062main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019063{
Martin v. Löwis11437992002-04-12 09:54:03 +000019064
19065 FILE *f = fopen ("conftest.val", "w");
19066 if (! f)
19067 exit (1);
19068 if (((long) (sizeof (wchar_t))) < 0)
19069 {
19070 long i = longval ();
19071 if (i != ((long) (sizeof (wchar_t))))
19072 exit (1);
19073 fprintf (f, "%ld\n", i);
19074 }
19075 else
19076 {
19077 unsigned long i = ulongval ();
19078 if (i != ((long) (sizeof (wchar_t))))
19079 exit (1);
19080 fprintf (f, "%lu\n", i);
19081 }
19082 exit (ferror (f) || fclose (f) != 0);
19083
19084 ;
19085 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000019086}
Martin v. Löwis11437992002-04-12 09:54:03 +000019087_ACEOF
19088rm -f conftest$ac_exeext
19089if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19090 (eval $ac_link) 2>&5
19091 ac_status=$?
19092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19093 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19095 (eval $ac_try) 2>&5
19096 ac_status=$?
19097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19098 (exit $ac_status); }; }; then
19099 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000019100else
Martin v. Löwis11437992002-04-12 09:54:03 +000019101 echo "$as_me: program exited with status $ac_status" >&5
19102echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019103sed 's/^/| /' conftest.$ac_ext >&5
19104
Martin v. Löwis11437992002-04-12 09:54:03 +000019105( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000019106{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19107See \`config.log' for more details." >&5
19108echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19109See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019110 { (exit 1); exit 1; }; }
19111fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019112rm -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 +000019113fi
19114fi
19115rm -f conftest.val
19116else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019117 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000019118fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019120echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
19121echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
19122cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019123#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019124_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019125
Michael W. Hudson54241132001-12-07 15:38:26 +000019126
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019127fi
19128
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019129echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
19130echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
19131have_ucs4_tcl=no
19132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019133/* confdefs.h. */
19134_ACEOF
19135cat confdefs.h >>conftest.$ac_ext
19136cat >>conftest.$ac_ext <<_ACEOF
19137/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019138
19139#include <tcl.h>
19140#if TCL_UTF_MAX != 6
19141# error "NOT UCS4_TCL"
19142#endif
19143int
19144main ()
19145{
19146
19147 ;
19148 return 0;
19149}
19150_ACEOF
19151rm -f conftest.$ac_objext
19152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019153 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019155 grep -v '^ *+' conftest.er1 >conftest.err
19156 rm -f conftest.er1
19157 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19159 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019160 { ac_try='test -z "$ac_c_werror_flag"
19161 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19163 (eval $ac_try) 2>&5
19164 ac_status=$?
19165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19166 (exit $ac_status); }; } &&
19167 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +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); }; }; then
19173
19174
19175cat >>confdefs.h <<\_ACEOF
19176#define HAVE_UCS4_TCL 1
19177_ACEOF
19178
19179 have_ucs4_tcl=yes
19180
19181else
19182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019183sed 's/^/| /' conftest.$ac_ext >&5
19184
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019185fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019186rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019187echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
19188echo "${ECHO_T}$have_ucs4_tcl" >&6
19189
Skip Montanaro6dead952003-09-25 14:50:04 +000019190# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019191if test "$wchar_h" = yes
19192then
19193 # check whether wchar_t is signed or not
19194 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
19195echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
19196 if test "${ac_cv_wchar_t_signed+set}" = set; then
19197 echo $ECHO_N "(cached) $ECHO_C" >&6
19198else
19199
19200 if test "$cross_compiling" = yes; then
19201 ac_cv_wchar_t_signed=yes
19202else
19203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019204/* confdefs.h. */
19205_ACEOF
19206cat confdefs.h >>conftest.$ac_ext
19207cat >>conftest.$ac_ext <<_ACEOF
19208/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019209
19210 #include <wchar.h>
19211 int main()
19212 {
19213 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
19214 }
19215
19216_ACEOF
19217rm -f conftest$ac_exeext
19218if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19219 (eval $ac_link) 2>&5
19220 ac_status=$?
19221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19224 (eval $ac_try) 2>&5
19225 ac_status=$?
19226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19227 (exit $ac_status); }; }; then
19228 ac_cv_wchar_t_signed=yes
19229else
19230 echo "$as_me: program exited with status $ac_status" >&5
19231echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019232sed 's/^/| /' conftest.$ac_ext >&5
19233
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019234( exit $ac_status )
19235ac_cv_wchar_t_signed=no
19236fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019237rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019238fi
19239fi
19240
19241 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
19242echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
19243fi
19244
Martin v. Löwis11437992002-04-12 09:54:03 +000019245echo "$as_me:$LINENO: checking what type to use for unicode" >&5
19246echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019247# Check whether --enable-unicode or --disable-unicode was given.
19248if test "${enable_unicode+set}" = set; then
19249 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000019250
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019251else
19252 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000019253fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019254
19255if test $enable_unicode = yes
19256then
Martin v. Löwisfd917792001-06-27 20:22:04 +000019257 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019258 case "$have_ucs4_tcl" in
19259 yes) enable_unicode="ucs4"
19260 ;;
19261 *) enable_unicode="ucs2"
19262 ;;
19263 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019264fi
19265
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019266
19267
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019268case "$enable_unicode" in
19269ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000019270 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019271#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000019272_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019273
19274 ;;
19275ucs4) unicode_size="4"
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 4
Martin v. Löwis11437992002-04-12 09:54:03 +000019278_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019279
19280 ;;
19281esac
19282
Michael W. Hudson54241132001-12-07 15:38:26 +000019283
Martin v. Löwis11437992002-04-12 09:54:03 +000019284
19285
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019286
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019287if test "$enable_unicode" = "no"
19288then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019289 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000019290 echo "$as_me:$LINENO: result: not used" >&5
19291echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019292else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019293 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000019294
19295cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019296#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019297_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019298
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019299
19300 # wchar_t is only usable if it maps to an unsigned type
19301 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000019302 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019303 then
19304 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019305
Martin v. Löwis11437992002-04-12 09:54:03 +000019306cat >>confdefs.h <<\_ACEOF
19307#define HAVE_USABLE_WCHAR_T 1
19308_ACEOF
19309
19310 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019311#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019312_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019313
19314 elif test "$ac_cv_sizeof_short" = "$unicode_size"
19315 then
19316 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000019317 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019318#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000019319_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019320
19321 elif test "$ac_cv_sizeof_long" = "$unicode_size"
19322 then
19323 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019325#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000019326_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019327
19328 else
19329 PY_UNICODE_TYPE="no type found"
19330 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019331 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
19332echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019333fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019334
19335# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019336echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
19337echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
19338if test "${ac_cv_c_bigendian+set}" = set; then
19339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019340else
Martin v. Löwis11437992002-04-12 09:54:03 +000019341 # See if sys/param.h defines the BYTE_ORDER macro.
19342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019343/* confdefs.h. */
19344_ACEOF
19345cat confdefs.h >>conftest.$ac_ext
19346cat >>conftest.$ac_ext <<_ACEOF
19347/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019348#include <sys/types.h>
19349#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019350
Martin v. Löwis11437992002-04-12 09:54:03 +000019351int
19352main ()
19353{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019354#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
19355 bogus endian macros
19356#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019357
19358 ;
19359 return 0;
19360}
19361_ACEOF
19362rm -f conftest.$ac_objext
19363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019364 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019366 grep -v '^ *+' conftest.er1 >conftest.err
19367 rm -f conftest.er1
19368 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19370 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019371 { ac_try='test -z "$ac_c_werror_flag"
19372 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19374 (eval $ac_try) 2>&5
19375 ac_status=$?
19376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19377 (exit $ac_status); }; } &&
19378 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019384 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000019385cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019386/* confdefs.h. */
19387_ACEOF
19388cat confdefs.h >>conftest.$ac_ext
19389cat >>conftest.$ac_ext <<_ACEOF
19390/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019391#include <sys/types.h>
19392#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019393
Martin v. Löwis11437992002-04-12 09:54:03 +000019394int
19395main ()
19396{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019397#if BYTE_ORDER != BIG_ENDIAN
19398 not big endian
19399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019400
19401 ;
19402 return 0;
19403}
19404_ACEOF
19405rm -f conftest.$ac_objext
19406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019407 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019409 grep -v '^ *+' conftest.er1 >conftest.err
19410 rm -f conftest.er1
19411 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19413 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019414 { ac_try='test -z "$ac_c_werror_flag"
19415 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19417 (eval $ac_try) 2>&5
19418 ac_status=$?
19419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19420 (exit $ac_status); }; } &&
19421 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019427 ac_cv_c_bigendian=yes
19428else
Martin v. Löwis11437992002-04-12 09:54:03 +000019429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019430sed 's/^/| /' conftest.$ac_ext >&5
19431
Martin v. Löwis11437992002-04-12 09:54:03 +000019432ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019433fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019435else
Martin v. Löwis11437992002-04-12 09:54:03 +000019436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019437sed 's/^/| /' conftest.$ac_ext >&5
19438
Martin v. Löwis11437992002-04-12 09:54:03 +000019439# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019440if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019441 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019442 ac_cv_c_bigendian=unknown
19443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019444/* confdefs.h. */
19445_ACEOF
19446cat confdefs.h >>conftest.$ac_ext
19447cat >>conftest.$ac_ext <<_ACEOF
19448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019449short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19450short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19451void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19452short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19453short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19454void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019455int
19456main ()
19457{
19458 _ascii (); _ebcdic ();
19459 ;
19460 return 0;
19461}
19462_ACEOF
19463rm -f conftest.$ac_objext
19464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019465 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019467 grep -v '^ *+' conftest.er1 >conftest.err
19468 rm -f conftest.er1
19469 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19471 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019472 { ac_try='test -z "$ac_c_werror_flag"
19473 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19475 (eval $ac_try) 2>&5
19476 ac_status=$?
19477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19478 (exit $ac_status); }; } &&
19479 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019485 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019486 ac_cv_c_bigendian=yes
19487fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019488if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019489 if test "$ac_cv_c_bigendian" = unknown; then
19490 ac_cv_c_bigendian=no
19491 else
19492 # finding both strings is unlikely to happen, but who knows?
19493 ac_cv_c_bigendian=unknown
19494 fi
19495fi
19496else
19497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019498sed 's/^/| /' conftest.$ac_ext >&5
19499
Martin v. Löwis11437992002-04-12 09:54:03 +000019500fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019501rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019502else
19503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019504/* confdefs.h. */
19505_ACEOF
19506cat confdefs.h >>conftest.$ac_ext
19507cat >>conftest.$ac_ext <<_ACEOF
19508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019509int
19510main ()
19511{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019512 /* Are we little or big endian? From Harbison&Steele. */
19513 union
19514 {
19515 long l;
19516 char c[sizeof (long)];
19517 } u;
19518 u.l = 1;
19519 exit (u.c[sizeof (long) - 1] == 1);
19520}
Martin v. Löwis11437992002-04-12 09:54:03 +000019521_ACEOF
19522rm -f conftest$ac_exeext
19523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19524 (eval $ac_link) 2>&5
19525 ac_status=$?
19526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19529 (eval $ac_try) 2>&5
19530 ac_status=$?
19531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19532 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019533 ac_cv_c_bigendian=no
19534else
Martin v. Löwis11437992002-04-12 09:54:03 +000019535 echo "$as_me: program exited with status $ac_status" >&5
19536echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019537sed 's/^/| /' conftest.$ac_ext >&5
19538
Martin v. Löwis11437992002-04-12 09:54:03 +000019539( exit $ac_status )
19540ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019541fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019542rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019543fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019544fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019546fi
19547echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19548echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19549case $ac_cv_c_bigendian in
19550 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019551
Martin v. Löwis11437992002-04-12 09:54:03 +000019552cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019553#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019554_ACEOF
19555 ;;
19556 no)
19557 ;;
19558 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019559 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019560presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019561echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019562presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19563 { (exit 1); exit 1; }; } ;;
19564esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019565
Michael W. Hudson54241132001-12-07 15:38:26 +000019566
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019567# Check whether right shifting a negative integer extends the sign bit
19568# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019569echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19570echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19571if test "${ac_cv_rshift_extends_sign+set}" = set; then
19572 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019573else
Martin v. Löwis11437992002-04-12 09:54:03 +000019574
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019575if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019576 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019577else
Martin v. Löwis11437992002-04-12 09:54:03 +000019578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019579/* confdefs.h. */
19580_ACEOF
19581cat confdefs.h >>conftest.$ac_ext
19582cat >>conftest.$ac_ext <<_ACEOF
19583/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019584
19585int main()
19586{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019587 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019588}
19589
Martin v. Löwis11437992002-04-12 09:54:03 +000019590_ACEOF
19591rm -f conftest$ac_exeext
19592if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19593 (eval $ac_link) 2>&5
19594 ac_status=$?
19595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19598 (eval $ac_try) 2>&5
19599 ac_status=$?
19600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19601 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000019602 ac_cv_rshift_extends_sign=yes
19603else
Martin v. Löwis11437992002-04-12 09:54:03 +000019604 echo "$as_me: program exited with status $ac_status" >&5
19605echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019606sed 's/^/| /' conftest.$ac_ext >&5
19607
Martin v. Löwis11437992002-04-12 09:54:03 +000019608( exit $ac_status )
19609ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019610fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019611rm -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 +000019612fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019613fi
19614
Martin v. Löwis11437992002-04-12 09:54:03 +000019615echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19616echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019617if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019618then
Martin v. Löwis11437992002-04-12 09:54:03 +000019619
19620cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019621#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019622_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019623
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019624fi
19625
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019626# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019627echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19628echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19629if test "${ac_cv_have_getc_unlocked+set}" = set; then
19630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019631else
Martin v. Löwis11437992002-04-12 09:54:03 +000019632
19633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019634/* confdefs.h. */
19635_ACEOF
19636cat confdefs.h >>conftest.$ac_ext
19637cat >>conftest.$ac_ext <<_ACEOF
19638/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019639#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019640int
19641main ()
19642{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019643
19644 FILE *f = fopen("/dev/null", "r");
19645 flockfile(f);
19646 getc_unlocked(f);
19647 funlockfile(f);
19648
Martin v. Löwis11437992002-04-12 09:54:03 +000019649 ;
19650 return 0;
19651}
19652_ACEOF
19653rm -f conftest.$ac_objext conftest$ac_exeext
19654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019655 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019657 grep -v '^ *+' conftest.er1 >conftest.err
19658 rm -f conftest.er1
19659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19661 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019662 { ac_try='test -z "$ac_c_werror_flag"
19663 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19665 (eval $ac_try) 2>&5
19666 ac_status=$?
19667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19668 (exit $ac_status); }; } &&
19669 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019675 ac_cv_have_getc_unlocked=yes
19676else
Martin v. Löwis11437992002-04-12 09:54:03 +000019677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019678sed 's/^/| /' conftest.$ac_ext >&5
19679
Martin v. Löwis11437992002-04-12 09:54:03 +000019680ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019681fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019682rm -f conftest.err conftest.$ac_objext \
19683 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019684fi
19685
Martin v. Löwis11437992002-04-12 09:54:03 +000019686echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19687echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019688if test "$ac_cv_have_getc_unlocked" = yes
19689then
Martin v. Löwis11437992002-04-12 09:54:03 +000019690
19691cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019692#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019693_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019694
19695fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019696
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000019697# check where readline lives
19698
19699echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
19700echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
19701if test "${ac_cv_lib_readline_readline+set}" = set; then
19702 echo $ECHO_N "(cached) $ECHO_C" >&6
19703else
19704 ac_check_lib_save_LIBS=$LIBS
19705LIBS="-lreadline $LIBS"
19706cat >conftest.$ac_ext <<_ACEOF
19707/* confdefs.h. */
19708_ACEOF
19709cat confdefs.h >>conftest.$ac_ext
19710cat >>conftest.$ac_ext <<_ACEOF
19711/* end confdefs.h. */
19712
19713/* Override any gcc2 internal prototype to avoid an error. */
19714#ifdef __cplusplus
19715extern "C"
19716#endif
19717/* We use char because int might match the return type of a gcc2
19718 builtin and then its argument prototype would still apply. */
19719char readline ();
19720int
19721main ()
19722{
19723readline ();
19724 ;
19725 return 0;
19726}
19727_ACEOF
19728rm -f conftest.$ac_objext conftest$ac_exeext
19729if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19730 (eval $ac_link) 2>conftest.er1
19731 ac_status=$?
19732 grep -v '^ *+' conftest.er1 >conftest.err
19733 rm -f conftest.er1
19734 cat conftest.err >&5
19735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19736 (exit $ac_status); } &&
19737 { ac_try='test -z "$ac_c_werror_flag"
19738 || test ! -s conftest.err'
19739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19740 (eval $ac_try) 2>&5
19741 ac_status=$?
19742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19743 (exit $ac_status); }; } &&
19744 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
19750 ac_cv_lib_readline_readline=yes
19751else
19752 echo "$as_me: failed program was:" >&5
19753sed 's/^/| /' conftest.$ac_ext >&5
19754
19755ac_cv_lib_readline_readline=no
19756fi
19757rm -f conftest.err conftest.$ac_objext \
19758 conftest$ac_exeext conftest.$ac_ext
19759LIBS=$ac_check_lib_save_LIBS
19760fi
19761echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
19762echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
19763if test $ac_cv_lib_readline_readline = yes; then
19764 cat >>confdefs.h <<_ACEOF
19765#define HAVE_LIBREADLINE 1
19766_ACEOF
19767
19768 LIBS="-lreadline $LIBS"
19769
19770fi
19771
19772if test "$ac_cv_have_readline_readline" = no
19773then
19774
19775echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
19776echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
19777if test "${ac_cv_lib_termcap_readline+set}" = set; then
19778 echo $ECHO_N "(cached) $ECHO_C" >&6
19779else
19780 ac_check_lib_save_LIBS=$LIBS
19781LIBS="-ltermcap $LIBS"
19782cat >conftest.$ac_ext <<_ACEOF
19783/* confdefs.h. */
19784_ACEOF
19785cat confdefs.h >>conftest.$ac_ext
19786cat >>conftest.$ac_ext <<_ACEOF
19787/* end confdefs.h. */
19788
19789/* Override any gcc2 internal prototype to avoid an error. */
19790#ifdef __cplusplus
19791extern "C"
19792#endif
19793/* We use char because int might match the return type of a gcc2
19794 builtin and then its argument prototype would still apply. */
19795char readline ();
19796int
19797main ()
19798{
19799readline ();
19800 ;
19801 return 0;
19802}
19803_ACEOF
19804rm -f conftest.$ac_objext conftest$ac_exeext
19805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19806 (eval $ac_link) 2>conftest.er1
19807 ac_status=$?
19808 grep -v '^ *+' conftest.er1 >conftest.err
19809 rm -f conftest.er1
19810 cat conftest.err >&5
19811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19812 (exit $ac_status); } &&
19813 { ac_try='test -z "$ac_c_werror_flag"
19814 || test ! -s conftest.err'
19815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19816 (eval $ac_try) 2>&5
19817 ac_status=$?
19818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19819 (exit $ac_status); }; } &&
19820 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
19826 ac_cv_lib_termcap_readline=yes
19827else
19828 echo "$as_me: failed program was:" >&5
19829sed 's/^/| /' conftest.$ac_ext >&5
19830
19831ac_cv_lib_termcap_readline=no
19832fi
19833rm -f conftest.err conftest.$ac_objext \
19834 conftest$ac_exeext conftest.$ac_ext
19835LIBS=$ac_check_lib_save_LIBS
19836fi
19837echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
19838echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
19839if test $ac_cv_lib_termcap_readline = yes; then
19840 cat >>confdefs.h <<_ACEOF
19841#define HAVE_LIBTERMCAP 1
19842_ACEOF
19843
19844 LIBS="-ltermcap $LIBS"
19845
19846fi
19847
19848fi
19849
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019850# check for readline 2.1
19851echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
19852echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
19853if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
19854 echo $ECHO_N "(cached) $ECHO_C" >&6
19855else
19856 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000019857LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019858cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019859/* confdefs.h. */
19860_ACEOF
19861cat confdefs.h >>conftest.$ac_ext
19862cat >>conftest.$ac_ext <<_ACEOF
19863/* end confdefs.h. */
19864
19865/* Override any gcc2 internal prototype to avoid an error. */
19866#ifdef __cplusplus
19867extern "C"
19868#endif
19869/* We use char because int might match the return type of a gcc2
19870 builtin and then its argument prototype would still apply. */
19871char rl_callback_handler_install ();
19872int
19873main ()
19874{
19875rl_callback_handler_install ();
19876 ;
19877 return 0;
19878}
19879_ACEOF
19880rm -f conftest.$ac_objext conftest$ac_exeext
19881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019882 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019884 grep -v '^ *+' conftest.er1 >conftest.err
19885 rm -f conftest.er1
19886 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19888 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019889 { ac_try='test -z "$ac_c_werror_flag"
19890 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19892 (eval $ac_try) 2>&5
19893 ac_status=$?
19894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19895 (exit $ac_status); }; } &&
19896 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +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); }; }; then
19902 ac_cv_lib_readline_rl_callback_handler_install=yes
19903else
19904 echo "$as_me: failed program was:" >&5
19905sed 's/^/| /' conftest.$ac_ext >&5
19906
19907ac_cv_lib_readline_rl_callback_handler_install=no
19908fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019909rm -f conftest.err conftest.$ac_objext \
19910 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019911LIBS=$ac_check_lib_save_LIBS
19912fi
19913echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
19914echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
19915if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
19916
19917cat >>confdefs.h <<\_ACEOF
19918#define HAVE_RL_CALLBACK 1
19919_ACEOF
19920
19921fi
19922
19923
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019924# check for readline 2.2
19925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019926/* confdefs.h. */
19927_ACEOF
19928cat confdefs.h >>conftest.$ac_ext
19929cat >>conftest.$ac_ext <<_ACEOF
19930/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019931#include <readline/readline.h>
19932_ACEOF
19933if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19934 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19935 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019936 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019937 rm -f conftest.er1
19938 cat conftest.err >&5
19939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19940 (exit $ac_status); } >/dev/null; then
19941 if test -s conftest.err; then
19942 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019943 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019944 else
19945 ac_cpp_err=
19946 fi
19947else
19948 ac_cpp_err=yes
19949fi
19950if test -z "$ac_cpp_err"; then
19951 have_readline=yes
19952else
19953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019954sed 's/^/| /' conftest.$ac_ext >&5
19955
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019956 have_readline=no
19957fi
19958rm -f conftest.err conftest.$ac_ext
19959if test $have_readline = yes
19960then
19961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019962/* confdefs.h. */
19963_ACEOF
19964cat confdefs.h >>conftest.$ac_ext
19965cat >>conftest.$ac_ext <<_ACEOF
19966/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019967#include <readline/readline.h>
19968
19969_ACEOF
19970if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000019971 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019972
19973cat >>confdefs.h <<\_ACEOF
19974#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
19975_ACEOF
19976
19977fi
19978rm -f conftest*
19979
19980fi
19981
Martin v. Löwis0daad592001-09-30 21:09:59 +000019982# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000019983echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
19984echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
19985if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
19986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000019987else
Martin v. Löwis11437992002-04-12 09:54:03 +000019988 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000019989LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019991/* confdefs.h. */
19992_ACEOF
19993cat confdefs.h >>conftest.$ac_ext
19994cat >>conftest.$ac_ext <<_ACEOF
19995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019996
Guido van Rossum353ae582001-07-10 16:45:32 +000019997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019998#ifdef __cplusplus
19999extern "C"
20000#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000020001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020002 builtin and then its argument prototype would still apply. */
20003char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020004int
20005main ()
20006{
20007rl_pre_input_hook ();
20008 ;
20009 return 0;
20010}
20011_ACEOF
20012rm -f conftest.$ac_objext conftest$ac_exeext
20013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020014 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020016 grep -v '^ *+' conftest.er1 >conftest.err
20017 rm -f conftest.er1
20018 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20020 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020021 { ac_try='test -z "$ac_c_werror_flag"
20022 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20024 (eval $ac_try) 2>&5
20025 ac_status=$?
20026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20027 (exit $ac_status); }; } &&
20028 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
20034 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000020035else
Martin v. Löwis11437992002-04-12 09:54:03 +000020036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020037sed 's/^/| /' conftest.$ac_ext >&5
20038
Martin v. Löwis11437992002-04-12 09:54:03 +000020039ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000020040fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020041rm -f conftest.err conftest.$ac_objext \
20042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020043LIBS=$ac_check_lib_save_LIBS
20044fi
20045echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
20046echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
20047if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020048
Martin v. Löwis11437992002-04-12 09:54:03 +000020049cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020050#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020051_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020052
Martin v. Löwis0daad592001-09-30 21:09:59 +000020053fi
20054
Michael W. Hudson54241132001-12-07 15:38:26 +000020055
Martin v. Löwis0daad592001-09-30 21:09:59 +000020056# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000020057echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
20058echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
20059if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
20060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000020061else
Martin v. Löwis11437992002-04-12 09:54:03 +000020062 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020063LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020064cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020065/* confdefs.h. */
20066_ACEOF
20067cat confdefs.h >>conftest.$ac_ext
20068cat >>conftest.$ac_ext <<_ACEOF
20069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020070
Martin v. Löwis0daad592001-09-30 21:09:59 +000020071/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020072#ifdef __cplusplus
20073extern "C"
20074#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000020075/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020076 builtin and then its argument prototype would still apply. */
20077char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020078int
20079main ()
20080{
20081rl_completion_matches ();
20082 ;
20083 return 0;
20084}
20085_ACEOF
20086rm -f conftest.$ac_objext conftest$ac_exeext
20087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020088 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020090 grep -v '^ *+' conftest.er1 >conftest.err
20091 rm -f conftest.er1
20092 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20094 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020095 { ac_try='test -z "$ac_c_werror_flag"
20096 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20098 (eval $ac_try) 2>&5
20099 ac_status=$?
20100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20101 (exit $ac_status); }; } &&
20102 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
20108 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000020109else
Martin v. Löwis11437992002-04-12 09:54:03 +000020110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020111sed 's/^/| /' conftest.$ac_ext >&5
20112
Martin v. Löwis11437992002-04-12 09:54:03 +000020113ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000020114fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020115rm -f conftest.err conftest.$ac_objext \
20116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020117LIBS=$ac_check_lib_save_LIBS
20118fi
20119echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
20120echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
20121if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020122
Martin v. Löwis11437992002-04-12 09:54:03 +000020123cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020124#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020125_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020126
Guido van Rossum353ae582001-07-10 16:45:32 +000020127fi
20128
Jack Jansendd19cf82001-12-06 22:36:17 +000020129
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020130# also in readline 4.2
20131cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020132/* confdefs.h. */
20133_ACEOF
20134cat confdefs.h >>conftest.$ac_ext
20135cat >>conftest.$ac_ext <<_ACEOF
20136/* end confdefs.h. */
20137#include <readline/readline.h>
20138_ACEOF
20139if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20140 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20141 ac_status=$?
20142 grep -v '^ *+' conftest.er1 >conftest.err
20143 rm -f conftest.er1
20144 cat conftest.err >&5
20145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20146 (exit $ac_status); } >/dev/null; then
20147 if test -s conftest.err; then
20148 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020149 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020150 else
20151 ac_cpp_err=
20152 fi
20153else
20154 ac_cpp_err=yes
20155fi
20156if test -z "$ac_cpp_err"; then
20157 have_readline=yes
20158else
20159 echo "$as_me: failed program was:" >&5
20160sed 's/^/| /' conftest.$ac_ext >&5
20161
20162 have_readline=no
20163fi
20164rm -f conftest.err conftest.$ac_ext
20165if test $have_readline = yes
20166then
20167 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020168/* confdefs.h. */
20169_ACEOF
20170cat confdefs.h >>conftest.$ac_ext
20171cat >>conftest.$ac_ext <<_ACEOF
20172/* end confdefs.h. */
20173#include <readline/readline.h>
20174
20175_ACEOF
20176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20177 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
20178
20179cat >>confdefs.h <<\_ACEOF
20180#define HAVE_RL_CATCH_SIGNAL 1
20181_ACEOF
20182
20183fi
20184rm -f conftest*
20185
20186fi
20187
Martin v. Löwis11437992002-04-12 09:54:03 +000020188echo "$as_me:$LINENO: checking for broken nice()" >&5
20189echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
20190if test "${ac_cv_broken_nice+set}" = set; then
20191 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020192else
Martin v. Löwis11437992002-04-12 09:54:03 +000020193
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020194if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020195 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020196else
Martin v. Löwis11437992002-04-12 09:54:03 +000020197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020198/* confdefs.h. */
20199_ACEOF
20200cat confdefs.h >>conftest.$ac_ext
20201cat >>conftest.$ac_ext <<_ACEOF
20202/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020203
20204int main()
20205{
20206 int val1 = nice(1);
20207 if (val1 != -1 && val1 == nice(2))
20208 exit(0);
20209 exit(1);
20210}
20211
Martin v. Löwis11437992002-04-12 09:54:03 +000020212_ACEOF
20213rm -f conftest$ac_exeext
20214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20215 (eval $ac_link) 2>&5
20216 ac_status=$?
20217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20220 (eval $ac_try) 2>&5
20221 ac_status=$?
20222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20223 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020224 ac_cv_broken_nice=yes
20225else
Martin v. Löwis11437992002-04-12 09:54:03 +000020226 echo "$as_me: program exited with status $ac_status" >&5
20227echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020228sed 's/^/| /' conftest.$ac_ext >&5
20229
Martin v. Löwis11437992002-04-12 09:54:03 +000020230( exit $ac_status )
20231ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020232fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020233rm -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 +000020234fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020235fi
20236
Martin v. Löwis11437992002-04-12 09:54:03 +000020237echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
20238echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020239if test "$ac_cv_broken_nice" = yes
20240then
Martin v. Löwis11437992002-04-12 09:54:03 +000020241
20242cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020243#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020244_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020245
20246fi
20247
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020248echo "$as_me:$LINENO: checking for broken poll()" >&5
20249echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
20250if test "$cross_compiling" = yes; then
20251 ac_cv_broken_poll=no
20252else
20253 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020254/* confdefs.h. */
20255_ACEOF
20256cat confdefs.h >>conftest.$ac_ext
20257cat >>conftest.$ac_ext <<_ACEOF
20258/* end confdefs.h. */
20259
20260#include <poll.h>
20261
20262int main (void)
20263 {
20264 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
20265
20266 close (42);
20267
20268 int poll_test = poll (&poll_struct, 1, 0);
20269
20270 if (poll_test < 0)
20271 {
20272 exit(0);
20273 }
20274 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
20275 {
20276 exit(0);
20277 }
20278 else
20279 {
20280 exit(1);
20281 }
20282 }
20283
20284_ACEOF
20285rm -f conftest$ac_exeext
20286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20287 (eval $ac_link) 2>&5
20288 ac_status=$?
20289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20290 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20292 (eval $ac_try) 2>&5
20293 ac_status=$?
20294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20295 (exit $ac_status); }; }; then
20296 ac_cv_broken_poll=yes
20297else
20298 echo "$as_me: program exited with status $ac_status" >&5
20299echo "$as_me: failed program was:" >&5
20300sed 's/^/| /' conftest.$ac_ext >&5
20301
20302( exit $ac_status )
20303ac_cv_broken_poll=no
20304fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020305rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020306fi
20307echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
20308echo "${ECHO_T}$ac_cv_broken_poll" >&6
20309if test "$ac_cv_broken_poll" = yes
20310then
20311
20312cat >>confdefs.h <<\_ACEOF
20313#define HAVE_BROKEN_POLL 1
20314_ACEOF
20315
20316fi
20317
Brett Cannon43802422005-02-10 20:48:03 +000020318# 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 +000020319# (which is not required by ISO C or UNIX spec) and/or if we support
20320# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000020321echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20322echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20323if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20324 echo $ECHO_N "(cached) $ECHO_C" >&6
20325else
20326 cat >conftest.$ac_ext <<_ACEOF
20327/* confdefs.h. */
20328_ACEOF
20329cat confdefs.h >>conftest.$ac_ext
20330cat >>conftest.$ac_ext <<_ACEOF
20331/* end confdefs.h. */
20332#include <sys/types.h>
20333#include <$ac_cv_struct_tm>
20334
20335
20336int
20337main ()
20338{
20339static struct tm ac_aggr;
20340if (ac_aggr.tm_zone)
20341return 0;
20342 ;
20343 return 0;
20344}
20345_ACEOF
20346rm -f conftest.$ac_objext
20347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20348 (eval $ac_compile) 2>conftest.er1
20349 ac_status=$?
20350 grep -v '^ *+' conftest.er1 >conftest.err
20351 rm -f conftest.er1
20352 cat conftest.err >&5
20353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20354 (exit $ac_status); } &&
20355 { ac_try='test -z "$ac_c_werror_flag"
20356 || test ! -s conftest.err'
20357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20358 (eval $ac_try) 2>&5
20359 ac_status=$?
20360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20361 (exit $ac_status); }; } &&
20362 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
20368 ac_cv_member_struct_tm_tm_zone=yes
20369else
20370 echo "$as_me: failed program was:" >&5
20371sed 's/^/| /' conftest.$ac_ext >&5
20372
20373cat >conftest.$ac_ext <<_ACEOF
20374/* confdefs.h. */
20375_ACEOF
20376cat confdefs.h >>conftest.$ac_ext
20377cat >>conftest.$ac_ext <<_ACEOF
20378/* end confdefs.h. */
20379#include <sys/types.h>
20380#include <$ac_cv_struct_tm>
20381
20382
20383int
20384main ()
20385{
20386static struct tm ac_aggr;
20387if (sizeof ac_aggr.tm_zone)
20388return 0;
20389 ;
20390 return 0;
20391}
20392_ACEOF
20393rm -f conftest.$ac_objext
20394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20395 (eval $ac_compile) 2>conftest.er1
20396 ac_status=$?
20397 grep -v '^ *+' conftest.er1 >conftest.err
20398 rm -f conftest.er1
20399 cat conftest.err >&5
20400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20401 (exit $ac_status); } &&
20402 { ac_try='test -z "$ac_c_werror_flag"
20403 || test ! -s conftest.err'
20404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20405 (eval $ac_try) 2>&5
20406 ac_status=$?
20407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20408 (exit $ac_status); }; } &&
20409 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
20415 ac_cv_member_struct_tm_tm_zone=yes
20416else
20417 echo "$as_me: failed program was:" >&5
20418sed 's/^/| /' conftest.$ac_ext >&5
20419
20420ac_cv_member_struct_tm_tm_zone=no
20421fi
20422rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20423fi
20424rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20425fi
20426echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20427echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20428if test $ac_cv_member_struct_tm_tm_zone = yes; then
20429
20430cat >>confdefs.h <<_ACEOF
20431#define HAVE_STRUCT_TM_TM_ZONE 1
20432_ACEOF
20433
20434
20435fi
20436
20437if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20438
20439cat >>confdefs.h <<\_ACEOF
20440#define HAVE_TM_ZONE 1
20441_ACEOF
20442
20443else
20444 echo "$as_me:$LINENO: checking for tzname" >&5
20445echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20446if test "${ac_cv_var_tzname+set}" = set; then
20447 echo $ECHO_N "(cached) $ECHO_C" >&6
20448else
20449 cat >conftest.$ac_ext <<_ACEOF
20450/* confdefs.h. */
20451_ACEOF
20452cat confdefs.h >>conftest.$ac_ext
20453cat >>conftest.$ac_ext <<_ACEOF
20454/* end confdefs.h. */
20455#include <time.h>
20456#ifndef tzname /* For SGI. */
20457extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20458#endif
20459
20460int
20461main ()
20462{
20463atoi(*tzname);
20464 ;
20465 return 0;
20466}
20467_ACEOF
20468rm -f conftest.$ac_objext conftest$ac_exeext
20469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20470 (eval $ac_link) 2>conftest.er1
20471 ac_status=$?
20472 grep -v '^ *+' conftest.er1 >conftest.err
20473 rm -f conftest.er1
20474 cat conftest.err >&5
20475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20476 (exit $ac_status); } &&
20477 { ac_try='test -z "$ac_c_werror_flag"
20478 || test ! -s conftest.err'
20479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20480 (eval $ac_try) 2>&5
20481 ac_status=$?
20482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20483 (exit $ac_status); }; } &&
20484 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
20490 ac_cv_var_tzname=yes
20491else
20492 echo "$as_me: failed program was:" >&5
20493sed 's/^/| /' conftest.$ac_ext >&5
20494
20495ac_cv_var_tzname=no
20496fi
20497rm -f conftest.err conftest.$ac_objext \
20498 conftest$ac_exeext conftest.$ac_ext
20499fi
20500echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20501echo "${ECHO_T}$ac_cv_var_tzname" >&6
20502 if test $ac_cv_var_tzname = yes; then
20503
20504cat >>confdefs.h <<\_ACEOF
20505#define HAVE_TZNAME 1
20506_ACEOF
20507
20508 fi
20509fi
20510
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020511
Martin v. Löwis1d459062005-03-14 21:23:33 +000020512# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020513echo "$as_me:$LINENO: checking for working tzset()" >&5
20514echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
20515if test "${ac_cv_working_tzset+set}" = set; then
20516 echo $ECHO_N "(cached) $ECHO_C" >&6
20517else
20518
20519if test "$cross_compiling" = yes; then
20520 ac_cv_working_tzset=no
20521else
20522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020523/* confdefs.h. */
20524_ACEOF
20525cat confdefs.h >>conftest.$ac_ext
20526cat >>conftest.$ac_ext <<_ACEOF
20527/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020528
20529#include <stdlib.h>
20530#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000020531#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000020532
20533#if HAVE_TZNAME
20534extern char *tzname[];
20535#endif
20536
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020537int main()
20538{
Brett Cannon18367812003-09-19 00:59:16 +000020539 /* Note that we need to ensure that not only does tzset(3)
20540 do 'something' with localtime, but it works as documented
20541 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000020542 This includes making sure that tzname is set properly if
20543 tm->tm_zone does not exist since it is the alternative way
20544 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000020545
20546 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000020547 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000020548 */
20549
Martin v. Löwis1d459062005-03-14 21:23:33 +000020550 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000020551 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
20552
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020553 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020554 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020555 if (localtime(&groundhogday)->tm_hour != 0)
20556 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020557#if HAVE_TZNAME
20558 /* For UTC, tzname[1] is sometimes "", sometimes " " */
20559 if (strcmp(tzname[0], "UTC") ||
20560 (tzname[1][0] != 0 && tzname[1][0] != ' '))
20561 exit(1);
20562#endif
Brett Cannon18367812003-09-19 00:59:16 +000020563
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020564 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020565 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020566 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020567 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020568#if HAVE_TZNAME
20569 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
20570 exit(1);
20571#endif
Brett Cannon18367812003-09-19 00:59:16 +000020572
20573 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
20574 tzset();
20575 if (localtime(&groundhogday)->tm_hour != 11)
20576 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020577#if HAVE_TZNAME
20578 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
20579 exit(1);
20580#endif
20581
20582#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000020583 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
20584 exit(1);
20585 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
20586 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020587#endif
Brett Cannon18367812003-09-19 00:59:16 +000020588
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020589 exit(0);
20590}
20591
20592_ACEOF
20593rm -f conftest$ac_exeext
20594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20595 (eval $ac_link) 2>&5
20596 ac_status=$?
20597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20598 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20600 (eval $ac_try) 2>&5
20601 ac_status=$?
20602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20603 (exit $ac_status); }; }; then
20604 ac_cv_working_tzset=yes
20605else
20606 echo "$as_me: program exited with status $ac_status" >&5
20607echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020608sed 's/^/| /' conftest.$ac_ext >&5
20609
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020610( exit $ac_status )
20611ac_cv_working_tzset=no
20612fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020613rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020614fi
20615fi
20616
20617echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
20618echo "${ECHO_T}$ac_cv_working_tzset" >&6
20619if test "$ac_cv_working_tzset" = yes
20620then
20621
20622cat >>confdefs.h <<\_ACEOF
20623#define HAVE_WORKING_TZSET 1
20624_ACEOF
20625
20626fi
20627
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020628# Look for subsecond timestamps in struct stat
20629echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
20630echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
20631if test "${ac_cv_stat_tv_nsec+set}" = set; then
20632 echo $ECHO_N "(cached) $ECHO_C" >&6
20633else
20634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020635/* confdefs.h. */
20636_ACEOF
20637cat confdefs.h >>conftest.$ac_ext
20638cat >>conftest.$ac_ext <<_ACEOF
20639/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020640#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020641int
20642main ()
20643{
20644
20645struct stat st;
20646st.st_mtim.tv_nsec = 1;
20647
20648 ;
20649 return 0;
20650}
20651_ACEOF
20652rm -f conftest.$ac_objext
20653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020654 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020656 grep -v '^ *+' conftest.er1 >conftest.err
20657 rm -f conftest.er1
20658 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20660 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020661 { ac_try='test -z "$ac_c_werror_flag"
20662 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20664 (eval $ac_try) 2>&5
20665 ac_status=$?
20666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20667 (exit $ac_status); }; } &&
20668 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +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); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000020674 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020675else
20676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020677sed 's/^/| /' conftest.$ac_ext >&5
20678
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020679ac_cv_stat_tv_nsec=no
20680fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020681rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020682fi
20683
20684echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
20685echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
20686if test "$ac_cv_stat_tv_nsec" = yes
20687then
20688
20689cat >>confdefs.h <<\_ACEOF
20690#define HAVE_STAT_TV_NSEC 1
20691_ACEOF
20692
20693fi
20694
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020695# Look for BSD style subsecond timestamps in struct stat
20696echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
20697echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
20698if test "${ac_cv_stat_tv_nsec2+set}" = set; then
20699 echo $ECHO_N "(cached) $ECHO_C" >&6
20700else
20701 cat >conftest.$ac_ext <<_ACEOF
20702/* confdefs.h. */
20703_ACEOF
20704cat confdefs.h >>conftest.$ac_ext
20705cat >>conftest.$ac_ext <<_ACEOF
20706/* end confdefs.h. */
20707#include <sys/stat.h>
20708int
20709main ()
20710{
20711
20712struct stat st;
20713st.st_mtimespec.tv_nsec = 1;
20714
20715 ;
20716 return 0;
20717}
20718_ACEOF
20719rm -f conftest.$ac_objext
20720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20721 (eval $ac_compile) 2>conftest.er1
20722 ac_status=$?
20723 grep -v '^ *+' conftest.er1 >conftest.err
20724 rm -f conftest.er1
20725 cat conftest.err >&5
20726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20727 (exit $ac_status); } &&
20728 { ac_try='test -z "$ac_c_werror_flag"
20729 || test ! -s conftest.err'
20730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20731 (eval $ac_try) 2>&5
20732 ac_status=$?
20733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20734 (exit $ac_status); }; } &&
20735 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
20741 ac_cv_stat_tv_nsec2=yes
20742else
20743 echo "$as_me: failed program was:" >&5
20744sed 's/^/| /' conftest.$ac_ext >&5
20745
20746ac_cv_stat_tv_nsec2=no
20747fi
20748rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20749fi
20750
20751echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
20752echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
20753if test "$ac_cv_stat_tv_nsec2" = yes
20754then
20755
20756cat >>confdefs.h <<\_ACEOF
20757#define HAVE_STAT_TV_NSEC2 1
20758_ACEOF
20759
20760fi
20761
Jack Jansen666b1e72001-10-31 12:11:48 +000020762# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000020763echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
20764echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
20765if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
20766 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020767else
Martin v. Löwis11437992002-04-12 09:54:03 +000020768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020769/* confdefs.h. */
20770_ACEOF
20771cat confdefs.h >>conftest.$ac_ext
20772cat >>conftest.$ac_ext <<_ACEOF
20773/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020774#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020775int
20776main ()
20777{
Jack Jansen666b1e72001-10-31 12:11:48 +000020778
20779 int rtn;
20780 rtn = mvwdelch(0,0,0);
20781
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 ;
20783 return 0;
20784}
20785_ACEOF
20786rm -f conftest.$ac_objext
20787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020788 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020790 grep -v '^ *+' conftest.er1 >conftest.err
20791 rm -f conftest.er1
20792 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20794 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020795 { ac_try='test -z "$ac_c_werror_flag"
20796 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20798 (eval $ac_try) 2>&5
20799 ac_status=$?
20800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20801 (exit $ac_status); }; } &&
20802 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020808 ac_cv_mvwdelch_is_expression=yes
20809else
Martin v. Löwis11437992002-04-12 09:54:03 +000020810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020811sed 's/^/| /' conftest.$ac_ext >&5
20812
Martin v. Löwis11437992002-04-12 09:54:03 +000020813ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020814fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020815rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020816fi
20817
Martin v. Löwis11437992002-04-12 09:54:03 +000020818echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
20819echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020820
20821if test "$ac_cv_mvwdelch_is_expression" = yes
20822then
Martin v. Löwis11437992002-04-12 09:54:03 +000020823
20824cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020825#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020826_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020827
20828fi
20829
Martin v. Löwis11437992002-04-12 09:54:03 +000020830echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
20831echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
20832if test "${ac_cv_window_has_flags+set}" = set; then
20833 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020834else
Martin v. Löwis11437992002-04-12 09:54:03 +000020835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020836/* confdefs.h. */
20837_ACEOF
20838cat confdefs.h >>conftest.$ac_ext
20839cat >>conftest.$ac_ext <<_ACEOF
20840/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020841#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020842int
20843main ()
20844{
Jack Jansen666b1e72001-10-31 12:11:48 +000020845
20846 WINDOW *w;
20847 w->_flags = 0;
20848
Martin v. Löwis11437992002-04-12 09:54:03 +000020849 ;
20850 return 0;
20851}
20852_ACEOF
20853rm -f conftest.$ac_objext
20854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020855 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020857 grep -v '^ *+' conftest.er1 >conftest.err
20858 rm -f conftest.er1
20859 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20861 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020862 { ac_try='test -z "$ac_c_werror_flag"
20863 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20865 (eval $ac_try) 2>&5
20866 ac_status=$?
20867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20868 (exit $ac_status); }; } &&
20869 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020875 ac_cv_window_has_flags=yes
20876else
Martin v. Löwis11437992002-04-12 09:54:03 +000020877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020878sed 's/^/| /' conftest.$ac_ext >&5
20879
Martin v. Löwis11437992002-04-12 09:54:03 +000020880ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020881fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020882rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020883fi
20884
Martin v. Löwis11437992002-04-12 09:54:03 +000020885echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
20886echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020887
Jack Jansen666b1e72001-10-31 12:11:48 +000020888
20889if test "$ac_cv_window_has_flags" = yes
20890then
Martin v. Löwis11437992002-04-12 09:54:03 +000020891
20892cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020893#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020894_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020895
20896fi
20897
Martin v. Löwis24a880b2002-12-31 12:55:15 +000020898echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
20899echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
20900
20901if test -e /dev/ptmx
20902then
20903 echo "$as_me:$LINENO: result: yes" >&5
20904echo "${ECHO_T}yes" >&6
20905
20906cat >>confdefs.h <<\_ACEOF
20907#define HAVE_DEV_PTMX 1
20908_ACEOF
20909
20910else
20911 echo "$as_me:$LINENO: result: no" >&5
20912echo "${ECHO_T}no" >&6
20913fi
20914
Neal Norwitz865400f2003-03-21 01:42:58 +000020915echo "$as_me:$LINENO: checking for /dev/ptc" >&5
20916echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
20917
20918if test -e /dev/ptc
20919then
20920 echo "$as_me:$LINENO: result: yes" >&5
20921echo "${ECHO_T}yes" >&6
20922
20923cat >>confdefs.h <<\_ACEOF
20924#define HAVE_DEV_PTC 1
20925_ACEOF
20926
20927else
20928 echo "$as_me:$LINENO: result: no" >&5
20929echo "${ECHO_T}no" >&6
20930fi
20931
Martin v. Löwis11437992002-04-12 09:54:03 +000020932echo "$as_me:$LINENO: checking for socklen_t" >&5
20933echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
20934if test "${ac_cv_type_socklen_t+set}" = set; then
20935 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000020936else
Martin v. Löwis11437992002-04-12 09:54:03 +000020937 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020938/* confdefs.h. */
20939_ACEOF
20940cat confdefs.h >>conftest.$ac_ext
20941cat >>conftest.$ac_ext <<_ACEOF
20942/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000020943
20944#ifdef HAVE_SYS_TYPES_H
20945#include <sys/types.h>
20946#endif
20947#ifdef HAVE_SYS_SOCKET_H
20948#include <sys/socket.h>
20949#endif
20950
20951
Martin v. Löwis11437992002-04-12 09:54:03 +000020952int
20953main ()
20954{
20955if ((socklen_t *) 0)
20956 return 0;
20957if (sizeof (socklen_t))
20958 return 0;
20959 ;
20960 return 0;
20961}
20962_ACEOF
20963rm -f conftest.$ac_objext
20964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020965 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020967 grep -v '^ *+' conftest.er1 >conftest.err
20968 rm -f conftest.er1
20969 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20971 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020972 { ac_try='test -z "$ac_c_werror_flag"
20973 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20975 (eval $ac_try) 2>&5
20976 ac_status=$?
20977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20978 (exit $ac_status); }; } &&
20979 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000020985 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000020986else
Martin v. Löwis11437992002-04-12 09:54:03 +000020987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020988sed 's/^/| /' conftest.$ac_ext >&5
20989
Martin v. Löwis11437992002-04-12 09:54:03 +000020990ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000020991fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020992rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020993fi
20994echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
20995echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
20996if test $ac_cv_type_socklen_t = yes; then
20997 :
20998else
Guido van Rossum95713eb2000-05-18 20:53:31 +000020999
Martin v. Löwis01c04012002-11-11 14:58:44 +000021000cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021001#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000021002_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021003
21004fi
21005
Michael W. Hudson54241132001-12-07 15:38:26 +000021006
Michael W. Hudson54241132001-12-07 15:38:26 +000021007
21008
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000021009for h in `(cd $srcdir;echo Python/thread_*.h)`
21010do
21011 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
21012done
21013
Michael W. Hudson54241132001-12-07 15:38:26 +000021014
Neal Norwitzd24499d2005-12-18 21:36:39 +000021015SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwis11437992002-04-12 09:54:03 +000021016echo "$as_me:$LINENO: checking for build directories" >&5
21017echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021018for dir in $SRCDIRS; do
21019 if test ! -d $dir; then
21020 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000021021 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021022done
Martin v. Löwis11437992002-04-12 09:54:03 +000021023echo "$as_me:$LINENO: result: done" >&5
21024echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000021025
Guido van Rossum627b2d71993-12-24 10:39:16 +000021026# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000021027 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000021028
Martin v. Löwis11437992002-04-12 09:54:03 +000021029cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021030# This file is a shell script that caches the results of configure
21031# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000021032# scripts and configure runs, see configure's option --config-cache.
21033# It is not useful on other systems. If it contains results you don't
21034# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021035#
Martin v. Löwis11437992002-04-12 09:54:03 +000021036# config.status only pays attention to the cache file if you give it
21037# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021038#
Skip Montanaro6dead952003-09-25 14:50:04 +000021039# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000021040# loading this file, other *unset* `ac_cv_foo' will be assigned the
21041# following values.
21042
21043_ACEOF
21044
Guido van Rossumf78abae1997-01-21 22:02:36 +000021045# The following way of writing the cache mishandles newlines in values,
21046# but we know of no workaround that is simple, portable, and efficient.
21047# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021048# Ultrix sh set writes to stderr and can't be redirected directly,
21049# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000021050{
21051 (set) 2>&1 |
21052 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21053 *ac_space=\ *)
21054 # `set' does not quote correctly, so add quotes (double-quote
21055 # substitution turns \\\\ into \\, and sed turns \\ into \).
21056 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021057 "s/'/'\\\\''/g;
21058 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021059 ;;
21060 *)
21061 # `set' quotes correctly as required by POSIX, so do not add quotes.
21062 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021063 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021064 ;;
21065 esac;
21066} |
21067 sed '
21068 t clear
21069 : clear
21070 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21071 t end
21072 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21073 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000021074if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021075 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021076 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21077 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021078 else
21079 echo "not updating unwritable cache $cache_file"
21080 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021081fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021082rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000021083
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021084test "x$prefix" = xNONE && prefix=$ac_default_prefix
21085# Let make expand exec_prefix.
21086test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000021087
Martin v. Löwis11437992002-04-12 09:54:03 +000021088# VPATH may cause trouble with some makes, so we remove $(srcdir),
21089# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21090# trailing colons and then remove the whole line if VPATH becomes empty
21091# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000021092if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021093 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000021094s/:*\$(srcdir):*/:/;
21095s/:*\${srcdir}:*/:/;
21096s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021097s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000021098s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021099s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000021100}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021101fi
21102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021103DEFS=-DHAVE_CONFIG_H
21104
Skip Montanaro6dead952003-09-25 14:50:04 +000021105ac_libobjs=
21106ac_ltlibobjs=
21107for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21108 # 1. Remove the extension, and $U if already installed.
21109 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021110 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021111 # 2. Add them.
21112 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21113 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21114done
21115LIBOBJS=$ac_libobjs
21116
21117LTLIBOBJS=$ac_ltlibobjs
21118
21119
Martin v. Löwis11437992002-04-12 09:54:03 +000021120
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021121: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000021122ac_clean_files_save=$ac_clean_files
21123ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21124{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21125echo "$as_me: creating $CONFIG_STATUS" >&6;}
21126cat >$CONFIG_STATUS <<_ACEOF
21127#! $SHELL
21128# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021129# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021130# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000021131# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021132
Martin v. Löwis11437992002-04-12 09:54:03 +000021133debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000021134ac_cs_recheck=false
21135ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021136SHELL=\${CONFIG_SHELL-$SHELL}
21137_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000021138
Martin v. Löwis11437992002-04-12 09:54:03 +000021139cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021140## --------------------- ##
21141## M4sh Initialization. ##
21142## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000021143
Martin v. Löwis11437992002-04-12 09:54:03 +000021144# Be Bourne compatible
21145if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21146 emulate sh
21147 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021148 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21149 # is contrary to our usage. Disable this feature.
21150 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021151elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21152 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000021153fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021154DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000021155
Martin v. Löwis11437992002-04-12 09:54:03 +000021156# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021157if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021158 as_unset=unset
21159else
21160 as_unset=false
21161fi
Michael W. Hudson54241132001-12-07 15:38:26 +000021162
Skip Montanaro6dead952003-09-25 14:50:04 +000021163
21164# Work around bugs in pre-3.0 UWIN ksh.
21165$as_unset ENV MAIL MAILPATH
21166PS1='$ '
21167PS2='> '
21168PS4='+ '
21169
21170# NLS nuisances.
21171for as_var in \
21172 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21173 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21174 LC_TELEPHONE LC_TIME
21175do
Skip Montanarof0d5f792004-08-15 14:08:23 +000021176 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000021177 eval $as_var=C; export $as_var
21178 else
21179 $as_unset $as_var
21180 fi
21181done
21182
21183# Required to use basename.
21184if expr a : '\(a\)' >/dev/null 2>&1; then
21185 as_expr=expr
21186else
21187 as_expr=false
21188fi
21189
21190if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
21191 as_basename=basename
21192else
21193 as_basename=false
21194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021195
21196
21197# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000021198as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021199$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21200 X"$0" : 'X\(//\)$' \| \
21201 X"$0" : 'X\(/\)$' \| \
21202 . : '\(.\)' 2>/dev/null ||
21203echo X/"$0" |
21204 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21205 /^X\/\(\/\/\)$/{ s//\1/; q; }
21206 /^X\/\(\/\).*/{ s//\1/; q; }
21207 s/.*/./; q'`
21208
Skip Montanaro6dead952003-09-25 14:50:04 +000021209
Martin v. Löwis11437992002-04-12 09:54:03 +000021210# PATH needs CR, and LINENO needs CR and PATH.
21211# Avoid depending upon Character Ranges.
21212as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21213as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21214as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21215as_cr_digits='0123456789'
21216as_cr_alnum=$as_cr_Letters$as_cr_digits
21217
21218# The user is always right.
21219if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021220 echo "#! /bin/sh" >conf$$.sh
21221 echo "exit 0" >>conf$$.sh
21222 chmod +x conf$$.sh
21223 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021224 PATH_SEPARATOR=';'
21225 else
21226 PATH_SEPARATOR=:
21227 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021228 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000021229fi
21230
21231
21232 as_lineno_1=$LINENO
21233 as_lineno_2=$LINENO
21234 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21235 test "x$as_lineno_1" != "x$as_lineno_2" &&
21236 test "x$as_lineno_3" = "x$as_lineno_2" || {
21237 # Find who we are. Look in the path if we contain no path at all
21238 # relative or not.
21239 case $0 in
21240 *[\\/]* ) as_myself=$0 ;;
21241 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21242for as_dir in $PATH
21243do
21244 IFS=$as_save_IFS
21245 test -z "$as_dir" && as_dir=.
21246 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21247done
21248
21249 ;;
21250 esac
21251 # We did not find ourselves, most probably we were run as `sh COMMAND'
21252 # in which case we are not to be found in the path.
21253 if test "x$as_myself" = x; then
21254 as_myself=$0
21255 fi
21256 if test ! -f "$as_myself"; then
21257 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21258echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21259 { (exit 1); exit 1; }; }
21260 fi
21261 case $CONFIG_SHELL in
21262 '')
21263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21264for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21265do
21266 IFS=$as_save_IFS
21267 test -z "$as_dir" && as_dir=.
21268 for as_base in sh bash ksh sh5; do
21269 case $as_dir in
21270 /*)
21271 if ("$as_dir/$as_base" -c '
21272 as_lineno_1=$LINENO
21273 as_lineno_2=$LINENO
21274 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21275 test "x$as_lineno_1" != "x$as_lineno_2" &&
21276 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021277 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21278 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021279 CONFIG_SHELL=$as_dir/$as_base
21280 export CONFIG_SHELL
21281 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21282 fi;;
21283 esac
21284 done
21285done
21286;;
Jack Jansendd19cf82001-12-06 22:36:17 +000021287 esac
21288
Martin v. Löwis11437992002-04-12 09:54:03 +000021289 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21290 # uniformly replaced by the line number. The first 'sed' inserts a
21291 # line-number line before each line; the second 'sed' does the real
21292 # work. The second script uses 'N' to pair each line-number line
21293 # with the numbered line, and appends trailing '-' during
21294 # substitution so that $LINENO is not a special case at line end.
21295 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21296 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21297 sed '=' <$as_myself |
21298 sed '
21299 N
21300 s,$,-,
21301 : loop
21302 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
21303 t loop
21304 s,-$,,
21305 s,^['$as_cr_digits']*\n,,
21306 ' >$as_me.lineno &&
21307 chmod +x $as_me.lineno ||
21308 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21309echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
21310 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021311
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 # Don't try to exec as it changes $[0], causing all sort of problems
21313 # (the dirname of $[0] is not the place where we might find the
21314 # original and so on. Autoconf is especially sensible to this).
21315 . ./$as_me.lineno
21316 # Exit status is that of the last command.
21317 exit
21318}
21319
21320
21321case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21322 *c*,-n*) ECHO_N= ECHO_C='
21323' ECHO_T=' ' ;;
21324 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21325 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
21326esac
21327
21328if expr a : '\(a\)' >/dev/null 2>&1; then
21329 as_expr=expr
21330else
21331 as_expr=false
21332fi
21333
21334rm -f conf$$ conf$$.exe conf$$.file
21335echo >conf$$.file
21336if ln -s conf$$.file conf$$ 2>/dev/null; then
21337 # We could just check for DJGPP; but this test a) works b) is more generic
21338 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21339 if test -f conf$$.exe; then
21340 # Don't use ln at all; we don't have any links
21341 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021342 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021343 as_ln_s='ln -s'
21344 fi
21345elif ln conf$$.file conf$$ 2>/dev/null; then
21346 as_ln_s=ln
21347else
21348 as_ln_s='cp -p'
21349fi
21350rm -f conf$$ conf$$.exe conf$$.file
21351
Skip Montanaro6dead952003-09-25 14:50:04 +000021352if mkdir -p . 2>/dev/null; then
21353 as_mkdir_p=:
21354else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021355 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000021356 as_mkdir_p=false
21357fi
21358
Martin v. Löwis11437992002-04-12 09:54:03 +000021359as_executable_p="test -f"
21360
21361# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021362as_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 +000021363
21364# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021365as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000021366
21367
21368# IFS
21369# We need space, tab and new line, in precisely that order.
21370as_nl='
21371'
21372IFS=" $as_nl"
21373
21374# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000021375$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000021376
21377exec 6>&1
21378
21379# Open the log real soon, to keep \$[0] and so on meaningful, and to
21380# report actual input values of CONFIG_FILES etc. instead of their
21381# values after options handling. Logging --version etc. is OK.
21382exec 5>>config.log
21383{
21384 echo
21385 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21386## Running $as_me. ##
21387_ASBOX
21388} >&5
21389cat >&5 <<_CSEOF
21390
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000021391This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000021392generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000021393
21394 CONFIG_FILES = $CONFIG_FILES
21395 CONFIG_HEADERS = $CONFIG_HEADERS
21396 CONFIG_LINKS = $CONFIG_LINKS
21397 CONFIG_COMMANDS = $CONFIG_COMMANDS
21398 $ $0 $@
21399
21400_CSEOF
21401echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21402echo >&5
21403_ACEOF
21404
21405# Files that config.status was made for.
21406if test -n "$ac_config_files"; then
21407 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21408fi
21409
21410if test -n "$ac_config_headers"; then
21411 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21412fi
21413
21414if test -n "$ac_config_links"; then
21415 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21416fi
21417
21418if test -n "$ac_config_commands"; then
21419 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21420fi
21421
21422cat >>$CONFIG_STATUS <<\_ACEOF
21423
21424ac_cs_usage="\
21425\`$as_me' instantiates files from templates according to the
21426current configuration.
21427
21428Usage: $0 [OPTIONS] [FILE]...
21429
21430 -h, --help print this help, then exit
21431 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000021432 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000021433 -d, --debug don't remove temporary files
21434 --recheck update $as_me by reconfiguring in the same conditions
21435 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021436 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021437 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021438 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021439
21440Configuration files:
21441$config_files
21442
21443Configuration headers:
21444$config_headers
21445
21446Report bugs to <bug-autoconf@gnu.org>."
21447_ACEOF
21448
21449cat >>$CONFIG_STATUS <<_ACEOF
21450ac_cs_version="\\
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000021451python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021452configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000021453 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21454
Skip Montanarof0d5f792004-08-15 14:08:23 +000021455Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000021456This config.status script is free software; the Free Software Foundation
21457gives unlimited permission to copy, distribute and modify it."
21458srcdir=$srcdir
21459INSTALL="$INSTALL"
21460_ACEOF
21461
21462cat >>$CONFIG_STATUS <<\_ACEOF
21463# If no file are specified by the user, then we need to provide default
21464# value. By we need to know if files were specified by the user.
21465ac_need_defaults=:
21466while test $# != 0
21467do
21468 case $1 in
21469 --*=*)
21470 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21471 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021472 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000021473 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021474 -*)
21475 ac_option=$1
21476 ac_optarg=$2
21477 ac_shift=shift
21478 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021479 *) # This is not an option, so the user has probably given explicit
21480 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000021481 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000021482 ac_need_defaults=false;;
21483 esac
21484
Skip Montanaro6dead952003-09-25 14:50:04 +000021485 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000021486 # Handling of the options.
21487_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021488cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021489 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21490 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021491 --version | --vers* | -V )
21492 echo "$ac_cs_version"; exit 0 ;;
21493 --he | --h)
21494 # Conflict between --help and --header
21495 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21496Try \`$0 --help' for more information." >&5
21497echo "$as_me: error: ambiguous option: $1
21498Try \`$0 --help' for more information." >&2;}
21499 { (exit 1); exit 1; }; };;
21500 --help | --hel | -h )
21501 echo "$ac_cs_usage"; exit 0 ;;
21502 --debug | --d* | -d )
21503 debug=: ;;
21504 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000021505 $ac_shift
21506 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021507 ac_need_defaults=false;;
21508 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000021509 $ac_shift
21510 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021511 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021512 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21513 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21514 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021515
21516 # This is an error.
21517 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21518Try \`$0 --help' for more information." >&5
21519echo "$as_me: error: unrecognized option: $1
21520Try \`$0 --help' for more information." >&2;}
21521 { (exit 1); exit 1; }; } ;;
21522
21523 *) ac_config_targets="$ac_config_targets $1" ;;
21524
21525 esac
21526 shift
21527done
21528
Skip Montanaro6dead952003-09-25 14:50:04 +000021529ac_configure_extra_args=
21530
21531if $ac_cs_silent; then
21532 exec 6>/dev/null
21533 ac_configure_extra_args="$ac_configure_extra_args --silent"
21534fi
21535
21536_ACEOF
21537cat >>$CONFIG_STATUS <<_ACEOF
21538if \$ac_cs_recheck; then
21539 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21540 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21541fi
21542
Martin v. Löwis11437992002-04-12 09:54:03 +000021543_ACEOF
21544
21545
21546
21547
21548
21549cat >>$CONFIG_STATUS <<\_ACEOF
21550for ac_config_target in $ac_config_targets
21551do
21552 case "$ac_config_target" in
21553 # Handling of arguments.
21554 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
21555 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
21556 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
21557 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21558echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21559 { (exit 1); exit 1; }; };;
21560 esac
21561done
21562
21563# If the user did not use the arguments to specify the items to instantiate,
21564# then the envvar interface is used. Set only those that are not.
21565# We use the long form for the default assignment because of an extremely
21566# bizarre bug on SunOS 4.1.3.
21567if $ac_need_defaults; then
21568 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21569 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21570fi
21571
Skip Montanaro6dead952003-09-25 14:50:04 +000021572# Have a temporary directory for convenience. Make it in the build tree
21573# simply because there is no reason to put it here, and in addition,
21574# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000021575# Create a temporary directory, and hook for its removal unless debugging.
21576$debug ||
21577{
21578 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21579 trap '{ (exit 1); exit 1; }' 1 2 13 15
21580}
21581
21582# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000021583
Martin v. Löwis11437992002-04-12 09:54:03 +000021584{
Skip Montanaro6dead952003-09-25 14:50:04 +000021585 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000021586 test -n "$tmp" && test -d "$tmp"
21587} ||
21588{
Skip Montanaro6dead952003-09-25 14:50:04 +000021589 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000021590 (umask 077 && mkdir $tmp)
21591} ||
21592{
Skip Montanaro6dead952003-09-25 14:50:04 +000021593 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000021594 { (exit 1); exit 1; }
21595}
21596
21597_ACEOF
21598
21599cat >>$CONFIG_STATUS <<_ACEOF
21600
21601#
21602# CONFIG_FILES section.
21603#
21604
21605# No need to generate the scripts if there are no CONFIG_FILES.
21606# This happens for instance when ./config.status config.h
21607if test -n "\$CONFIG_FILES"; then
21608 # Protect against being on the right side of a sed subst in config.status.
21609 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21610 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21611s,@SHELL@,$SHELL,;t t
21612s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21613s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21614s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21615s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21616s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21617s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21618s,@exec_prefix@,$exec_prefix,;t t
21619s,@prefix@,$prefix,;t t
21620s,@program_transform_name@,$program_transform_name,;t t
21621s,@bindir@,$bindir,;t t
21622s,@sbindir@,$sbindir,;t t
21623s,@libexecdir@,$libexecdir,;t t
21624s,@datadir@,$datadir,;t t
21625s,@sysconfdir@,$sysconfdir,;t t
21626s,@sharedstatedir@,$sharedstatedir,;t t
21627s,@localstatedir@,$localstatedir,;t t
21628s,@libdir@,$libdir,;t t
21629s,@includedir@,$includedir,;t t
21630s,@oldincludedir@,$oldincludedir,;t t
21631s,@infodir@,$infodir,;t t
21632s,@mandir@,$mandir,;t t
21633s,@build_alias@,$build_alias,;t t
21634s,@host_alias@,$host_alias,;t t
21635s,@target_alias@,$target_alias,;t t
21636s,@DEFS@,$DEFS,;t t
21637s,@ECHO_C@,$ECHO_C,;t t
21638s,@ECHO_N@,$ECHO_N,;t t
21639s,@ECHO_T@,$ECHO_T,;t t
21640s,@LIBS@,$LIBS,;t t
21641s,@VERSION@,$VERSION,;t t
21642s,@SOVERSION@,$SOVERSION,;t t
21643s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
21644s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
21645s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
21646s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
21647s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
21648s,@MACHDEP@,$MACHDEP,;t t
21649s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000021650s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000021651s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000021652s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021653s,@CXX@,$CXX,;t t
21654s,@MAINOBJ@,$MAINOBJ,;t t
21655s,@EXEEXT@,$EXEEXT,;t t
21656s,@CC@,$CC,;t t
21657s,@CFLAGS@,$CFLAGS,;t t
21658s,@LDFLAGS@,$LDFLAGS,;t t
21659s,@CPPFLAGS@,$CPPFLAGS,;t t
21660s,@ac_ct_CC@,$ac_ct_CC,;t t
21661s,@OBJEXT@,$OBJEXT,;t t
21662s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021663s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021664s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
21665s,@LIBRARY@,$LIBRARY,;t t
21666s,@LDLIBRARY@,$LDLIBRARY,;t t
21667s,@DLLLIBRARY@,$DLLLIBRARY,;t t
21668s,@BLDLIBRARY@,$BLDLIBRARY,;t t
21669s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
21670s,@INSTSONAME@,$INSTSONAME,;t t
21671s,@RUNSHARED@,$RUNSHARED,;t t
21672s,@LINKCC@,$LINKCC,;t t
21673s,@RANLIB@,$RANLIB,;t t
21674s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21675s,@AR@,$AR,;t t
Martin v. Löwisdea59e52006-01-05 10:00:36 +000021676s,@SVNVERSION@,$SVNVERSION,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021677s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21678s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21679s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21680s,@LN@,$LN,;t t
21681s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000021682s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000021683s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021684s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
21685s,@SO@,$SO,;t t
21686s,@LDSHARED@,$LDSHARED,;t t
21687s,@BLDSHARED@,$BLDSHARED,;t t
21688s,@CCSHARED@,$CCSHARED,;t t
21689s,@LINKFORSHARED@,$LINKFORSHARED,;t t
21690s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000021691s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021692s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
21693s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
21694s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
21695s,@LDLAST@,$LDLAST,;t t
21696s,@THREADOBJ@,$THREADOBJ,;t t
21697s,@DLINCLDIR@,$DLINCLDIR,;t t
21698s,@DYNLOADFILE@,$DYNLOADFILE,;t t
21699s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000021700s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021701s,@LIBOBJS@,$LIBOBJS,;t t
21702s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
21703s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
21704s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
21705s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
21706s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
21707s,@LIBM@,$LIBM,;t t
21708s,@LIBC@,$LIBC,;t t
21709s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
21710s,@THREADHEADERS@,$THREADHEADERS,;t t
21711s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021712s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021713CEOF
21714
21715_ACEOF
21716
21717 cat >>$CONFIG_STATUS <<\_ACEOF
21718 # Split the substitutions into bite-sized pieces for seds with
21719 # small command number limits, like on Digital OSF/1 and HP-UX.
21720 ac_max_sed_lines=48
21721 ac_sed_frag=1 # Number of current file.
21722 ac_beg=1 # First line for current file.
21723 ac_end=$ac_max_sed_lines # Line after last line for current file.
21724 ac_more_lines=:
21725 ac_sed_cmds=
21726 while $ac_more_lines; do
21727 if test $ac_beg -gt 1; then
21728 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21729 else
21730 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21731 fi
21732 if test ! -s $tmp/subs.frag; then
21733 ac_more_lines=false
21734 else
21735 # The purpose of the label and of the branching condition is to
21736 # speed up the sed processing (if there are no `@' at all, there
21737 # is no need to browse any of the substitutions).
21738 # These are the two extra sed commands mentioned above.
21739 (echo ':t
21740 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21741 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021742 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021743 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021744 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021745 fi
21746 ac_sed_frag=`expr $ac_sed_frag + 1`
21747 ac_beg=$ac_end
21748 ac_end=`expr $ac_end + $ac_max_sed_lines`
21749 fi
21750 done
21751 if test -z "$ac_sed_cmds"; then
21752 ac_sed_cmds=cat
21753 fi
21754fi # test -n "$CONFIG_FILES"
21755
21756_ACEOF
21757cat >>$CONFIG_STATUS <<\_ACEOF
21758for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21759 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21760 case $ac_file in
21761 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021762 cat >$tmp/stdin
21763 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21764 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021765 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021766 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021767 * ) ac_file_in=$ac_file.in ;;
21768 esac
21769
21770 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21771 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21772$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021773 X"$ac_file" : 'X\(//\)[^/]' \| \
21774 X"$ac_file" : 'X\(//\)$' \| \
21775 X"$ac_file" : 'X\(/\)' \| \
21776 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021777echo X"$ac_file" |
21778 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21779 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21780 /^X\(\/\/\)$/{ s//\1/; q; }
21781 /^X\(\/\).*/{ s//\1/; q; }
21782 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021783 { if $as_mkdir_p; then
21784 mkdir -p "$ac_dir"
21785 else
21786 as_dir="$ac_dir"
21787 as_dirs=
21788 while test ! -d "$as_dir"; do
21789 as_dirs="$as_dir $as_dirs"
21790 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21791$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021792 X"$as_dir" : 'X\(//\)[^/]' \| \
21793 X"$as_dir" : 'X\(//\)$' \| \
21794 X"$as_dir" : 'X\(/\)' \| \
21795 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021796echo X"$as_dir" |
21797 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21798 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21799 /^X\(\/\/\)$/{ s//\1/; q; }
21800 /^X\(\/\).*/{ s//\1/; q; }
21801 s/.*/./; q'`
21802 done
21803 test ! -n "$as_dirs" || mkdir $as_dirs
21804 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21805echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21806 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021807
21808 ac_builddir=.
21809
21810if test "$ac_dir" != .; then
21811 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21812 # A "../" for each directory in $ac_dir_suffix.
21813 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21814else
21815 ac_dir_suffix= ac_top_builddir=
21816fi
21817
21818case $srcdir in
21819 .) # No --srcdir option. We are building in place.
21820 ac_srcdir=.
21821 if test -z "$ac_top_builddir"; then
21822 ac_top_srcdir=.
21823 else
21824 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21825 fi ;;
21826 [\\/]* | ?:[\\/]* ) # Absolute path.
21827 ac_srcdir=$srcdir$ac_dir_suffix;
21828 ac_top_srcdir=$srcdir ;;
21829 *) # Relative path.
21830 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21831 ac_top_srcdir=$ac_top_builddir$srcdir ;;
21832esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000021833
21834# Do not use `cd foo && pwd` to compute absolute paths, because
21835# the directories may not exist.
21836case `pwd` in
21837.) ac_abs_builddir="$ac_dir";;
21838*)
21839 case "$ac_dir" in
21840 .) ac_abs_builddir=`pwd`;;
21841 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21842 *) ac_abs_builddir=`pwd`/"$ac_dir";;
21843 esac;;
21844esac
21845case $ac_abs_builddir in
21846.) ac_abs_top_builddir=${ac_top_builddir}.;;
21847*)
21848 case ${ac_top_builddir}. in
21849 .) ac_abs_top_builddir=$ac_abs_builddir;;
21850 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21851 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21852 esac;;
21853esac
21854case $ac_abs_builddir in
21855.) ac_abs_srcdir=$ac_srcdir;;
21856*)
21857 case $ac_srcdir in
21858 .) ac_abs_srcdir=$ac_abs_builddir;;
21859 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21860 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21861 esac;;
21862esac
21863case $ac_abs_builddir in
21864.) ac_abs_top_srcdir=$ac_top_srcdir;;
21865*)
21866 case $ac_top_srcdir in
21867 .) ac_abs_top_srcdir=$ac_abs_builddir;;
21868 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21869 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21870 esac;;
21871esac
Martin v. Löwis11437992002-04-12 09:54:03 +000021872
21873
21874 case $INSTALL in
21875 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21876 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
21877 esac
21878
Brett Cannon43802422005-02-10 20:48:03 +000021879 if test x"$ac_file" != x-; then
21880 { echo "$as_me:$LINENO: creating $ac_file" >&5
21881echo "$as_me: creating $ac_file" >&6;}
21882 rm -f "$ac_file"
21883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021884 # Let's still pretend it is `configure' which instantiates (i.e., don't
21885 # use $as_me), people would be surprised to read:
21886 # /* config.h. Generated by config.status. */
21887 if test x"$ac_file" = x-; then
21888 configure_input=
21889 else
21890 configure_input="$ac_file. "
21891 fi
21892 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021893 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000021894
21895 # First look for the input files in the build tree, otherwise in the
21896 # src tree.
21897 ac_file_inputs=`IFS=:
21898 for f in $ac_file_in; do
21899 case $f in
21900 -) echo $tmp/stdin ;;
21901 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021902 # Absolute (can't be DOS-style, as IFS=:)
21903 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021904echo "$as_me: error: cannot find input file: $f" >&2;}
21905 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021906 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021907 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021908 if test -f "$f"; then
21909 # Build tree
21910 echo "$f"
21911 elif test -f "$srcdir/$f"; then
21912 # Source tree
21913 echo "$srcdir/$f"
21914 else
21915 # /dev/null tree
21916 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021917echo "$as_me: error: cannot find input file: $f" >&2;}
21918 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021919 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021920 esac
21921 done` || { (exit 1); exit 1; }
21922_ACEOF
21923cat >>$CONFIG_STATUS <<_ACEOF
21924 sed "$ac_vpsub
21925$extrasub
21926_ACEOF
21927cat >>$CONFIG_STATUS <<\_ACEOF
21928:t
21929/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21930s,@configure_input@,$configure_input,;t t
21931s,@srcdir@,$ac_srcdir,;t t
21932s,@abs_srcdir@,$ac_abs_srcdir,;t t
21933s,@top_srcdir@,$ac_top_srcdir,;t t
21934s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
21935s,@builddir@,$ac_builddir,;t t
21936s,@abs_builddir@,$ac_abs_builddir,;t t
21937s,@top_builddir@,$ac_top_builddir,;t t
21938s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
21939s,@INSTALL@,$ac_INSTALL,;t t
21940" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21941 rm -f $tmp/stdin
21942 if test x"$ac_file" != x-; then
21943 mv $tmp/out $ac_file
21944 else
21945 cat $tmp/out
21946 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021947 fi
21948
Martin v. Löwis11437992002-04-12 09:54:03 +000021949done
21950_ACEOF
21951cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021952
Martin v. Löwis11437992002-04-12 09:54:03 +000021953#
21954# CONFIG_HEADER section.
21955#
Guido van Rossum627b2d71993-12-24 10:39:16 +000021956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021957# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21958# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000021959#
21960# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021961ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21962ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000021963ac_dC=' '
21964ac_dD=',;t'
21965# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000021966ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000021967ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021968ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000021969ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021970
Martin v. Löwis11437992002-04-12 09:54:03 +000021971for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000021972 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000021973 case $ac_file in
21974 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021975 cat >$tmp/stdin
21976 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21977 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021978 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021979 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021980 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021981 esac
21982
Martin v. Löwis11437992002-04-12 09:54:03 +000021983 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
21984echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021985
Martin v. Löwis11437992002-04-12 09:54:03 +000021986 # First look for the input files in the build tree, otherwise in the
21987 # src tree.
21988 ac_file_inputs=`IFS=:
21989 for f in $ac_file_in; do
21990 case $f in
21991 -) echo $tmp/stdin ;;
21992 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021993 # Absolute (can't be DOS-style, as IFS=:)
21994 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021995echo "$as_me: error: cannot find input file: $f" >&2;}
21996 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021997 # Do quote $f, to prevent DOS paths from being IFS'd.
21998 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021999 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022000 if test -f "$f"; then
22001 # Build tree
22002 echo "$f"
22003 elif test -f "$srcdir/$f"; then
22004 # Source tree
22005 echo "$srcdir/$f"
22006 else
22007 # /dev/null tree
22008 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022009echo "$as_me: error: cannot find input file: $f" >&2;}
22010 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022011 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022012 esac
22013 done` || { (exit 1); exit 1; }
22014 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022015 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022016
Martin v. Löwis11437992002-04-12 09:54:03 +000022017_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022018
Martin v. Löwis11437992002-04-12 09:54:03 +000022019# Transform confdefs.h into two sed scripts, `conftest.defines' and
22020# `conftest.undefs', that substitutes the proper values into
22021# config.h.in to produce config.h. The first handles `#define'
22022# templates, and the second `#undef' templates.
22023# And first: Protect against being on the right side of a sed subst in
22024# config.status. Protect against being in an unquoted here document
22025# in config.status.
22026rm -f conftest.defines conftest.undefs
22027# Using a here document instead of a string reduces the quoting nightmare.
22028# Putting comments in sed scripts is not portable.
22029#
22030# `end' is used to avoid that the second main sed command (meant for
22031# 0-ary CPP macros) applies to n-ary macro definitions.
22032# See the Autoconf documentation for `clear'.
22033cat >confdef2sed.sed <<\_ACEOF
22034s/[\\&,]/\\&/g
22035s,[\\$`],\\&,g
22036t clear
22037: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000022038s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022039t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000022040s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022041: end
22042_ACEOF
22043# If some macros were called several times there might be several times
22044# the same #defines, which is useless. Nevertheless, we may not want to
22045# sort them, since we want the *last* AC-DEFINE to be honored.
22046uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22047sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22048rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022049
22050# This sed command replaces #undef with comments. This is necessary, for
22051# example, in the case of _POSIX_SOURCE, which is predefined and required
22052# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000022053cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000022054s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000022055_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022056
Martin v. Löwis11437992002-04-12 09:54:03 +000022057# Break up conftest.defines because some shells have a limit on the size
22058# of here documents, and old seds have small limits too (100 cmds).
22059echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000022060echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022061echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22062echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022063rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000022064while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000022065do
Martin v. Löwis11437992002-04-12 09:54:03 +000022066 # Write a limited-size here document to $tmp/defines.sed.
22067 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22068 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022069 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022070 # Work around the forget-to-reset-the-flag bug.
22071 echo 't clr' >>$CONFIG_STATUS
22072 echo ': clr' >>$CONFIG_STATUS
22073 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022074 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022075 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22076 rm -f $tmp/in
22077 mv $tmp/out $tmp/in
22078' >>$CONFIG_STATUS
22079 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22080 rm -f conftest.defines
22081 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000022082done
Martin v. Löwis11437992002-04-12 09:54:03 +000022083rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000022084echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022085echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022086
Martin v. Löwis11437992002-04-12 09:54:03 +000022087# Break up conftest.undefs because some shells have a limit on the size
22088# of here documents, and old seds have small limits too (100 cmds).
22089echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22090rm -f conftest.tail
22091while grep . conftest.undefs >/dev/null
22092do
22093 # Write a limited-size here document to $tmp/undefs.sed.
22094 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22095 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000022096 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022097 # Work around the forget-to-reset-the-flag bug.
22098 echo 't clr' >>$CONFIG_STATUS
22099 echo ': clr' >>$CONFIG_STATUS
22100 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22101 echo 'CEOF
22102 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22103 rm -f $tmp/in
22104 mv $tmp/out $tmp/in
22105' >>$CONFIG_STATUS
22106 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22107 rm -f conftest.undefs
22108 mv conftest.tail conftest.undefs
22109done
22110rm -f conftest.undefs
22111
22112cat >>$CONFIG_STATUS <<\_ACEOF
22113 # Let's still pretend it is `configure' which instantiates (i.e., don't
22114 # use $as_me), people would be surprised to read:
22115 # /* config.h. Generated by config.status. */
22116 if test x"$ac_file" = x-; then
22117 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000022118 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022119 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000022120 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022121 cat $tmp/in >>$tmp/config.h
22122 rm -f $tmp/in
22123 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022124 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022125 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22126echo "$as_me: $ac_file is unchanged" >&6;}
22127 else
22128 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22129$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022130 X"$ac_file" : 'X\(//\)[^/]' \| \
22131 X"$ac_file" : 'X\(//\)$' \| \
22132 X"$ac_file" : 'X\(/\)' \| \
22133 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022134echo X"$ac_file" |
22135 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22136 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22137 /^X\(\/\/\)$/{ s//\1/; q; }
22138 /^X\(\/\).*/{ s//\1/; q; }
22139 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022140 { if $as_mkdir_p; then
22141 mkdir -p "$ac_dir"
22142 else
22143 as_dir="$ac_dir"
22144 as_dirs=
22145 while test ! -d "$as_dir"; do
22146 as_dirs="$as_dir $as_dirs"
22147 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22148$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022149 X"$as_dir" : 'X\(//\)[^/]' \| \
22150 X"$as_dir" : 'X\(//\)$' \| \
22151 X"$as_dir" : 'X\(/\)' \| \
22152 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022153echo X"$as_dir" |
22154 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22155 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22156 /^X\(\/\/\)$/{ s//\1/; q; }
22157 /^X\(\/\).*/{ s//\1/; q; }
22158 s/.*/./; q'`
22159 done
22160 test ! -n "$as_dirs" || mkdir $as_dirs
22161 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22162echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22163 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022164
Martin v. Löwis11437992002-04-12 09:54:03 +000022165 rm -f $ac_file
22166 mv $tmp/config.h $ac_file
22167 fi
22168 else
22169 cat $tmp/config.h
22170 rm -f $tmp/config.h
22171 fi
22172done
22173_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022174
Martin v. Löwis11437992002-04-12 09:54:03 +000022175cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022176
Martin v. Löwis11437992002-04-12 09:54:03 +000022177{ (exit 0); exit 0; }
22178_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022179chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022180ac_clean_files=$ac_clean_files_save
22181
22182
22183# configure is writing to config.log, and then calls config.status.
22184# config.status does its own redirection, appending to config.log.
22185# Unfortunately, on DOS this fails, as config.log is still kept open
22186# by configure, so config.status won't be able to write to it; its
22187# output is simply discarded. So we exec the FD to /dev/null,
22188# effectively closing config.log, so it can be properly (re)opened and
22189# appended to by config.status. When coming back to configure, we
22190# need to make the FD available again.
22191if test "$no_create" != yes; then
22192 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000022193 ac_config_status_args=
22194 test "$silent" = yes &&
22195 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000022196 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000022197 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000022198 exec 5>>config.log
22199 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22200 # would make configure fail if this is the last instruction.
22201 $ac_cs_success || { (exit 1); exit 1; }
22202fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000022203
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000022204
22205echo "creating Setup"
22206if test ! -f Modules/Setup
22207then
22208 cp $srcdir/Modules/Setup.dist Modules/Setup
22209fi
22210
22211echo "creating Setup.local"
22212if test ! -f Modules/Setup.local
22213then
22214 echo "# Edit this file for local setup changes" >Modules/Setup.local
22215fi
22216
22217echo "creating Makefile"
22218$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
22219 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000022220 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000022221mv config.c Modules