blob: 8a05757b1208fc9ab3035167e109c94d27925ae1 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00002# From configure.in Revision: 41953 .
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
Neal Norwitz020c46a2006-01-07 21:39:28 +00003914# disable check for icc since it seems to pass, but generates a warning
3915if test "$CC" = icc
3916then
3917 ac_cv_opt_olimit_ok=no
3918fi
3919
Martin v. Löwis11437992002-04-12 09:54:03 +00003920echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3921echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3922if test "${ac_cv_opt_olimit_ok+set}" = set; then
3923 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003924else
3925 ac_save_cc="$CC"
3926CC="$CC -OPT:Olimit=0"
3927if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003928 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003929else
Martin v. Löwis11437992002-04-12 09:54:03 +00003930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003931/* confdefs.h. */
3932_ACEOF
3933cat confdefs.h >>conftest.$ac_ext
3934cat >>conftest.$ac_ext <<_ACEOF
3935/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003936int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003937_ACEOF
3938rm -f conftest$ac_exeext
3939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3940 (eval $ac_link) 2>&5
3941 ac_status=$?
3942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3945 (eval $ac_try) 2>&5
3946 ac_status=$?
3947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3948 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003949 ac_cv_opt_olimit_ok=yes
3950else
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 echo "$as_me: program exited with status $ac_status" >&5
3952echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003953sed 's/^/| /' conftest.$ac_ext >&5
3954
Martin v. Löwis11437992002-04-12 09:54:03 +00003955( exit $ac_status )
3956ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003957fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003958rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003959fi
Guido van Rossum91922671997-10-09 20:24:13 +00003960CC="$ac_save_cc"
3961fi
3962
Martin v. Löwis11437992002-04-12 09:54:03 +00003963echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3964echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003965if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003966 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003967 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3968 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3969 # environment?
3970 Darwin*)
3971 ;;
3972 *)
3973 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3974 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003975 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003976else
Martin v. Löwis11437992002-04-12 09:54:03 +00003977 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3978echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3979 if test "${ac_cv_olimit_ok+set}" = set; then
3980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003981else
3982 ac_save_cc="$CC"
3983 CC="$CC -Olimit 1500"
3984 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003985 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003986else
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003988/* confdefs.h. */
3989_ACEOF
3990cat confdefs.h >>conftest.$ac_ext
3991cat >>conftest.$ac_ext <<_ACEOF
3992/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003993int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003994_ACEOF
3995rm -f conftest$ac_exeext
3996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3997 (eval $ac_link) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4002 (eval $ac_try) 2>&5
4003 ac_status=$?
4004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4005 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004006 ac_cv_olimit_ok=yes
4007else
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 echo "$as_me: program exited with status $ac_status" >&5
4009echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004010sed 's/^/| /' conftest.$ac_ext >&5
4011
Martin v. Löwis11437992002-04-12 09:54:03 +00004012( exit $ac_status )
4013ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004014fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004015rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004016fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004017 CC="$ac_save_cc"
4018fi
4019
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4021echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004022 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004023 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004024 fi
4025fi
4026
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004027# On some compilers, pthreads are available without further options
4028# (e.g. MacOS X). On some of these systems, the compiler will not
4029# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4030# So we have to see first whether pthreads are available without
4031# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004032echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4033echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4034if test "${ac_cv_pthread_is_default+set}" = set; then
4035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004036else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004037 if test "$cross_compiling" = yes; then
4038 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004039else
Martin v. Löwis11437992002-04-12 09:54:03 +00004040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004041/* confdefs.h. */
4042_ACEOF
4043cat confdefs.h >>conftest.$ac_ext
4044cat >>conftest.$ac_ext <<_ACEOF
4045/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004046
Martin v. Löwis130fb172001-07-19 11:00:41 +00004047#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004048
4049void* routine(void* p){return NULL;}
4050
4051int main(){
4052 pthread_t p;
4053 if(pthread_create(&p,NULL,routine,NULL)!=0)
4054 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004055 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004056 return 0;
4057}
4058
Martin v. Löwis11437992002-04-12 09:54:03 +00004059_ACEOF
4060rm -f conftest$ac_exeext
4061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4062 (eval $ac_link) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4067 (eval $ac_try) 2>&5
4068 ac_status=$?
4069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4070 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004071
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004072 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004073 ac_cv_kthread=no
4074 ac_cv_pthread=no
4075
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004076else
Martin v. Löwis11437992002-04-12 09:54:03 +00004077 echo "$as_me: program exited with status $ac_status" >&5
4078echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004079sed 's/^/| /' conftest.$ac_ext >&5
4080
Martin v. Löwis11437992002-04-12 09:54:03 +00004081( exit $ac_status )
4082ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004084rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004085fi
4086
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004087fi
4088
Martin v. Löwis11437992002-04-12 09:54:03 +00004089echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4090echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004091
Michael W. Hudson54241132001-12-07 15:38:26 +00004092
Martin v. Löwis11437992002-04-12 09:54:03 +00004093if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004094then
4095 ac_cv_kpthread=no
4096else
4097# -Kpthread, if available, provides the right #defines
4098# and linker options to make pthread_create available
4099# Some compilers won't report that they do not support -Kpthread,
4100# so we need to run a program to see whether it really made the
4101# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004102echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4103echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4104if test "${ac_cv_kpthread+set}" = set; then
4105 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004106else
4107 ac_save_cc="$CC"
4108CC="$CC -Kpthread"
4109if test "$cross_compiling" = yes; then
4110 ac_cv_kpthread=no
4111else
Martin v. Löwis11437992002-04-12 09:54:03 +00004112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004113/* confdefs.h. */
4114_ACEOF
4115cat confdefs.h >>conftest.$ac_ext
4116cat >>conftest.$ac_ext <<_ACEOF
4117/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004118
4119#include <pthread.h>
4120
4121void* routine(void* p){return NULL;}
4122
4123int main(){
4124 pthread_t p;
4125 if(pthread_create(&p,NULL,routine,NULL)!=0)
4126 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004127 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004128 return 0;
4129}
4130
Martin v. Löwis11437992002-04-12 09:54:03 +00004131_ACEOF
4132rm -f conftest$ac_exeext
4133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4134 (eval $ac_link) 2>&5
4135 ac_status=$?
4136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4137 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4139 (eval $ac_try) 2>&5
4140 ac_status=$?
4141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004143 ac_cv_kpthread=yes
4144else
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 echo "$as_me: program exited with status $ac_status" >&5
4146echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004147sed 's/^/| /' conftest.$ac_ext >&5
4148
Martin v. Löwis11437992002-04-12 09:54:03 +00004149( exit $ac_status )
4150ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004151fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004152rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004153fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004154CC="$ac_save_cc"
4155fi
4156
Martin v. Löwis11437992002-04-12 09:54:03 +00004157echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4158echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004159fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004160
Skip Montanarod8d39a02003-07-10 20:44:10 +00004161if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004162then
4163# -Kthread, if available, provides the right #defines
4164# and linker options to make pthread_create available
4165# Some compilers won't report that they do not support -Kthread,
4166# so we need to run a program to see whether it really made the
4167# function available.
4168echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4169echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4170if test "${ac_cv_kthread+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
4172else
4173 ac_save_cc="$CC"
4174CC="$CC -Kthread"
4175if test "$cross_compiling" = yes; then
4176 ac_cv_kthread=no
4177else
4178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* confdefs.h. */
4180_ACEOF
4181cat confdefs.h >>conftest.$ac_ext
4182cat >>conftest.$ac_ext <<_ACEOF
4183/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004184
4185#include <pthread.h>
4186
4187void* routine(void* p){return NULL;}
4188
4189int main(){
4190 pthread_t p;
4191 if(pthread_create(&p,NULL,routine,NULL)!=0)
4192 return 1;
4193 (void)pthread_detach(p);
4194 return 0;
4195}
4196
4197_ACEOF
4198rm -f conftest$ac_exeext
4199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4200 (eval $ac_link) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4205 (eval $ac_try) 2>&5
4206 ac_status=$?
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); }; }; then
4209 ac_cv_kthread=yes
4210else
4211 echo "$as_me: program exited with status $ac_status" >&5
4212echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004213sed 's/^/| /' conftest.$ac_ext >&5
4214
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004215( exit $ac_status )
4216ac_cv_kthread=no
4217fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004218rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004219fi
4220CC="$ac_save_cc"
4221fi
4222
4223echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4224echo "${ECHO_T}$ac_cv_kthread" >&6
4225fi
4226
Skip Montanarod8d39a02003-07-10 20:44:10 +00004227if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004228then
4229# -pthread, if available, provides the right #defines
4230# and linker options to make pthread_create available
4231# Some compilers won't report that they do not support -pthread,
4232# so we need to run a program to see whether it really made the
4233# function available.
4234echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4235echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4236if test "${ac_cv_thread+set}" = set; then
4237 echo $ECHO_N "(cached) $ECHO_C" >&6
4238else
4239 ac_save_cc="$CC"
4240CC="$CC -pthread"
4241if test "$cross_compiling" = yes; then
4242 ac_cv_pthread=no
4243else
4244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004245/* confdefs.h. */
4246_ACEOF
4247cat confdefs.h >>conftest.$ac_ext
4248cat >>conftest.$ac_ext <<_ACEOF
4249/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004250
4251#include <pthread.h>
4252
4253void* routine(void* p){return NULL;}
4254
4255int main(){
4256 pthread_t p;
4257 if(pthread_create(&p,NULL,routine,NULL)!=0)
4258 return 1;
4259 (void)pthread_detach(p);
4260 return 0;
4261}
4262
4263_ACEOF
4264rm -f conftest$ac_exeext
4265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4266 (eval $ac_link) 2>&5
4267 ac_status=$?
4268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4269 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4271 (eval $ac_try) 2>&5
4272 ac_status=$?
4273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4274 (exit $ac_status); }; }; then
4275 ac_cv_pthread=yes
4276else
4277 echo "$as_me: program exited with status $ac_status" >&5
4278echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004279sed 's/^/| /' conftest.$ac_ext >&5
4280
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004281( exit $ac_status )
4282ac_cv_pthread=no
4283fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004285fi
4286CC="$ac_save_cc"
4287fi
4288
4289echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4290echo "${ECHO_T}$ac_cv_pthread" >&6
4291fi
4292
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004293# If we have set a CC compiler flag for thread support then
4294# check if it works for CXX, too.
4295ac_cv_cxx_thread=no
4296if test ! -z "$CXX"
4297then
4298echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4299echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4300ac_save_cxx="$CXX"
4301
4302if test "$ac_cv_kpthread" = "yes"
4303then
4304 CXX="$CXX -Kpthread"
4305 ac_cv_cxx_thread=yes
4306elif test "$ac_cv_kthread" = "yes"
4307then
4308 CXX="$CXX -Kthread"
4309 ac_cv_cxx_thread=yes
4310elif test "$ac_cv_pthread" = "yes"
4311then
4312 CXX="$CXX -pthread"
4313 ac_cv_cxx_thread=yes
4314fi
4315
4316if test $ac_cv_cxx_thread = yes
4317then
4318 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4319 $CXX -c conftest.$ac_ext 2>&5
4320 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4321 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4322 then
4323 ac_cv_cxx_thread=yes
4324 else
4325 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004326 fi
4327 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004328fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004329echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4330echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004331fi
4332CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004333
Michael W. Hudson54241132001-12-07 15:38:26 +00004334
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004335# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004336echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4337echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4338if test "${ac_cv_header_stdc+set}" = set; then
4339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004340else
Martin v. Löwis11437992002-04-12 09:54:03 +00004341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004342/* confdefs.h. */
4343_ACEOF
4344cat confdefs.h >>conftest.$ac_ext
4345cat >>conftest.$ac_ext <<_ACEOF
4346/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004347#include <stdlib.h>
4348#include <stdarg.h>
4349#include <string.h>
4350#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004351
Skip Montanaro6dead952003-09-25 14:50:04 +00004352int
4353main ()
4354{
4355
4356 ;
4357 return 0;
4358}
Martin v. Löwis11437992002-04-12 09:54:03 +00004359_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004360rm -f conftest.$ac_objext
4361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004362 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004364 grep -v '^ *+' conftest.er1 >conftest.err
4365 rm -f conftest.er1
4366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004368 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004369 { ac_try='test -z "$ac_c_werror_flag"
4370 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4372 (eval $ac_try) 2>&5
4373 ac_status=$?
4374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4375 (exit $ac_status); }; } &&
4376 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4378 (eval $ac_try) 2>&5
4379 ac_status=$?
4380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4381 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382 ac_cv_header_stdc=yes
4383else
Martin v. Löwis11437992002-04-12 09:54:03 +00004384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004385sed 's/^/| /' conftest.$ac_ext >&5
4386
4387ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390
4391if test $ac_cv_header_stdc = yes; then
4392 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004394/* confdefs.h. */
4395_ACEOF
4396cat confdefs.h >>conftest.$ac_ext
4397cat >>conftest.$ac_ext <<_ACEOF
4398/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004399#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004400
4401_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004403 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404 :
4405else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406 ac_cv_header_stdc=no
4407fi
4408rm -f conftest*
4409
4410fi
4411
4412if test $ac_cv_header_stdc = yes; then
4413 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004415/* confdefs.h. */
4416_ACEOF
4417cat confdefs.h >>conftest.$ac_ext
4418cat >>conftest.$ac_ext <<_ACEOF
4419/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004421
4422_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004423if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004424 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004425 :
4426else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427 ac_cv_header_stdc=no
4428fi
4429rm -f conftest*
4430
4431fi
4432
4433if test $ac_cv_header_stdc = yes; then
4434 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004435 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004436 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437else
Martin v. Löwis11437992002-04-12 09:54:03 +00004438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004439/* confdefs.h. */
4440_ACEOF
4441cat confdefs.h >>conftest.$ac_ext
4442cat >>conftest.$ac_ext <<_ACEOF
4443/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004444#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004445#if ((' ' & 0x0FF) == 0x020)
4446# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4447# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4448#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004449# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004450 (('a' <= (c) && (c) <= 'i') \
4451 || ('j' <= (c) && (c) <= 'r') \
4452 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004453# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4454#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004455
Martin v. Löwis11437992002-04-12 09:54:03 +00004456#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4457int
4458main ()
4459{
4460 int i;
4461 for (i = 0; i < 256; i++)
4462 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004463 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004464 exit(2);
4465 exit (0);
4466}
4467_ACEOF
4468rm -f conftest$ac_exeext
4469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4470 (eval $ac_link) 2>&5
4471 ac_status=$?
4472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475 (eval $ac_try) 2>&5
4476 ac_status=$?
4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004479 :
4480else
Martin v. Löwis11437992002-04-12 09:54:03 +00004481 echo "$as_me: program exited with status $ac_status" >&5
4482echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004483sed 's/^/| /' conftest.$ac_ext >&5
4484
Martin v. Löwis11437992002-04-12 09:54:03 +00004485( exit $ac_status )
4486ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004487fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004488rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004489fi
4490fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004491fi
4492echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4493echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004494if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004495
4496cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004497#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004498_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499
4500fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501
Skip Montanarob9820a32004-01-17 00:16:12 +00004502# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004513 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004514do
4515as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4516echo "$as_me:$LINENO: checking for $ac_header" >&5
4517echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4518if eval "test \"\${$as_ac_Header+set}\" = set"; then
4519 echo $ECHO_N "(cached) $ECHO_C" >&6
4520else
4521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004522/* confdefs.h. */
4523_ACEOF
4524cat confdefs.h >>conftest.$ac_ext
4525cat >>conftest.$ac_ext <<_ACEOF
4526/* end confdefs.h. */
4527$ac_includes_default
4528
4529#include <$ac_header>
4530_ACEOF
4531rm -f conftest.$ac_objext
4532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004533 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004535 grep -v '^ *+' conftest.er1 >conftest.err
4536 rm -f conftest.er1
4537 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4539 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004540 { ac_try='test -z "$ac_c_werror_flag"
4541 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); }; } &&
4547 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4549 (eval $ac_try) 2>&5
4550 ac_status=$?
4551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552 (exit $ac_status); }; }; then
4553 eval "$as_ac_Header=yes"
4554else
4555 echo "$as_me: failed program was:" >&5
4556sed 's/^/| /' conftest.$ac_ext >&5
4557
4558eval "$as_ac_Header=no"
4559fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004560rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004561fi
4562echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4563echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4564if test `eval echo '${'$as_ac_Header'}'` = yes; then
4565 cat >>confdefs.h <<_ACEOF
4566#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4567_ACEOF
4568
4569fi
4570
4571done
4572
4573
Martin v. Löwis11437992002-04-12 09:54:03 +00004574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
Anthony Baxter8a560de2004-10-13 15:30:56 +00004610
Martin v. Löwisc3001752005-01-23 09:27:24 +00004611
4612for ac_header in curses.h dlfcn.h fcntl.h grp.h shadow.h langinfo.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004613libintl.h ncurses.h poll.h pthread.h \
4614stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004615unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004616sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4617sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004618sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisae2830c2004-09-18 09:54:52 +00004619sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004620sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4621bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004622do
Martin v. Löwis11437992002-04-12 09:54:03 +00004623as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4624if eval "test \"\${$as_ac_Header+set}\" = set"; then
4625 echo "$as_me:$LINENO: checking for $ac_header" >&5
4626echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4627if eval "test \"\${$as_ac_Header+set}\" = set"; then
4628 echo $ECHO_N "(cached) $ECHO_C" >&6
4629fi
4630echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4631echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004632else
Martin v. Löwis11437992002-04-12 09:54:03 +00004633 # Is the header compilable?
4634echo "$as_me:$LINENO: checking $ac_header usability" >&5
4635echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004637/* confdefs.h. */
4638_ACEOF
4639cat confdefs.h >>conftest.$ac_ext
4640cat >>conftest.$ac_ext <<_ACEOF
4641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004642$ac_includes_default
4643#include <$ac_header>
4644_ACEOF
4645rm -f conftest.$ac_objext
4646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004647 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004649 grep -v '^ *+' conftest.er1 >conftest.err
4650 rm -f conftest.er1
4651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004654 { ac_try='test -z "$ac_c_werror_flag"
4655 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4657 (eval $ac_try) 2>&5
4658 ac_status=$?
4659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4660 (exit $ac_status); }; } &&
4661 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4663 (eval $ac_try) 2>&5
4664 ac_status=$?
4665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4666 (exit $ac_status); }; }; then
4667 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004668else
Martin v. Löwis11437992002-04-12 09:54:03 +00004669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004670sed 's/^/| /' conftest.$ac_ext >&5
4671
Martin v. Löwis11437992002-04-12 09:54:03 +00004672ac_header_compiler=no
4673fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004675echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4676echo "${ECHO_T}$ac_header_compiler" >&6
4677
4678# Is the header present?
4679echo "$as_me:$LINENO: checking $ac_header presence" >&5
4680echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004682/* confdefs.h. */
4683_ACEOF
4684cat confdefs.h >>conftest.$ac_ext
4685cat >>conftest.$ac_ext <<_ACEOF
4686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004687#include <$ac_header>
4688_ACEOF
4689if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4690 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4691 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004692 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004693 rm -f conftest.er1
4694 cat conftest.err >&5
4695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4696 (exit $ac_status); } >/dev/null; then
4697 if test -s conftest.err; then
4698 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004699 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004700 else
4701 ac_cpp_err=
4702 fi
4703else
4704 ac_cpp_err=yes
4705fi
4706if test -z "$ac_cpp_err"; then
4707 ac_header_preproc=yes
4708else
4709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004710sed 's/^/| /' conftest.$ac_ext >&5
4711
Martin v. Löwis11437992002-04-12 09:54:03 +00004712 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004714rm -f conftest.err conftest.$ac_ext
4715echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4716echo "${ECHO_T}$ac_header_preproc" >&6
4717
4718# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004719case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4720 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004721 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4722echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004723 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4724echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4725 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004726 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004727 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004728 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4729echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004730 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4731echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4732 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4733echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4734 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4735echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004736 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4737echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004738 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4739echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004740 (
4741 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004742## ------------------------------------------------ ##
4743## Report this to http://www.python.org/python-bugs ##
4744## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004745_ASBOX
4746 ) |
4747 sed "s/^/$as_me: WARNING: /" >&2
4748 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004749esac
4750echo "$as_me:$LINENO: checking for $ac_header" >&5
4751echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4752if eval "test \"\${$as_ac_Header+set}\" = set"; then
4753 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004754else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004755 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004756fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004757echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4758echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4759
4760fi
4761if test `eval echo '${'$as_ac_Header'}'` = yes; then
4762 cat >>confdefs.h <<_ACEOF
4763#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4764_ACEOF
4765
4766fi
4767
Guido van Rossum627b2d71993-12-24 10:39:16 +00004768done
4769
Martin v. Löwis11437992002-04-12 09:54:03 +00004770
4771
4772
4773
4774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004775ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004776for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4777 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4778echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4779echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4780if eval "test \"\${$as_ac_Header+set}\" = set"; then
4781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004782else
Martin v. Löwis11437992002-04-12 09:54:03 +00004783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004784/* confdefs.h. */
4785_ACEOF
4786cat confdefs.h >>conftest.$ac_ext
4787cat >>conftest.$ac_ext <<_ACEOF
4788/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004789#include <sys/types.h>
4790#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004791
Martin v. Löwis11437992002-04-12 09:54:03 +00004792int
4793main ()
4794{
4795if ((DIR *) 0)
4796return 0;
4797 ;
4798 return 0;
4799}
4800_ACEOF
4801rm -f conftest.$ac_objext
4802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004803 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004805 grep -v '^ *+' conftest.er1 >conftest.err
4806 rm -f conftest.er1
4807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004810 { ac_try='test -z "$ac_c_werror_flag"
4811 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4813 (eval $ac_try) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); }; } &&
4817 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4819 (eval $ac_try) 2>&5
4820 ac_status=$?
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); }; }; then
4823 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004824else
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004826sed 's/^/| /' conftest.$ac_ext >&5
4827
Martin v. Löwis11437992002-04-12 09:54:03 +00004828eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004830rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004831fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4833echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4834if test `eval echo '${'$as_ac_Header'}'` = yes; then
4835 cat >>confdefs.h <<_ACEOF
4836#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4837_ACEOF
4838
4839ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004840fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004841
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004842done
4843# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4844if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4846echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4847if test "${ac_cv_search_opendir+set}" = set; then
4848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004849else
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 ac_func_search_save_LIBS=$LIBS
4851ac_cv_search_opendir=no
4852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004853/* confdefs.h. */
4854_ACEOF
4855cat confdefs.h >>conftest.$ac_ext
4856cat >>conftest.$ac_ext <<_ACEOF
4857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004858
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004859/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004860#ifdef __cplusplus
4861extern "C"
4862#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004863/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004864 builtin and then its argument prototype would still apply. */
4865char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004866int
4867main ()
4868{
4869opendir ();
4870 ;
4871 return 0;
4872}
4873_ACEOF
4874rm -f conftest.$ac_objext conftest$ac_exeext
4875if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004876 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004878 grep -v '^ *+' conftest.er1 >conftest.err
4879 rm -f conftest.er1
4880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4882 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004883 { ac_try='test -z "$ac_c_werror_flag"
4884 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4886 (eval $ac_try) 2>&5
4887 ac_status=$?
4888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4889 (exit $ac_status); }; } &&
4890 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4892 (eval $ac_try) 2>&5
4893 ac_status=$?
4894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4895 (exit $ac_status); }; }; then
4896 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004897else
Martin v. Löwis11437992002-04-12 09:54:03 +00004898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004899sed 's/^/| /' conftest.$ac_ext >&5
4900
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004902rm -f conftest.err conftest.$ac_objext \
4903 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004904if test "$ac_cv_search_opendir" = no; then
4905 for ac_lib in dir; do
4906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004908/* confdefs.h. */
4909_ACEOF
4910cat confdefs.h >>conftest.$ac_ext
4911cat >>conftest.$ac_ext <<_ACEOF
4912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004914/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004915#ifdef __cplusplus
4916extern "C"
4917#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004918/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004919 builtin and then its argument prototype would still apply. */
4920char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004921int
4922main ()
4923{
4924opendir ();
4925 ;
4926 return 0;
4927}
4928_ACEOF
4929rm -f conftest.$ac_objext conftest$ac_exeext
4930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004931 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004933 grep -v '^ *+' conftest.er1 >conftest.err
4934 rm -f conftest.er1
4935 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4937 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004938 { ac_try='test -z "$ac_c_werror_flag"
4939 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4941 (eval $ac_try) 2>&5
4942 ac_status=$?
4943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4944 (exit $ac_status); }; } &&
4945 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4947 (eval $ac_try) 2>&5
4948 ac_status=$?
4949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4950 (exit $ac_status); }; }; then
4951 ac_cv_search_opendir="-l$ac_lib"
4952break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004953else
Martin v. Löwis11437992002-04-12 09:54:03 +00004954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004955sed 's/^/| /' conftest.$ac_ext >&5
4956
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004957fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004958rm -f conftest.err conftest.$ac_objext \
4959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004960 done
4961fi
4962LIBS=$ac_func_search_save_LIBS
4963fi
4964echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4965echo "${ECHO_T}$ac_cv_search_opendir" >&6
4966if test "$ac_cv_search_opendir" != no; then
4967 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004968
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004969fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004970
Michael W. Hudson54241132001-12-07 15:38:26 +00004971else
Martin v. Löwis11437992002-04-12 09:54:03 +00004972 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4973echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4974if test "${ac_cv_search_opendir+set}" = set; then
4975 echo $ECHO_N "(cached) $ECHO_C" >&6
4976else
4977 ac_func_search_save_LIBS=$LIBS
4978ac_cv_search_opendir=no
4979cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004980/* confdefs.h. */
4981_ACEOF
4982cat confdefs.h >>conftest.$ac_ext
4983cat >>conftest.$ac_ext <<_ACEOF
4984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004985
4986/* Override any gcc2 internal prototype to avoid an error. */
4987#ifdef __cplusplus
4988extern "C"
4989#endif
4990/* We use char because int might match the return type of a gcc2
4991 builtin and then its argument prototype would still apply. */
4992char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004993int
4994main ()
4995{
4996opendir ();
4997 ;
4998 return 0;
4999}
5000_ACEOF
5001rm -f conftest.$ac_objext conftest$ac_exeext
5002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005003 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005005 grep -v '^ *+' conftest.er1 >conftest.err
5006 rm -f conftest.er1
5007 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5009 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005010 { ac_try='test -z "$ac_c_werror_flag"
5011 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5013 (eval $ac_try) 2>&5
5014 ac_status=$?
5015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5016 (exit $ac_status); }; } &&
5017 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5019 (eval $ac_try) 2>&5
5020 ac_status=$?
5021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5022 (exit $ac_status); }; }; then
5023 ac_cv_search_opendir="none required"
5024else
5025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005026sed 's/^/| /' conftest.$ac_ext >&5
5027
Martin v. Löwis11437992002-04-12 09:54:03 +00005028fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005029rm -f conftest.err conftest.$ac_objext \
5030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005031if test "$ac_cv_search_opendir" = no; then
5032 for ac_lib in x; do
5033 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005035/* confdefs.h. */
5036_ACEOF
5037cat confdefs.h >>conftest.$ac_ext
5038cat >>conftest.$ac_ext <<_ACEOF
5039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005040
5041/* Override any gcc2 internal prototype to avoid an error. */
5042#ifdef __cplusplus
5043extern "C"
5044#endif
5045/* We use char because int might match the return type of a gcc2
5046 builtin and then its argument prototype would still apply. */
5047char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005048int
5049main ()
5050{
5051opendir ();
5052 ;
5053 return 0;
5054}
5055_ACEOF
5056rm -f conftest.$ac_objext conftest$ac_exeext
5057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005058 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005060 grep -v '^ *+' conftest.er1 >conftest.err
5061 rm -f conftest.er1
5062 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005065 { ac_try='test -z "$ac_c_werror_flag"
5066 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5068 (eval $ac_try) 2>&5
5069 ac_status=$?
5070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5071 (exit $ac_status); }; } &&
5072 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5074 (eval $ac_try) 2>&5
5075 ac_status=$?
5076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077 (exit $ac_status); }; }; then
5078 ac_cv_search_opendir="-l$ac_lib"
5079break
5080else
5081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005082sed 's/^/| /' conftest.$ac_ext >&5
5083
Martin v. Löwis11437992002-04-12 09:54:03 +00005084fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005085rm -f conftest.err conftest.$ac_objext \
5086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005087 done
5088fi
5089LIBS=$ac_func_search_save_LIBS
5090fi
5091echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5092echo "${ECHO_T}$ac_cv_search_opendir" >&6
5093if test "$ac_cv_search_opendir" != no; then
5094 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096fi
5097
5098fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005099
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005100echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5101echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5102if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5103 echo $ECHO_N "(cached) $ECHO_C" >&6
5104else
5105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005106/* confdefs.h. */
5107_ACEOF
5108cat confdefs.h >>conftest.$ac_ext
5109cat >>conftest.$ac_ext <<_ACEOF
5110/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005111#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005112int
5113main ()
5114{
5115return makedev(0, 0);
5116 ;
5117 return 0;
5118}
5119_ACEOF
5120rm -f conftest.$ac_objext conftest$ac_exeext
5121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005122 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005124 grep -v '^ *+' conftest.er1 >conftest.err
5125 rm -f conftest.er1
5126 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5128 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005129 { ac_try='test -z "$ac_c_werror_flag"
5130 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5132 (eval $ac_try) 2>&5
5133 ac_status=$?
5134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5135 (exit $ac_status); }; } &&
5136 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5138 (eval $ac_try) 2>&5
5139 ac_status=$?
5140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141 (exit $ac_status); }; }; then
5142 ac_cv_header_sys_types_h_makedev=yes
5143else
5144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005145sed 's/^/| /' conftest.$ac_ext >&5
5146
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005147ac_cv_header_sys_types_h_makedev=no
5148fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005149rm -f conftest.err conftest.$ac_objext \
5150 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005151
5152fi
5153echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5154echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5155
5156if test $ac_cv_header_sys_types_h_makedev = no; then
5157if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5158 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5159echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5160if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5161 echo $ECHO_N "(cached) $ECHO_C" >&6
5162fi
5163echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5164echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5165else
5166 # Is the header compilable?
5167echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5168echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5169cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005170/* confdefs.h. */
5171_ACEOF
5172cat confdefs.h >>conftest.$ac_ext
5173cat >>conftest.$ac_ext <<_ACEOF
5174/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005175$ac_includes_default
5176#include <sys/mkdev.h>
5177_ACEOF
5178rm -f conftest.$ac_objext
5179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005180 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005182 grep -v '^ *+' conftest.er1 >conftest.err
5183 rm -f conftest.er1
5184 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005187 { ac_try='test -z "$ac_c_werror_flag"
5188 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5190 (eval $ac_try) 2>&5
5191 ac_status=$?
5192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5193 (exit $ac_status); }; } &&
5194 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5196 (eval $ac_try) 2>&5
5197 ac_status=$?
5198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5199 (exit $ac_status); }; }; then
5200 ac_header_compiler=yes
5201else
5202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005203sed 's/^/| /' conftest.$ac_ext >&5
5204
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005205ac_header_compiler=no
5206fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005207rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005208echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5209echo "${ECHO_T}$ac_header_compiler" >&6
5210
5211# Is the header present?
5212echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5213echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005215/* confdefs.h. */
5216_ACEOF
5217cat confdefs.h >>conftest.$ac_ext
5218cat >>conftest.$ac_ext <<_ACEOF
5219/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005220#include <sys/mkdev.h>
5221_ACEOF
5222if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5223 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5224 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005225 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005226 rm -f conftest.er1
5227 cat conftest.err >&5
5228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5229 (exit $ac_status); } >/dev/null; then
5230 if test -s conftest.err; then
5231 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005232 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005233 else
5234 ac_cpp_err=
5235 fi
5236else
5237 ac_cpp_err=yes
5238fi
5239if test -z "$ac_cpp_err"; then
5240 ac_header_preproc=yes
5241else
5242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005243sed 's/^/| /' conftest.$ac_ext >&5
5244
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005245 ac_header_preproc=no
5246fi
5247rm -f conftest.err conftest.$ac_ext
5248echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5249echo "${ECHO_T}$ac_header_preproc" >&6
5250
5251# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005252case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5253 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005254 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5255echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005256 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5257echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5258 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005259 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005260 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005261 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5262echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005263 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5264echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5265 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5266echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5267 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5268echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005269 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5270echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005271 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5272echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005273 (
5274 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005275## ------------------------------------------------ ##
5276## Report this to http://www.python.org/python-bugs ##
5277## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005278_ASBOX
5279 ) |
5280 sed "s/^/$as_me: WARNING: /" >&2
5281 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005282esac
5283echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5284echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5285if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5286 echo $ECHO_N "(cached) $ECHO_C" >&6
5287else
5288 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5289fi
5290echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5291echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5292
5293fi
5294if test $ac_cv_header_sys_mkdev_h = yes; then
5295
5296cat >>confdefs.h <<\_ACEOF
5297#define MAJOR_IN_MKDEV 1
5298_ACEOF
5299
5300fi
5301
5302
5303
5304 if test $ac_cv_header_sys_mkdev_h = no; then
5305 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5306 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5307echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5308if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5309 echo $ECHO_N "(cached) $ECHO_C" >&6
5310fi
5311echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5312echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5313else
5314 # Is the header compilable?
5315echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5316echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005318/* confdefs.h. */
5319_ACEOF
5320cat confdefs.h >>conftest.$ac_ext
5321cat >>conftest.$ac_ext <<_ACEOF
5322/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005323$ac_includes_default
5324#include <sys/sysmacros.h>
5325_ACEOF
5326rm -f conftest.$ac_objext
5327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005328 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005330 grep -v '^ *+' conftest.er1 >conftest.err
5331 rm -f conftest.er1
5332 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5334 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005335 { ac_try='test -z "$ac_c_werror_flag"
5336 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5338 (eval $ac_try) 2>&5
5339 ac_status=$?
5340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5341 (exit $ac_status); }; } &&
5342 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5344 (eval $ac_try) 2>&5
5345 ac_status=$?
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); }; }; then
5348 ac_header_compiler=yes
5349else
5350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005351sed 's/^/| /' conftest.$ac_ext >&5
5352
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005353ac_header_compiler=no
5354fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005356echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5357echo "${ECHO_T}$ac_header_compiler" >&6
5358
5359# Is the header present?
5360echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5361echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5362cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005363/* confdefs.h. */
5364_ACEOF
5365cat confdefs.h >>conftest.$ac_ext
5366cat >>conftest.$ac_ext <<_ACEOF
5367/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005368#include <sys/sysmacros.h>
5369_ACEOF
5370if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5371 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5372 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005373 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005374 rm -f conftest.er1
5375 cat conftest.err >&5
5376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5377 (exit $ac_status); } >/dev/null; then
5378 if test -s conftest.err; then
5379 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005380 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005381 else
5382 ac_cpp_err=
5383 fi
5384else
5385 ac_cpp_err=yes
5386fi
5387if test -z "$ac_cpp_err"; then
5388 ac_header_preproc=yes
5389else
5390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005391sed 's/^/| /' conftest.$ac_ext >&5
5392
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005393 ac_header_preproc=no
5394fi
5395rm -f conftest.err conftest.$ac_ext
5396echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5397echo "${ECHO_T}$ac_header_preproc" >&6
5398
5399# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005400case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5401 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005402 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5403echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005404 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5405echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5406 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005407 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005408 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005409 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5410echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005411 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5412echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5413 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5414echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5415 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5416echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005417 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5418echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005419 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5420echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005421 (
5422 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005423## ------------------------------------------------ ##
5424## Report this to http://www.python.org/python-bugs ##
5425## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005426_ASBOX
5427 ) |
5428 sed "s/^/$as_me: WARNING: /" >&2
5429 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005430esac
5431echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5432echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5433if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5434 echo $ECHO_N "(cached) $ECHO_C" >&6
5435else
5436 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5437fi
5438echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5439echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5440
5441fi
5442if test $ac_cv_header_sys_sysmacros_h = yes; then
5443
5444cat >>confdefs.h <<\_ACEOF
5445#define MAJOR_IN_SYSMACROS 1
5446_ACEOF
5447
5448fi
5449
5450
5451 fi
5452fi
5453
Michael W. Hudson54241132001-12-07 15:38:26 +00005454
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005455# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005456
5457for ac_header in term.h
5458do
5459as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5460echo "$as_me:$LINENO: checking for $ac_header" >&5
5461echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5462if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005463 echo $ECHO_N "(cached) $ECHO_C" >&6
5464else
5465 cat >conftest.$ac_ext <<_ACEOF
5466/* confdefs.h. */
5467_ACEOF
5468cat confdefs.h >>conftest.$ac_ext
5469cat >>conftest.$ac_ext <<_ACEOF
5470/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005471
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005472#ifdef HAVE_CURSES_H
5473#include <curses.h>
5474#endif
5475
5476
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005477#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005478_ACEOF
5479rm -f conftest.$ac_objext
5480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5481 (eval $ac_compile) 2>conftest.er1
5482 ac_status=$?
5483 grep -v '^ *+' conftest.er1 >conftest.err
5484 rm -f conftest.er1
5485 cat conftest.err >&5
5486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005488 { ac_try='test -z "$ac_c_werror_flag"
5489 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5491 (eval $ac_try) 2>&5
5492 ac_status=$?
5493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494 (exit $ac_status); }; } &&
5495 { ac_try='test -s conftest.$ac_objext'
5496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5497 (eval $ac_try) 2>&5
5498 ac_status=$?
5499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5500 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005501 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005502else
5503 echo "$as_me: failed program was:" >&5
5504sed 's/^/| /' conftest.$ac_ext >&5
5505
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005506eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005507fi
5508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5509fi
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005510echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5511echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5512if test `eval echo '${'$as_ac_Header'}'` = yes; then
5513 cat >>confdefs.h <<_ACEOF
5514#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5515_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005516
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005517fi
5518
5519done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005520
5521
Guido van Rossum627b2d71993-12-24 10:39:16 +00005522# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005523was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005524echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5525echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005527/* confdefs.h. */
5528_ACEOF
5529cat confdefs.h >>conftest.$ac_ext
5530cat >>conftest.$ac_ext <<_ACEOF
5531/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005532#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005533
5534_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005536 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005537 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005538else
Martin v. Löwis11437992002-04-12 09:54:03 +00005539
5540
5541cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005542#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005543_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005544
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005545
Guido van Rossum627b2d71993-12-24 10:39:16 +00005546fi
5547rm -f conftest*
5548
Martin v. Löwis11437992002-04-12 09:54:03 +00005549echo "$as_me:$LINENO: result: $was_it_defined" >&5
5550echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005551
Neal Norwitz11690112002-07-30 01:08:28 +00005552# Check whether using makedev requires defining _OSF_SOURCE
5553echo "$as_me:$LINENO: checking for makedev" >&5
5554echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5555cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005556/* confdefs.h. */
5557_ACEOF
5558cat confdefs.h >>conftest.$ac_ext
5559cat >>conftest.$ac_ext <<_ACEOF
5560/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005561#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005562int
5563main ()
5564{
5565 makedev(0, 0)
5566 ;
5567 return 0;
5568}
5569_ACEOF
5570rm -f conftest.$ac_objext conftest$ac_exeext
5571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005572 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005574 grep -v '^ *+' conftest.er1 >conftest.err
5575 rm -f conftest.er1
5576 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005579 { ac_try='test -z "$ac_c_werror_flag"
5580 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5582 (eval $ac_try) 2>&5
5583 ac_status=$?
5584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5585 (exit $ac_status); }; } &&
5586 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5588 (eval $ac_try) 2>&5
5589 ac_status=$?
5590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591 (exit $ac_status); }; }; then
5592 ac_cv_has_makedev=yes
5593else
5594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005595sed 's/^/| /' conftest.$ac_ext >&5
5596
Neal Norwitz11690112002-07-30 01:08:28 +00005597ac_cv_has_makedev=no
5598fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005599rm -f conftest.err conftest.$ac_objext \
5600 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005601if test "$ac_cv_has_makedev" = "no"; then
5602 # we didn't link, try if _OSF_SOURCE will allow us to link
5603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005604/* confdefs.h. */
5605_ACEOF
5606cat confdefs.h >>conftest.$ac_ext
5607cat >>conftest.$ac_ext <<_ACEOF
5608/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005609
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005610#define _OSF_SOURCE 1
5611#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005612
Neal Norwitz11690112002-07-30 01:08:28 +00005613int
5614main ()
5615{
5616 makedev(0, 0)
5617 ;
5618 return 0;
5619}
5620_ACEOF
5621rm -f conftest.$ac_objext conftest$ac_exeext
5622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005623 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005625 grep -v '^ *+' conftest.er1 >conftest.err
5626 rm -f conftest.er1
5627 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005630 { ac_try='test -z "$ac_c_werror_flag"
5631 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5633 (eval $ac_try) 2>&5
5634 ac_status=$?
5635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5636 (exit $ac_status); }; } &&
5637 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5639 (eval $ac_try) 2>&5
5640 ac_status=$?
5641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5642 (exit $ac_status); }; }; then
5643 ac_cv_has_makedev=yes
5644else
5645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005646sed 's/^/| /' conftest.$ac_ext >&5
5647
Neal Norwitz11690112002-07-30 01:08:28 +00005648ac_cv_has_makedev=no
5649fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005650rm -f conftest.err conftest.$ac_objext \
5651 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005652 if test "$ac_cv_has_makedev" = "yes"; then
5653
5654cat >>confdefs.h <<\_ACEOF
5655#define _OSF_SOURCE 1
5656_ACEOF
5657
5658 fi
5659fi
5660echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5661echo "${ECHO_T}$ac_cv_has_makedev" >&6
5662if test "$ac_cv_has_makedev" = "yes"; then
5663
5664cat >>confdefs.h <<\_ACEOF
5665#define HAVE_MAKEDEV 1
5666_ACEOF
5667
5668fi
5669
Martin v. Löwis399a6892002-10-04 10:22:02 +00005670# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5671# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5672# defined, but the compiler does not support pragma redefine_extname,
5673# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5674# structures (such as rlimit64) without declaring them. As a
5675# work-around, disable LFS on such configurations
5676
5677use_lfs=yes
5678echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5679echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5680cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005681/* confdefs.h. */
5682_ACEOF
5683cat confdefs.h >>conftest.$ac_ext
5684cat >>conftest.$ac_ext <<_ACEOF
5685/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005686
5687#define _LARGEFILE_SOURCE 1
5688#define _FILE_OFFSET_BITS 64
5689#include <sys/resource.h>
5690
Martin v. Löwis399a6892002-10-04 10:22:02 +00005691int
5692main ()
5693{
5694struct rlimit foo;
5695 ;
5696 return 0;
5697}
5698_ACEOF
5699rm -f conftest.$ac_objext
5700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005703 grep -v '^ *+' conftest.er1 >conftest.err
5704 rm -f conftest.er1
5705 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005708 { ac_try='test -z "$ac_c_werror_flag"
5709 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5711 (eval $ac_try) 2>&5
5712 ac_status=$?
5713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5714 (exit $ac_status); }; } &&
5715 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5717 (eval $ac_try) 2>&5
5718 ac_status=$?
5719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5720 (exit $ac_status); }; }; then
5721 sol_lfs_bug=no
5722else
5723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005724sed 's/^/| /' conftest.$ac_ext >&5
5725
Martin v. Löwis399a6892002-10-04 10:22:02 +00005726sol_lfs_bug=yes
5727fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005728rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005729echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5730echo "${ECHO_T}$sol_lfs_bug" >&6
5731if test "$sol_lfs_bug" = "yes"; then
5732 use_lfs=no
5733fi
5734
5735if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005736# Two defines needed to enable largefile support on various platforms
5737# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005738
Martin v. Löwis11437992002-04-12 09:54:03 +00005739cat >>confdefs.h <<\_ACEOF
5740#define _LARGEFILE_SOURCE 1
5741_ACEOF
5742
5743
5744cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005745#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005746_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005747
Martin v. Löwis399a6892002-10-04 10:22:02 +00005748fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005749
Guido van Rossum84e7b241996-08-19 21:59:00 +00005750# Add some code to confdefs.h so that the test for off_t works on SCO
5751cat >> confdefs.h <<\EOF
5752#if defined(SCO_DS)
5753#undef _OFF_T
5754#endif
5755EOF
5756
Guido van Rossumef2255b2000-03-10 22:30:29 +00005757# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005758echo "$as_me:$LINENO: checking for mode_t" >&5
5759echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5760if test "${ac_cv_type_mode_t+set}" = set; then
5761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005762else
Martin v. Löwis11437992002-04-12 09:54:03 +00005763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005764/* confdefs.h. */
5765_ACEOF
5766cat confdefs.h >>conftest.$ac_ext
5767cat >>conftest.$ac_ext <<_ACEOF
5768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005769$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005770int
5771main ()
5772{
5773if ((mode_t *) 0)
5774 return 0;
5775if (sizeof (mode_t))
5776 return 0;
5777 ;
5778 return 0;
5779}
5780_ACEOF
5781rm -f conftest.$ac_objext
5782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005783 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005785 grep -v '^ *+' conftest.er1 >conftest.err
5786 rm -f conftest.er1
5787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5789 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005790 { ac_try='test -z "$ac_c_werror_flag"
5791 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5793 (eval $ac_try) 2>&5
5794 ac_status=$?
5795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5796 (exit $ac_status); }; } &&
5797 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5799 (eval $ac_try) 2>&5
5800 ac_status=$?
5801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5802 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005803 ac_cv_type_mode_t=yes
5804else
Martin v. Löwis11437992002-04-12 09:54:03 +00005805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005806sed 's/^/| /' conftest.$ac_ext >&5
5807
Martin v. Löwis11437992002-04-12 09:54:03 +00005808ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005809fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005810rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005812echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5813echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5814if test $ac_cv_type_mode_t = yes; then
5815 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816else
Martin v. Löwis11437992002-04-12 09:54:03 +00005817
5818cat >>confdefs.h <<_ACEOF
5819#define mode_t int
5820_ACEOF
5821
5822fi
5823
5824echo "$as_me:$LINENO: checking for off_t" >&5
5825echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5826if test "${ac_cv_type_off_t+set}" = set; then
5827 echo $ECHO_N "(cached) $ECHO_C" >&6
5828else
5829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005830/* confdefs.h. */
5831_ACEOF
5832cat confdefs.h >>conftest.$ac_ext
5833cat >>conftest.$ac_ext <<_ACEOF
5834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005835$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005836int
5837main ()
5838{
5839if ((off_t *) 0)
5840 return 0;
5841if (sizeof (off_t))
5842 return 0;
5843 ;
5844 return 0;
5845}
5846_ACEOF
5847rm -f conftest.$ac_objext
5848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005849 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005851 grep -v '^ *+' conftest.er1 >conftest.err
5852 rm -f conftest.er1
5853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5855 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005856 { ac_try='test -z "$ac_c_werror_flag"
5857 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5859 (eval $ac_try) 2>&5
5860 ac_status=$?
5861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5862 (exit $ac_status); }; } &&
5863 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5865 (eval $ac_try) 2>&5
5866 ac_status=$?
5867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5868 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005869 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005870else
Martin v. Löwis11437992002-04-12 09:54:03 +00005871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005872sed 's/^/| /' conftest.$ac_ext >&5
5873
Martin v. Löwis11437992002-04-12 09:54:03 +00005874ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005875fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005876rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005878echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5879echo "${ECHO_T}$ac_cv_type_off_t" >&6
5880if test $ac_cv_type_off_t = yes; then
5881 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005882else
Martin v. Löwis11437992002-04-12 09:54:03 +00005883
5884cat >>confdefs.h <<_ACEOF
5885#define off_t long
5886_ACEOF
5887
5888fi
5889
5890echo "$as_me:$LINENO: checking for pid_t" >&5
5891echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5892if test "${ac_cv_type_pid_t+set}" = set; then
5893 echo $ECHO_N "(cached) $ECHO_C" >&6
5894else
5895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005896/* confdefs.h. */
5897_ACEOF
5898cat confdefs.h >>conftest.$ac_ext
5899cat >>conftest.$ac_ext <<_ACEOF
5900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005901$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005902int
5903main ()
5904{
5905if ((pid_t *) 0)
5906 return 0;
5907if (sizeof (pid_t))
5908 return 0;
5909 ;
5910 return 0;
5911}
5912_ACEOF
5913rm -f conftest.$ac_objext
5914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005915 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005917 grep -v '^ *+' conftest.er1 >conftest.err
5918 rm -f conftest.er1
5919 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5921 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005922 { ac_try='test -z "$ac_c_werror_flag"
5923 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5925 (eval $ac_try) 2>&5
5926 ac_status=$?
5927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5928 (exit $ac_status); }; } &&
5929 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5931 (eval $ac_try) 2>&5
5932 ac_status=$?
5933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005935 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005936else
Martin v. Löwis11437992002-04-12 09:54:03 +00005937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005938sed 's/^/| /' conftest.$ac_ext >&5
5939
Martin v. Löwis11437992002-04-12 09:54:03 +00005940ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005941fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005942rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005944echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5945echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5946if test $ac_cv_type_pid_t = yes; then
5947 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948else
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
5950cat >>confdefs.h <<_ACEOF
5951#define pid_t int
5952_ACEOF
5953
5954fi
5955
5956echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5957echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5958if test "${ac_cv_type_signal+set}" = set; then
5959 echo $ECHO_N "(cached) $ECHO_C" >&6
5960else
5961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005962/* confdefs.h. */
5963_ACEOF
5964cat confdefs.h >>conftest.$ac_ext
5965cat >>conftest.$ac_ext <<_ACEOF
5966/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005967#include <sys/types.h>
5968#include <signal.h>
5969#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005970# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005971#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005972#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005973extern "C" void (*signal (int, void (*)(int)))(int);
5974#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005975void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005976#endif
5977
Martin v. Löwis11437992002-04-12 09:54:03 +00005978int
5979main ()
5980{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005981int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005982 ;
5983 return 0;
5984}
5985_ACEOF
5986rm -f conftest.$ac_objext
5987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005988 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005990 grep -v '^ *+' conftest.er1 >conftest.err
5991 rm -f conftest.er1
5992 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5994 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005995 { ac_try='test -z "$ac_c_werror_flag"
5996 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5998 (eval $ac_try) 2>&5
5999 ac_status=$?
6000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6001 (exit $ac_status); }; } &&
6002 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6004 (eval $ac_try) 2>&5
6005 ac_status=$?
6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006008 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006009else
Martin v. Löwis11437992002-04-12 09:54:03 +00006010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006011sed 's/^/| /' conftest.$ac_ext >&5
6012
Martin v. Löwis11437992002-04-12 09:54:03 +00006013ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006014fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006016fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006017echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6018echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006019
Martin v. Löwis11437992002-04-12 09:54:03 +00006020cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006021#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006022_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006023
Michael W. Hudson54241132001-12-07 15:38:26 +00006024
Martin v. Löwis11437992002-04-12 09:54:03 +00006025echo "$as_me:$LINENO: checking for size_t" >&5
6026echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6027if test "${ac_cv_type_size_t+set}" = set; then
6028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006029else
Martin v. Löwis11437992002-04-12 09:54:03 +00006030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006031/* confdefs.h. */
6032_ACEOF
6033cat confdefs.h >>conftest.$ac_ext
6034cat >>conftest.$ac_ext <<_ACEOF
6035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006036$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006037int
6038main ()
6039{
6040if ((size_t *) 0)
6041 return 0;
6042if (sizeof (size_t))
6043 return 0;
6044 ;
6045 return 0;
6046}
6047_ACEOF
6048rm -f conftest.$ac_objext
6049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006050 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006052 grep -v '^ *+' conftest.er1 >conftest.err
6053 rm -f conftest.er1
6054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6056 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006057 { ac_try='test -z "$ac_c_werror_flag"
6058 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6060 (eval $ac_try) 2>&5
6061 ac_status=$?
6062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6063 (exit $ac_status); }; } &&
6064 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6066 (eval $ac_try) 2>&5
6067 ac_status=$?
6068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6069 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006070 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006071else
Martin v. Löwis11437992002-04-12 09:54:03 +00006072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006073sed 's/^/| /' conftest.$ac_ext >&5
6074
Martin v. Löwis11437992002-04-12 09:54:03 +00006075ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006076fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006077rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006078fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006079echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6080echo "${ECHO_T}$ac_cv_type_size_t" >&6
6081if test $ac_cv_type_size_t = yes; then
6082 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006083else
Martin v. Löwis11437992002-04-12 09:54:03 +00006084
6085cat >>confdefs.h <<_ACEOF
6086#define size_t unsigned
6087_ACEOF
6088
6089fi
6090
6091echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6092echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6093if test "${ac_cv_type_uid_t+set}" = set; then
6094 echo $ECHO_N "(cached) $ECHO_C" >&6
6095else
6096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006097/* confdefs.h. */
6098_ACEOF
6099cat confdefs.h >>conftest.$ac_ext
6100cat >>conftest.$ac_ext <<_ACEOF
6101/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006102#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006103
6104_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006106 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107 ac_cv_type_uid_t=yes
6108else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006109 ac_cv_type_uid_t=no
6110fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006111rm -f conftest*
6112
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006113fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006114echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6115echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006116if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117
Martin v. Löwis11437992002-04-12 09:54:03 +00006118cat >>confdefs.h <<\_ACEOF
6119#define uid_t int
6120_ACEOF
6121
6122
6123cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006124#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006125_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126
6127fi
6128
Jack Jansendd19cf82001-12-06 22:36:17 +00006129
Michael W. Hudson54241132001-12-07 15:38:26 +00006130# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006131# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006132echo "$as_me:$LINENO: checking for int" >&5
6133echo $ECHO_N "checking for int... $ECHO_C" >&6
6134if test "${ac_cv_type_int+set}" = set; then
6135 echo $ECHO_N "(cached) $ECHO_C" >&6
6136else
6137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006138/* confdefs.h. */
6139_ACEOF
6140cat confdefs.h >>conftest.$ac_ext
6141cat >>conftest.$ac_ext <<_ACEOF
6142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006143$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006144int
6145main ()
6146{
6147if ((int *) 0)
6148 return 0;
6149if (sizeof (int))
6150 return 0;
6151 ;
6152 return 0;
6153}
6154_ACEOF
6155rm -f conftest.$ac_objext
6156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006157 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006159 grep -v '^ *+' conftest.er1 >conftest.err
6160 rm -f conftest.er1
6161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6163 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006164 { ac_try='test -z "$ac_c_werror_flag"
6165 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6167 (eval $ac_try) 2>&5
6168 ac_status=$?
6169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6170 (exit $ac_status); }; } &&
6171 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6173 (eval $ac_try) 2>&5
6174 ac_status=$?
6175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6176 (exit $ac_status); }; }; then
6177 ac_cv_type_int=yes
6178else
6179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006180sed 's/^/| /' conftest.$ac_ext >&5
6181
Martin v. Löwis11437992002-04-12 09:54:03 +00006182ac_cv_type_int=no
6183fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006184rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006185fi
6186echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6187echo "${ECHO_T}$ac_cv_type_int" >&6
6188
6189echo "$as_me:$LINENO: checking size of int" >&5
6190echo $ECHO_N "checking size of int... $ECHO_C" >&6
6191if test "${ac_cv_sizeof_int+set}" = set; then
6192 echo $ECHO_N "(cached) $ECHO_C" >&6
6193else
6194 if test "$ac_cv_type_int" = yes; then
6195 # The cast to unsigned long works around a bug in the HP C Compiler
6196 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6197 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6198 # This bug is HP SR number 8606223364.
6199 if test "$cross_compiling" = yes; then
6200 # Depending upon the size, compute the lo and hi bounds.
6201cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006202/* confdefs.h. */
6203_ACEOF
6204cat confdefs.h >>conftest.$ac_ext
6205cat >>conftest.$ac_ext <<_ACEOF
6206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006207$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006208int
6209main ()
6210{
6211static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6212test_array [0] = 0
6213
6214 ;
6215 return 0;
6216}
6217_ACEOF
6218rm -f conftest.$ac_objext
6219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006220 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006222 grep -v '^ *+' conftest.er1 >conftest.err
6223 rm -f conftest.er1
6224 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6226 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006227 { ac_try='test -z "$ac_c_werror_flag"
6228 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6230 (eval $ac_try) 2>&5
6231 ac_status=$?
6232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6233 (exit $ac_status); }; } &&
6234 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6236 (eval $ac_try) 2>&5
6237 ac_status=$?
6238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6239 (exit $ac_status); }; }; then
6240 ac_lo=0 ac_mid=0
6241 while :; do
6242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006243/* confdefs.h. */
6244_ACEOF
6245cat confdefs.h >>conftest.$ac_ext
6246cat >>conftest.$ac_ext <<_ACEOF
6247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006248$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006249int
6250main ()
6251{
6252static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6253test_array [0] = 0
6254
6255 ;
6256 return 0;
6257}
6258_ACEOF
6259rm -f conftest.$ac_objext
6260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006261 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263 grep -v '^ *+' conftest.er1 >conftest.err
6264 rm -f conftest.er1
6265 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006268 { ac_try='test -z "$ac_c_werror_flag"
6269 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6271 (eval $ac_try) 2>&5
6272 ac_status=$?
6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274 (exit $ac_status); }; } &&
6275 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6277 (eval $ac_try) 2>&5
6278 ac_status=$?
6279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6280 (exit $ac_status); }; }; then
6281 ac_hi=$ac_mid; break
6282else
6283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006284sed 's/^/| /' conftest.$ac_ext >&5
6285
Martin v. Löwis11437992002-04-12 09:54:03 +00006286ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006287 if test $ac_lo -le $ac_mid; then
6288 ac_lo= ac_hi=
6289 break
6290 fi
6291 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006292fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006294 done
6295else
6296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006297sed 's/^/| /' conftest.$ac_ext >&5
6298
Martin v. Löwis11437992002-04-12 09:54:03 +00006299cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006300/* confdefs.h. */
6301_ACEOF
6302cat confdefs.h >>conftest.$ac_ext
6303cat >>conftest.$ac_ext <<_ACEOF
6304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006305$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006306int
6307main ()
6308{
6309static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6310test_array [0] = 0
6311
6312 ;
6313 return 0;
6314}
6315_ACEOF
6316rm -f conftest.$ac_objext
6317if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006318 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006320 grep -v '^ *+' conftest.er1 >conftest.err
6321 rm -f conftest.er1
6322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6324 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006325 { ac_try='test -z "$ac_c_werror_flag"
6326 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6328 (eval $ac_try) 2>&5
6329 ac_status=$?
6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331 (exit $ac_status); }; } &&
6332 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6334 (eval $ac_try) 2>&5
6335 ac_status=$?
6336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6337 (exit $ac_status); }; }; then
6338 ac_hi=-1 ac_mid=-1
6339 while :; do
6340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006341/* confdefs.h. */
6342_ACEOF
6343cat confdefs.h >>conftest.$ac_ext
6344cat >>conftest.$ac_ext <<_ACEOF
6345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006346$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006347int
6348main ()
6349{
6350static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6351test_array [0] = 0
6352
6353 ;
6354 return 0;
6355}
6356_ACEOF
6357rm -f conftest.$ac_objext
6358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006359 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006361 grep -v '^ *+' conftest.er1 >conftest.err
6362 rm -f conftest.er1
6363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6365 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006366 { ac_try='test -z "$ac_c_werror_flag"
6367 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6369 (eval $ac_try) 2>&5
6370 ac_status=$?
6371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6372 (exit $ac_status); }; } &&
6373 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6375 (eval $ac_try) 2>&5
6376 ac_status=$?
6377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6378 (exit $ac_status); }; }; then
6379 ac_lo=$ac_mid; break
6380else
6381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006382sed 's/^/| /' conftest.$ac_ext >&5
6383
Martin v. Löwis11437992002-04-12 09:54:03 +00006384ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006385 if test $ac_mid -le $ac_hi; then
6386 ac_lo= ac_hi=
6387 break
6388 fi
6389 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006390fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006391rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006392 done
6393else
6394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006395sed 's/^/| /' conftest.$ac_ext >&5
6396
Martin v. Löwis11437992002-04-12 09:54:03 +00006397ac_lo= ac_hi=
6398fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006399rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006400fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006402# Binary search between lo and hi bounds.
6403while test "x$ac_lo" != "x$ac_hi"; do
6404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006406/* confdefs.h. */
6407_ACEOF
6408cat confdefs.h >>conftest.$ac_ext
6409cat >>conftest.$ac_ext <<_ACEOF
6410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006411$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006412int
6413main ()
6414{
6415static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6416test_array [0] = 0
6417
6418 ;
6419 return 0;
6420}
6421_ACEOF
6422rm -f conftest.$ac_objext
6423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006424 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006426 grep -v '^ *+' conftest.er1 >conftest.err
6427 rm -f conftest.er1
6428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006431 { ac_try='test -z "$ac_c_werror_flag"
6432 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6434 (eval $ac_try) 2>&5
6435 ac_status=$?
6436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437 (exit $ac_status); }; } &&
6438 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6440 (eval $ac_try) 2>&5
6441 ac_status=$?
6442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443 (exit $ac_status); }; }; then
6444 ac_hi=$ac_mid
6445else
6446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006447sed 's/^/| /' conftest.$ac_ext >&5
6448
Martin v. Löwis11437992002-04-12 09:54:03 +00006449ac_lo=`expr '(' $ac_mid ')' + 1`
6450fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006452done
6453case $ac_lo in
6454?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006455'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6456See \`config.log' for more details." >&5
6457echo "$as_me: error: cannot compute sizeof (int), 77
6458See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006459 { (exit 1); exit 1; }; } ;;
6460esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006461else
6462 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006463 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6464See \`config.log' for more details." >&5
6465echo "$as_me: error: cannot run test program while cross compiling
6466See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006467 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006468else
Martin v. Löwis11437992002-04-12 09:54:03 +00006469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006470/* confdefs.h. */
6471_ACEOF
6472cat confdefs.h >>conftest.$ac_ext
6473cat >>conftest.$ac_ext <<_ACEOF
6474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006475$ac_includes_default
6476long longval () { return (long) (sizeof (int)); }
6477unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006478#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006479#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006480int
6481main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006482{
Martin v. Löwis11437992002-04-12 09:54:03 +00006483
6484 FILE *f = fopen ("conftest.val", "w");
6485 if (! f)
6486 exit (1);
6487 if (((long) (sizeof (int))) < 0)
6488 {
6489 long i = longval ();
6490 if (i != ((long) (sizeof (int))))
6491 exit (1);
6492 fprintf (f, "%ld\n", i);
6493 }
6494 else
6495 {
6496 unsigned long i = ulongval ();
6497 if (i != ((long) (sizeof (int))))
6498 exit (1);
6499 fprintf (f, "%lu\n", i);
6500 }
6501 exit (ferror (f) || fclose (f) != 0);
6502
6503 ;
6504 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006505}
Martin v. Löwis11437992002-04-12 09:54:03 +00006506_ACEOF
6507rm -f conftest$ac_exeext
6508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6509 (eval $ac_link) 2>&5
6510 ac_status=$?
6511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6514 (eval $ac_try) 2>&5
6515 ac_status=$?
6516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517 (exit $ac_status); }; }; then
6518 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006519else
Martin v. Löwis11437992002-04-12 09:54:03 +00006520 echo "$as_me: program exited with status $ac_status" >&5
6521echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006522sed 's/^/| /' conftest.$ac_ext >&5
6523
Martin v. Löwis11437992002-04-12 09:54:03 +00006524( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006525{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6526See \`config.log' for more details." >&5
6527echo "$as_me: error: cannot compute sizeof (int), 77
6528See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006529 { (exit 1); exit 1; }; }
6530fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006531rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006532fi
6533fi
6534rm -f conftest.val
6535else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006536 ac_cv_sizeof_int=0
6537fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006539echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6540echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6541cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006542#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006543_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006544
6545
Martin v. Löwis11437992002-04-12 09:54:03 +00006546echo "$as_me:$LINENO: checking for long" >&5
6547echo $ECHO_N "checking for long... $ECHO_C" >&6
6548if test "${ac_cv_type_long+set}" = set; then
6549 echo $ECHO_N "(cached) $ECHO_C" >&6
6550else
6551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006552/* confdefs.h. */
6553_ACEOF
6554cat confdefs.h >>conftest.$ac_ext
6555cat >>conftest.$ac_ext <<_ACEOF
6556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006557$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006558int
6559main ()
6560{
6561if ((long *) 0)
6562 return 0;
6563if (sizeof (long))
6564 return 0;
6565 ;
6566 return 0;
6567}
6568_ACEOF
6569rm -f conftest.$ac_objext
6570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006571 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006573 grep -v '^ *+' conftest.er1 >conftest.err
6574 rm -f conftest.er1
6575 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006578 { ac_try='test -z "$ac_c_werror_flag"
6579 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6581 (eval $ac_try) 2>&5
6582 ac_status=$?
6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584 (exit $ac_status); }; } &&
6585 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6587 (eval $ac_try) 2>&5
6588 ac_status=$?
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590 (exit $ac_status); }; }; then
6591 ac_cv_type_long=yes
6592else
6593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006594sed 's/^/| /' conftest.$ac_ext >&5
6595
Martin v. Löwis11437992002-04-12 09:54:03 +00006596ac_cv_type_long=no
6597fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006598rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006599fi
6600echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6601echo "${ECHO_T}$ac_cv_type_long" >&6
6602
6603echo "$as_me:$LINENO: checking size of long" >&5
6604echo $ECHO_N "checking size of long... $ECHO_C" >&6
6605if test "${ac_cv_sizeof_long+set}" = set; then
6606 echo $ECHO_N "(cached) $ECHO_C" >&6
6607else
6608 if test "$ac_cv_type_long" = yes; then
6609 # The cast to unsigned long works around a bug in the HP C Compiler
6610 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6611 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6612 # This bug is HP SR number 8606223364.
6613 if test "$cross_compiling" = yes; then
6614 # Depending upon the size, compute the lo and hi bounds.
6615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006616/* confdefs.h. */
6617_ACEOF
6618cat confdefs.h >>conftest.$ac_ext
6619cat >>conftest.$ac_ext <<_ACEOF
6620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006621$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006622int
6623main ()
6624{
6625static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6626test_array [0] = 0
6627
6628 ;
6629 return 0;
6630}
6631_ACEOF
6632rm -f conftest.$ac_objext
6633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006634 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006636 grep -v '^ *+' conftest.er1 >conftest.err
6637 rm -f conftest.er1
6638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6640 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006641 { ac_try='test -z "$ac_c_werror_flag"
6642 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6644 (eval $ac_try) 2>&5
6645 ac_status=$?
6646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647 (exit $ac_status); }; } &&
6648 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6650 (eval $ac_try) 2>&5
6651 ac_status=$?
6652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6653 (exit $ac_status); }; }; then
6654 ac_lo=0 ac_mid=0
6655 while :; do
6656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006657/* confdefs.h. */
6658_ACEOF
6659cat confdefs.h >>conftest.$ac_ext
6660cat >>conftest.$ac_ext <<_ACEOF
6661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006662$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006663int
6664main ()
6665{
6666static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6667test_array [0] = 0
6668
6669 ;
6670 return 0;
6671}
6672_ACEOF
6673rm -f conftest.$ac_objext
6674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006675 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006677 grep -v '^ *+' conftest.er1 >conftest.err
6678 rm -f conftest.er1
6679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006682 { ac_try='test -z "$ac_c_werror_flag"
6683 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6685 (eval $ac_try) 2>&5
6686 ac_status=$?
6687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688 (exit $ac_status); }; } &&
6689 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6691 (eval $ac_try) 2>&5
6692 ac_status=$?
6693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6694 (exit $ac_status); }; }; then
6695 ac_hi=$ac_mid; break
6696else
6697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006698sed 's/^/| /' conftest.$ac_ext >&5
6699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006701 if test $ac_lo -le $ac_mid; then
6702 ac_lo= ac_hi=
6703 break
6704 fi
6705 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006706fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006707rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 done
6709else
6710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006711sed 's/^/| /' conftest.$ac_ext >&5
6712
Martin v. Löwis11437992002-04-12 09:54:03 +00006713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006714/* confdefs.h. */
6715_ACEOF
6716cat confdefs.h >>conftest.$ac_ext
6717cat >>conftest.$ac_ext <<_ACEOF
6718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006719$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006720int
6721main ()
6722{
6723static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6724test_array [0] = 0
6725
6726 ;
6727 return 0;
6728}
6729_ACEOF
6730rm -f conftest.$ac_objext
6731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006732 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006734 grep -v '^ *+' conftest.er1 >conftest.err
6735 rm -f conftest.er1
6736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6738 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006739 { ac_try='test -z "$ac_c_werror_flag"
6740 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6742 (eval $ac_try) 2>&5
6743 ac_status=$?
6744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6745 (exit $ac_status); }; } &&
6746 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6748 (eval $ac_try) 2>&5
6749 ac_status=$?
6750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6751 (exit $ac_status); }; }; then
6752 ac_hi=-1 ac_mid=-1
6753 while :; do
6754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006755/* confdefs.h. */
6756_ACEOF
6757cat confdefs.h >>conftest.$ac_ext
6758cat >>conftest.$ac_ext <<_ACEOF
6759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006760$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006761int
6762main ()
6763{
6764static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6765test_array [0] = 0
6766
6767 ;
6768 return 0;
6769}
6770_ACEOF
6771rm -f conftest.$ac_objext
6772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006773 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006775 grep -v '^ *+' conftest.er1 >conftest.err
6776 rm -f conftest.er1
6777 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6779 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006780 { ac_try='test -z "$ac_c_werror_flag"
6781 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6783 (eval $ac_try) 2>&5
6784 ac_status=$?
6785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786 (exit $ac_status); }; } &&
6787 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6789 (eval $ac_try) 2>&5
6790 ac_status=$?
6791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792 (exit $ac_status); }; }; then
6793 ac_lo=$ac_mid; break
6794else
6795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006796sed 's/^/| /' conftest.$ac_ext >&5
6797
Martin v. Löwis11437992002-04-12 09:54:03 +00006798ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006799 if test $ac_mid -le $ac_hi; then
6800 ac_lo= ac_hi=
6801 break
6802 fi
6803 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006804fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006805rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006806 done
6807else
6808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006809sed 's/^/| /' conftest.$ac_ext >&5
6810
Martin v. Löwis11437992002-04-12 09:54:03 +00006811ac_lo= ac_hi=
6812fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006813rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006814fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006815rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006816# Binary search between lo and hi bounds.
6817while test "x$ac_lo" != "x$ac_hi"; do
6818 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006820/* confdefs.h. */
6821_ACEOF
6822cat confdefs.h >>conftest.$ac_ext
6823cat >>conftest.$ac_ext <<_ACEOF
6824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006825$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006826int
6827main ()
6828{
6829static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6830test_array [0] = 0
6831
6832 ;
6833 return 0;
6834}
6835_ACEOF
6836rm -f conftest.$ac_objext
6837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006838 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006840 grep -v '^ *+' conftest.er1 >conftest.err
6841 rm -f conftest.er1
6842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6844 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006845 { ac_try='test -z "$ac_c_werror_flag"
6846 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6848 (eval $ac_try) 2>&5
6849 ac_status=$?
6850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851 (exit $ac_status); }; } &&
6852 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6854 (eval $ac_try) 2>&5
6855 ac_status=$?
6856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6857 (exit $ac_status); }; }; then
6858 ac_hi=$ac_mid
6859else
6860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006861sed 's/^/| /' conftest.$ac_ext >&5
6862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863ac_lo=`expr '(' $ac_mid ')' + 1`
6864fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006865rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006866done
6867case $ac_lo in
6868?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006869'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6870See \`config.log' for more details." >&5
6871echo "$as_me: error: cannot compute sizeof (long), 77
6872See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006873 { (exit 1); exit 1; }; } ;;
6874esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006875else
6876 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006877 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6878See \`config.log' for more details." >&5
6879echo "$as_me: error: cannot run test program while cross compiling
6880See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006881 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006882else
Martin v. Löwis11437992002-04-12 09:54:03 +00006883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006884/* confdefs.h. */
6885_ACEOF
6886cat confdefs.h >>conftest.$ac_ext
6887cat >>conftest.$ac_ext <<_ACEOF
6888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006889$ac_includes_default
6890long longval () { return (long) (sizeof (long)); }
6891unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006892#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006893#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006894int
6895main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006896{
Martin v. Löwis11437992002-04-12 09:54:03 +00006897
6898 FILE *f = fopen ("conftest.val", "w");
6899 if (! f)
6900 exit (1);
6901 if (((long) (sizeof (long))) < 0)
6902 {
6903 long i = longval ();
6904 if (i != ((long) (sizeof (long))))
6905 exit (1);
6906 fprintf (f, "%ld\n", i);
6907 }
6908 else
6909 {
6910 unsigned long i = ulongval ();
6911 if (i != ((long) (sizeof (long))))
6912 exit (1);
6913 fprintf (f, "%lu\n", i);
6914 }
6915 exit (ferror (f) || fclose (f) != 0);
6916
6917 ;
6918 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006919}
Martin v. Löwis11437992002-04-12 09:54:03 +00006920_ACEOF
6921rm -f conftest$ac_exeext
6922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6923 (eval $ac_link) 2>&5
6924 ac_status=$?
6925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6928 (eval $ac_try) 2>&5
6929 ac_status=$?
6930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6931 (exit $ac_status); }; }; then
6932 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006933else
Martin v. Löwis11437992002-04-12 09:54:03 +00006934 echo "$as_me: program exited with status $ac_status" >&5
6935echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006936sed 's/^/| /' conftest.$ac_ext >&5
6937
Martin v. Löwis11437992002-04-12 09:54:03 +00006938( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006939{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6940See \`config.log' for more details." >&5
6941echo "$as_me: error: cannot compute sizeof (long), 77
6942See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 { (exit 1); exit 1; }; }
6944fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006945rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006946fi
6947fi
6948rm -f conftest.val
6949else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006950 ac_cv_sizeof_long=0
6951fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006953echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6954echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6955cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006956#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006957_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006958
6959
Martin v. Löwis11437992002-04-12 09:54:03 +00006960echo "$as_me:$LINENO: checking for void *" >&5
6961echo $ECHO_N "checking for void *... $ECHO_C" >&6
6962if test "${ac_cv_type_void_p+set}" = set; then
6963 echo $ECHO_N "(cached) $ECHO_C" >&6
6964else
6965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006966/* confdefs.h. */
6967_ACEOF
6968cat confdefs.h >>conftest.$ac_ext
6969cat >>conftest.$ac_ext <<_ACEOF
6970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006971$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006972int
6973main ()
6974{
6975if ((void * *) 0)
6976 return 0;
6977if (sizeof (void *))
6978 return 0;
6979 ;
6980 return 0;
6981}
6982_ACEOF
6983rm -f conftest.$ac_objext
6984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006985 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006987 grep -v '^ *+' conftest.er1 >conftest.err
6988 rm -f conftest.er1
6989 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6991 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006992 { ac_try='test -z "$ac_c_werror_flag"
6993 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6995 (eval $ac_try) 2>&5
6996 ac_status=$?
6997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6998 (exit $ac_status); }; } &&
6999 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7001 (eval $ac_try) 2>&5
7002 ac_status=$?
7003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7004 (exit $ac_status); }; }; then
7005 ac_cv_type_void_p=yes
7006else
7007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007008sed 's/^/| /' conftest.$ac_ext >&5
7009
Martin v. Löwis11437992002-04-12 09:54:03 +00007010ac_cv_type_void_p=no
7011fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007013fi
7014echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7015echo "${ECHO_T}$ac_cv_type_void_p" >&6
7016
7017echo "$as_me:$LINENO: checking size of void *" >&5
7018echo $ECHO_N "checking size of void *... $ECHO_C" >&6
7019if test "${ac_cv_sizeof_void_p+set}" = set; then
7020 echo $ECHO_N "(cached) $ECHO_C" >&6
7021else
7022 if test "$ac_cv_type_void_p" = yes; then
7023 # The cast to unsigned long works around a bug in the HP C Compiler
7024 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7025 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7026 # This bug is HP SR number 8606223364.
7027 if test "$cross_compiling" = yes; then
7028 # Depending upon the size, compute the lo and hi bounds.
7029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007030/* confdefs.h. */
7031_ACEOF
7032cat confdefs.h >>conftest.$ac_ext
7033cat >>conftest.$ac_ext <<_ACEOF
7034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007035$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007036int
7037main ()
7038{
7039static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
7040test_array [0] = 0
7041
7042 ;
7043 return 0;
7044}
7045_ACEOF
7046rm -f conftest.$ac_objext
7047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007048 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007050 grep -v '^ *+' conftest.er1 >conftest.err
7051 rm -f conftest.er1
7052 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007055 { ac_try='test -z "$ac_c_werror_flag"
7056 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7058 (eval $ac_try) 2>&5
7059 ac_status=$?
7060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7061 (exit $ac_status); }; } &&
7062 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7064 (eval $ac_try) 2>&5
7065 ac_status=$?
7066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7067 (exit $ac_status); }; }; then
7068 ac_lo=0 ac_mid=0
7069 while :; do
7070 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007071/* confdefs.h. */
7072_ACEOF
7073cat confdefs.h >>conftest.$ac_ext
7074cat >>conftest.$ac_ext <<_ACEOF
7075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007076$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007077int
7078main ()
7079{
7080static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7081test_array [0] = 0
7082
7083 ;
7084 return 0;
7085}
7086_ACEOF
7087rm -f conftest.$ac_objext
7088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007089 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007091 grep -v '^ *+' conftest.er1 >conftest.err
7092 rm -f conftest.er1
7093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7095 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007096 { ac_try='test -z "$ac_c_werror_flag"
7097 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7099 (eval $ac_try) 2>&5
7100 ac_status=$?
7101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7102 (exit $ac_status); }; } &&
7103 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7105 (eval $ac_try) 2>&5
7106 ac_status=$?
7107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7108 (exit $ac_status); }; }; then
7109 ac_hi=$ac_mid; break
7110else
7111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007112sed 's/^/| /' conftest.$ac_ext >&5
7113
Martin v. Löwis11437992002-04-12 09:54:03 +00007114ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007115 if test $ac_lo -le $ac_mid; then
7116 ac_lo= ac_hi=
7117 break
7118 fi
7119 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007120fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007121rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007122 done
7123else
7124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007125sed 's/^/| /' conftest.$ac_ext >&5
7126
Martin v. Löwis11437992002-04-12 09:54:03 +00007127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007128/* confdefs.h. */
7129_ACEOF
7130cat confdefs.h >>conftest.$ac_ext
7131cat >>conftest.$ac_ext <<_ACEOF
7132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007133$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007134int
7135main ()
7136{
7137static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7138test_array [0] = 0
7139
7140 ;
7141 return 0;
7142}
7143_ACEOF
7144rm -f conftest.$ac_objext
7145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007146 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007148 grep -v '^ *+' conftest.er1 >conftest.err
7149 rm -f conftest.er1
7150 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7152 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007153 { ac_try='test -z "$ac_c_werror_flag"
7154 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7156 (eval $ac_try) 2>&5
7157 ac_status=$?
7158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7159 (exit $ac_status); }; } &&
7160 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7162 (eval $ac_try) 2>&5
7163 ac_status=$?
7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7165 (exit $ac_status); }; }; then
7166 ac_hi=-1 ac_mid=-1
7167 while :; do
7168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007169/* confdefs.h. */
7170_ACEOF
7171cat confdefs.h >>conftest.$ac_ext
7172cat >>conftest.$ac_ext <<_ACEOF
7173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007174$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007175int
7176main ()
7177{
7178static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7179test_array [0] = 0
7180
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185rm -f conftest.$ac_objext
7186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007187 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007189 grep -v '^ *+' conftest.er1 >conftest.err
7190 rm -f conftest.er1
7191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7193 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007194 { ac_try='test -z "$ac_c_werror_flag"
7195 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7197 (eval $ac_try) 2>&5
7198 ac_status=$?
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); }; } &&
7201 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7203 (eval $ac_try) 2>&5
7204 ac_status=$?
7205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7206 (exit $ac_status); }; }; then
7207 ac_lo=$ac_mid; break
7208else
7209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007210sed 's/^/| /' conftest.$ac_ext >&5
7211
Martin v. Löwis11437992002-04-12 09:54:03 +00007212ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007213 if test $ac_mid -le $ac_hi; then
7214 ac_lo= ac_hi=
7215 break
7216 fi
7217 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007218fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007219rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007220 done
7221else
7222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007223sed 's/^/| /' conftest.$ac_ext >&5
7224
Martin v. Löwis11437992002-04-12 09:54:03 +00007225ac_lo= ac_hi=
7226fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007228fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007229rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007230# Binary search between lo and hi bounds.
7231while test "x$ac_lo" != "x$ac_hi"; do
7232 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007234/* confdefs.h. */
7235_ACEOF
7236cat confdefs.h >>conftest.$ac_ext
7237cat >>conftest.$ac_ext <<_ACEOF
7238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007239$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007240int
7241main ()
7242{
7243static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7244test_array [0] = 0
7245
7246 ;
7247 return 0;
7248}
7249_ACEOF
7250rm -f conftest.$ac_objext
7251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007252 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007254 grep -v '^ *+' conftest.er1 >conftest.err
7255 rm -f conftest.er1
7256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7258 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007259 { ac_try='test -z "$ac_c_werror_flag"
7260 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7262 (eval $ac_try) 2>&5
7263 ac_status=$?
7264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7265 (exit $ac_status); }; } &&
7266 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7268 (eval $ac_try) 2>&5
7269 ac_status=$?
7270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271 (exit $ac_status); }; }; then
7272 ac_hi=$ac_mid
7273else
7274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007275sed 's/^/| /' conftest.$ac_ext >&5
7276
Martin v. Löwis11437992002-04-12 09:54:03 +00007277ac_lo=`expr '(' $ac_mid ')' + 1`
7278fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007280done
7281case $ac_lo in
7282?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007283'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7284See \`config.log' for more details." >&5
7285echo "$as_me: error: cannot compute sizeof (void *), 77
7286See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007287 { (exit 1); exit 1; }; } ;;
7288esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007289else
7290 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007291 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7292See \`config.log' for more details." >&5
7293echo "$as_me: error: cannot run test program while cross compiling
7294See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007295 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007296else
Martin v. Löwis11437992002-04-12 09:54:03 +00007297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* confdefs.h. */
7299_ACEOF
7300cat confdefs.h >>conftest.$ac_ext
7301cat >>conftest.$ac_ext <<_ACEOF
7302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007303$ac_includes_default
7304long longval () { return (long) (sizeof (void *)); }
7305unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007306#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007307#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007308int
7309main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007310{
Martin v. Löwis11437992002-04-12 09:54:03 +00007311
7312 FILE *f = fopen ("conftest.val", "w");
7313 if (! f)
7314 exit (1);
7315 if (((long) (sizeof (void *))) < 0)
7316 {
7317 long i = longval ();
7318 if (i != ((long) (sizeof (void *))))
7319 exit (1);
7320 fprintf (f, "%ld\n", i);
7321 }
7322 else
7323 {
7324 unsigned long i = ulongval ();
7325 if (i != ((long) (sizeof (void *))))
7326 exit (1);
7327 fprintf (f, "%lu\n", i);
7328 }
7329 exit (ferror (f) || fclose (f) != 0);
7330
7331 ;
7332 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007333}
Martin v. Löwis11437992002-04-12 09:54:03 +00007334_ACEOF
7335rm -f conftest$ac_exeext
7336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7337 (eval $ac_link) 2>&5
7338 ac_status=$?
7339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7340 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7342 (eval $ac_try) 2>&5
7343 ac_status=$?
7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); }; }; then
7346 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007347else
Martin v. Löwis11437992002-04-12 09:54:03 +00007348 echo "$as_me: program exited with status $ac_status" >&5
7349echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007350sed 's/^/| /' conftest.$ac_ext >&5
7351
Martin v. Löwis11437992002-04-12 09:54:03 +00007352( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007353{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7354See \`config.log' for more details." >&5
7355echo "$as_me: error: cannot compute sizeof (void *), 77
7356See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007357 { (exit 1); exit 1; }; }
7358fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007359rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007360fi
7361fi
7362rm -f conftest.val
7363else
Guido van Rossumad678af1998-10-02 14:42:15 +00007364 ac_cv_sizeof_void_p=0
7365fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007367echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7368echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7369cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007370#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007371_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007372
7373
Martin v. Löwis11437992002-04-12 09:54:03 +00007374echo "$as_me:$LINENO: checking for short" >&5
7375echo $ECHO_N "checking for short... $ECHO_C" >&6
7376if test "${ac_cv_type_short+set}" = set; then
7377 echo $ECHO_N "(cached) $ECHO_C" >&6
7378else
7379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007380/* confdefs.h. */
7381_ACEOF
7382cat confdefs.h >>conftest.$ac_ext
7383cat >>conftest.$ac_ext <<_ACEOF
7384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007385$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007386int
7387main ()
7388{
7389if ((short *) 0)
7390 return 0;
7391if (sizeof (short))
7392 return 0;
7393 ;
7394 return 0;
7395}
7396_ACEOF
7397rm -f conftest.$ac_objext
7398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007399 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007401 grep -v '^ *+' conftest.er1 >conftest.err
7402 rm -f conftest.er1
7403 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7405 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007406 { ac_try='test -z "$ac_c_werror_flag"
7407 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7409 (eval $ac_try) 2>&5
7410 ac_status=$?
7411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7412 (exit $ac_status); }; } &&
7413 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7415 (eval $ac_try) 2>&5
7416 ac_status=$?
7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7418 (exit $ac_status); }; }; then
7419 ac_cv_type_short=yes
7420else
7421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007422sed 's/^/| /' conftest.$ac_ext >&5
7423
Martin v. Löwis11437992002-04-12 09:54:03 +00007424ac_cv_type_short=no
7425fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007426rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007427fi
7428echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7429echo "${ECHO_T}$ac_cv_type_short" >&6
7430
7431echo "$as_me:$LINENO: checking size of short" >&5
7432echo $ECHO_N "checking size of short... $ECHO_C" >&6
7433if test "${ac_cv_sizeof_short+set}" = set; then
7434 echo $ECHO_N "(cached) $ECHO_C" >&6
7435else
7436 if test "$ac_cv_type_short" = yes; then
7437 # The cast to unsigned long works around a bug in the HP C Compiler
7438 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7439 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7440 # This bug is HP SR number 8606223364.
7441 if test "$cross_compiling" = yes; then
7442 # Depending upon the size, compute the lo and hi bounds.
7443cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007444/* confdefs.h. */
7445_ACEOF
7446cat confdefs.h >>conftest.$ac_ext
7447cat >>conftest.$ac_ext <<_ACEOF
7448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007449$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007450int
7451main ()
7452{
7453static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7454test_array [0] = 0
7455
7456 ;
7457 return 0;
7458}
7459_ACEOF
7460rm -f conftest.$ac_objext
7461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007462 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007464 grep -v '^ *+' conftest.er1 >conftest.err
7465 rm -f conftest.er1
7466 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007469 { ac_try='test -z "$ac_c_werror_flag"
7470 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7472 (eval $ac_try) 2>&5
7473 ac_status=$?
7474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7475 (exit $ac_status); }; } &&
7476 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7478 (eval $ac_try) 2>&5
7479 ac_status=$?
7480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7481 (exit $ac_status); }; }; then
7482 ac_lo=0 ac_mid=0
7483 while :; do
7484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007485/* confdefs.h. */
7486_ACEOF
7487cat confdefs.h >>conftest.$ac_ext
7488cat >>conftest.$ac_ext <<_ACEOF
7489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007490$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007491int
7492main ()
7493{
7494static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7495test_array [0] = 0
7496
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
7502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007503 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007505 grep -v '^ *+' conftest.er1 >conftest.err
7506 rm -f conftest.er1
7507 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007510 { ac_try='test -z "$ac_c_werror_flag"
7511 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7513 (eval $ac_try) 2>&5
7514 ac_status=$?
7515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516 (exit $ac_status); }; } &&
7517 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7519 (eval $ac_try) 2>&5
7520 ac_status=$?
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); }; }; then
7523 ac_hi=$ac_mid; break
7524else
7525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007526sed 's/^/| /' conftest.$ac_ext >&5
7527
Martin v. Löwis11437992002-04-12 09:54:03 +00007528ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007529 if test $ac_lo -le $ac_mid; then
7530 ac_lo= ac_hi=
7531 break
7532 fi
7533 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007534fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007535rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007536 done
7537else
7538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007539sed 's/^/| /' conftest.$ac_ext >&5
7540
Martin v. Löwis11437992002-04-12 09:54:03 +00007541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007542/* confdefs.h. */
7543_ACEOF
7544cat confdefs.h >>conftest.$ac_ext
7545cat >>conftest.$ac_ext <<_ACEOF
7546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007547$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007548int
7549main ()
7550{
7551static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7552test_array [0] = 0
7553
7554 ;
7555 return 0;
7556}
7557_ACEOF
7558rm -f conftest.$ac_objext
7559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007560 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007562 grep -v '^ *+' conftest.er1 >conftest.err
7563 rm -f conftest.er1
7564 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7566 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007567 { ac_try='test -z "$ac_c_werror_flag"
7568 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7570 (eval $ac_try) 2>&5
7571 ac_status=$?
7572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7573 (exit $ac_status); }; } &&
7574 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7576 (eval $ac_try) 2>&5
7577 ac_status=$?
7578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7579 (exit $ac_status); }; }; then
7580 ac_hi=-1 ac_mid=-1
7581 while :; do
7582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007583/* confdefs.h. */
7584_ACEOF
7585cat confdefs.h >>conftest.$ac_ext
7586cat >>conftest.$ac_ext <<_ACEOF
7587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007588$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007589int
7590main ()
7591{
7592static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7593test_array [0] = 0
7594
7595 ;
7596 return 0;
7597}
7598_ACEOF
7599rm -f conftest.$ac_objext
7600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007601 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007603 grep -v '^ *+' conftest.er1 >conftest.err
7604 rm -f conftest.er1
7605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7607 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007608 { ac_try='test -z "$ac_c_werror_flag"
7609 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7611 (eval $ac_try) 2>&5
7612 ac_status=$?
7613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614 (exit $ac_status); }; } &&
7615 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7617 (eval $ac_try) 2>&5
7618 ac_status=$?
7619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620 (exit $ac_status); }; }; then
7621 ac_lo=$ac_mid; break
7622else
7623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007624sed 's/^/| /' conftest.$ac_ext >&5
7625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007627 if test $ac_mid -le $ac_hi; then
7628 ac_lo= ac_hi=
7629 break
7630 fi
7631 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007632fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007633rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 done
7635else
7636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007637sed 's/^/| /' conftest.$ac_ext >&5
7638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639ac_lo= ac_hi=
7640fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007641rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007642fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007644# Binary search between lo and hi bounds.
7645while test "x$ac_lo" != "x$ac_hi"; do
7646 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007648/* confdefs.h. */
7649_ACEOF
7650cat confdefs.h >>conftest.$ac_ext
7651cat >>conftest.$ac_ext <<_ACEOF
7652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007653$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007654int
7655main ()
7656{
7657static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7658test_array [0] = 0
7659
7660 ;
7661 return 0;
7662}
7663_ACEOF
7664rm -f conftest.$ac_objext
7665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007666 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007668 grep -v '^ *+' conftest.er1 >conftest.err
7669 rm -f conftest.er1
7670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7672 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007673 { ac_try='test -z "$ac_c_werror_flag"
7674 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676 (eval $ac_try) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); }; } &&
7680 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7682 (eval $ac_try) 2>&5
7683 ac_status=$?
7684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); }; }; then
7686 ac_hi=$ac_mid
7687else
7688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007689sed 's/^/| /' conftest.$ac_ext >&5
7690
Martin v. Löwis11437992002-04-12 09:54:03 +00007691ac_lo=`expr '(' $ac_mid ')' + 1`
7692fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007693rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007694done
7695case $ac_lo in
7696?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007697'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7698See \`config.log' for more details." >&5
7699echo "$as_me: error: cannot compute sizeof (short), 77
7700See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007701 { (exit 1); exit 1; }; } ;;
7702esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007703else
7704 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007705 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7706See \`config.log' for more details." >&5
7707echo "$as_me: error: cannot run test program while cross compiling
7708See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007710else
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007712/* confdefs.h. */
7713_ACEOF
7714cat confdefs.h >>conftest.$ac_ext
7715cat >>conftest.$ac_ext <<_ACEOF
7716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007717$ac_includes_default
7718long longval () { return (long) (sizeof (short)); }
7719unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007720#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007721#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007722int
7723main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007724{
Martin v. Löwis11437992002-04-12 09:54:03 +00007725
7726 FILE *f = fopen ("conftest.val", "w");
7727 if (! f)
7728 exit (1);
7729 if (((long) (sizeof (short))) < 0)
7730 {
7731 long i = longval ();
7732 if (i != ((long) (sizeof (short))))
7733 exit (1);
7734 fprintf (f, "%ld\n", i);
7735 }
7736 else
7737 {
7738 unsigned long i = ulongval ();
7739 if (i != ((long) (sizeof (short))))
7740 exit (1);
7741 fprintf (f, "%lu\n", i);
7742 }
7743 exit (ferror (f) || fclose (f) != 0);
7744
7745 ;
7746 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007747}
Martin v. Löwis11437992002-04-12 09:54:03 +00007748_ACEOF
7749rm -f conftest$ac_exeext
7750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7751 (eval $ac_link) 2>&5
7752 ac_status=$?
7753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7754 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7756 (eval $ac_try) 2>&5
7757 ac_status=$?
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); }; }; then
7760 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007761else
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 echo "$as_me: program exited with status $ac_status" >&5
7763echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007764sed 's/^/| /' conftest.$ac_ext >&5
7765
Martin v. Löwis11437992002-04-12 09:54:03 +00007766( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007767{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7768See \`config.log' for more details." >&5
7769echo "$as_me: error: cannot compute sizeof (short), 77
7770See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007771 { (exit 1); exit 1; }; }
7772fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007773rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007774fi
7775fi
7776rm -f conftest.val
7777else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007778 ac_cv_sizeof_short=0
7779fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007780fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007781echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7782echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7783cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007784#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007785_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007786
7787
Martin v. Löwis11437992002-04-12 09:54:03 +00007788echo "$as_me:$LINENO: checking for float" >&5
7789echo $ECHO_N "checking for float... $ECHO_C" >&6
7790if test "${ac_cv_type_float+set}" = set; then
7791 echo $ECHO_N "(cached) $ECHO_C" >&6
7792else
7793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007794/* confdefs.h. */
7795_ACEOF
7796cat confdefs.h >>conftest.$ac_ext
7797cat >>conftest.$ac_ext <<_ACEOF
7798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007799$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007800int
7801main ()
7802{
7803if ((float *) 0)
7804 return 0;
7805if (sizeof (float))
7806 return 0;
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811rm -f conftest.$ac_objext
7812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007813 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007815 grep -v '^ *+' conftest.er1 >conftest.err
7816 rm -f conftest.er1
7817 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7819 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007820 { ac_try='test -z "$ac_c_werror_flag"
7821 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7823 (eval $ac_try) 2>&5
7824 ac_status=$?
7825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7826 (exit $ac_status); }; } &&
7827 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7829 (eval $ac_try) 2>&5
7830 ac_status=$?
7831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7832 (exit $ac_status); }; }; then
7833 ac_cv_type_float=yes
7834else
7835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007836sed 's/^/| /' conftest.$ac_ext >&5
7837
Martin v. Löwis11437992002-04-12 09:54:03 +00007838ac_cv_type_float=no
7839fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007840rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
7842echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7843echo "${ECHO_T}$ac_cv_type_float" >&6
7844
7845echo "$as_me:$LINENO: checking size of float" >&5
7846echo $ECHO_N "checking size of float... $ECHO_C" >&6
7847if test "${ac_cv_sizeof_float+set}" = set; then
7848 echo $ECHO_N "(cached) $ECHO_C" >&6
7849else
7850 if test "$ac_cv_type_float" = yes; then
7851 # The cast to unsigned long works around a bug in the HP C Compiler
7852 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7853 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7854 # This bug is HP SR number 8606223364.
7855 if test "$cross_compiling" = yes; then
7856 # Depending upon the size, compute the lo and hi bounds.
7857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007858/* confdefs.h. */
7859_ACEOF
7860cat confdefs.h >>conftest.$ac_ext
7861cat >>conftest.$ac_ext <<_ACEOF
7862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007863$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007864int
7865main ()
7866{
7867static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7868test_array [0] = 0
7869
7870 ;
7871 return 0;
7872}
7873_ACEOF
7874rm -f conftest.$ac_objext
7875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007876 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007878 grep -v '^ *+' conftest.er1 >conftest.err
7879 rm -f conftest.er1
7880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007883 { ac_try='test -z "$ac_c_werror_flag"
7884 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7886 (eval $ac_try) 2>&5
7887 ac_status=$?
7888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7889 (exit $ac_status); }; } &&
7890 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7892 (eval $ac_try) 2>&5
7893 ac_status=$?
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); }; }; then
7896 ac_lo=0 ac_mid=0
7897 while :; do
7898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007899/* confdefs.h. */
7900_ACEOF
7901cat confdefs.h >>conftest.$ac_ext
7902cat >>conftest.$ac_ext <<_ACEOF
7903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007904$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007905int
7906main ()
7907{
7908static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7909test_array [0] = 0
7910
7911 ;
7912 return 0;
7913}
7914_ACEOF
7915rm -f conftest.$ac_objext
7916if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007917 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007919 grep -v '^ *+' conftest.er1 >conftest.err
7920 rm -f conftest.er1
7921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7923 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007924 { ac_try='test -z "$ac_c_werror_flag"
7925 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7927 (eval $ac_try) 2>&5
7928 ac_status=$?
7929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 (exit $ac_status); }; } &&
7931 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7933 (eval $ac_try) 2>&5
7934 ac_status=$?
7935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936 (exit $ac_status); }; }; then
7937 ac_hi=$ac_mid; break
7938else
7939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007940sed 's/^/| /' conftest.$ac_ext >&5
7941
Martin v. Löwis11437992002-04-12 09:54:03 +00007942ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007943 if test $ac_lo -le $ac_mid; then
7944 ac_lo= ac_hi=
7945 break
7946 fi
7947 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007948fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007949rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 done
7951else
7952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007953sed 's/^/| /' conftest.$ac_ext >&5
7954
Martin v. Löwis11437992002-04-12 09:54:03 +00007955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007956/* confdefs.h. */
7957_ACEOF
7958cat confdefs.h >>conftest.$ac_ext
7959cat >>conftest.$ac_ext <<_ACEOF
7960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007961$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007962int
7963main ()
7964{
7965static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7966test_array [0] = 0
7967
7968 ;
7969 return 0;
7970}
7971_ACEOF
7972rm -f conftest.$ac_objext
7973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007974 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007976 grep -v '^ *+' conftest.er1 >conftest.err
7977 rm -f conftest.er1
7978 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007981 { ac_try='test -z "$ac_c_werror_flag"
7982 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7984 (eval $ac_try) 2>&5
7985 ac_status=$?
7986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7987 (exit $ac_status); }; } &&
7988 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7990 (eval $ac_try) 2>&5
7991 ac_status=$?
7992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7993 (exit $ac_status); }; }; then
7994 ac_hi=-1 ac_mid=-1
7995 while :; do
7996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007997/* confdefs.h. */
7998_ACEOF
7999cat confdefs.h >>conftest.$ac_ext
8000cat >>conftest.$ac_ext <<_ACEOF
8001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008002$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008003int
8004main ()
8005{
8006static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
8007test_array [0] = 0
8008
8009 ;
8010 return 0;
8011}
8012_ACEOF
8013rm -f conftest.$ac_objext
8014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008015 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008017 grep -v '^ *+' conftest.er1 >conftest.err
8018 rm -f conftest.er1
8019 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8021 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008022 { ac_try='test -z "$ac_c_werror_flag"
8023 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025 (eval $ac_try) 2>&5
8026 ac_status=$?
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); }; } &&
8029 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8031 (eval $ac_try) 2>&5
8032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); }; }; then
8035 ac_lo=$ac_mid; break
8036else
8037 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008038sed 's/^/| /' conftest.$ac_ext >&5
8039
Martin v. Löwis11437992002-04-12 09:54:03 +00008040ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008041 if test $ac_mid -le $ac_hi; then
8042 ac_lo= ac_hi=
8043 break
8044 fi
8045 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008046fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008047rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 done
8049else
8050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008051sed 's/^/| /' conftest.$ac_ext >&5
8052
Martin v. Löwis11437992002-04-12 09:54:03 +00008053ac_lo= ac_hi=
8054fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008055rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008056fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008057rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008058# Binary search between lo and hi bounds.
8059while test "x$ac_lo" != "x$ac_hi"; do
8060 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008062/* confdefs.h. */
8063_ACEOF
8064cat confdefs.h >>conftest.$ac_ext
8065cat >>conftest.$ac_ext <<_ACEOF
8066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008067$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008068int
8069main ()
8070{
8071static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8072test_array [0] = 0
8073
8074 ;
8075 return 0;
8076}
8077_ACEOF
8078rm -f conftest.$ac_objext
8079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008080 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008082 grep -v '^ *+' conftest.er1 >conftest.err
8083 rm -f conftest.er1
8084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008087 { ac_try='test -z "$ac_c_werror_flag"
8088 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8090 (eval $ac_try) 2>&5
8091 ac_status=$?
8092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8093 (exit $ac_status); }; } &&
8094 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8096 (eval $ac_try) 2>&5
8097 ac_status=$?
8098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8099 (exit $ac_status); }; }; then
8100 ac_hi=$ac_mid
8101else
8102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008103sed 's/^/| /' conftest.$ac_ext >&5
8104
Martin v. Löwis11437992002-04-12 09:54:03 +00008105ac_lo=`expr '(' $ac_mid ')' + 1`
8106fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008107rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008108done
8109case $ac_lo in
8110?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008111'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8112See \`config.log' for more details." >&5
8113echo "$as_me: error: cannot compute sizeof (float), 77
8114See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 { (exit 1); exit 1; }; } ;;
8116esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008117else
8118 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008119 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8120See \`config.log' for more details." >&5
8121echo "$as_me: error: cannot run test program while cross compiling
8122See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008124else
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008126/* confdefs.h. */
8127_ACEOF
8128cat confdefs.h >>conftest.$ac_ext
8129cat >>conftest.$ac_ext <<_ACEOF
8130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008131$ac_includes_default
8132long longval () { return (long) (sizeof (float)); }
8133unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008134#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008135#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008136int
8137main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008138{
Martin v. Löwis11437992002-04-12 09:54:03 +00008139
8140 FILE *f = fopen ("conftest.val", "w");
8141 if (! f)
8142 exit (1);
8143 if (((long) (sizeof (float))) < 0)
8144 {
8145 long i = longval ();
8146 if (i != ((long) (sizeof (float))))
8147 exit (1);
8148 fprintf (f, "%ld\n", i);
8149 }
8150 else
8151 {
8152 unsigned long i = ulongval ();
8153 if (i != ((long) (sizeof (float))))
8154 exit (1);
8155 fprintf (f, "%lu\n", i);
8156 }
8157 exit (ferror (f) || fclose (f) != 0);
8158
8159 ;
8160 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008161}
Martin v. Löwis11437992002-04-12 09:54:03 +00008162_ACEOF
8163rm -f conftest$ac_exeext
8164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8165 (eval $ac_link) 2>&5
8166 ac_status=$?
8167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8168 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8170 (eval $ac_try) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); }; }; then
8174 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008175else
Martin v. Löwis11437992002-04-12 09:54:03 +00008176 echo "$as_me: program exited with status $ac_status" >&5
8177echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008178sed 's/^/| /' conftest.$ac_ext >&5
8179
Martin v. Löwis11437992002-04-12 09:54:03 +00008180( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008181{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8182See \`config.log' for more details." >&5
8183echo "$as_me: error: cannot compute sizeof (float), 77
8184See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008185 { (exit 1); exit 1; }; }
8186fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008187rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008188fi
8189fi
8190rm -f conftest.val
8191else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008192 ac_cv_sizeof_float=0
8193fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008195echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8196echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8197cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008198#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008199_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008200
8201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202echo "$as_me:$LINENO: checking for double" >&5
8203echo $ECHO_N "checking for double... $ECHO_C" >&6
8204if test "${ac_cv_type_double+set}" = set; then
8205 echo $ECHO_N "(cached) $ECHO_C" >&6
8206else
8207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008208/* confdefs.h. */
8209_ACEOF
8210cat confdefs.h >>conftest.$ac_ext
8211cat >>conftest.$ac_ext <<_ACEOF
8212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008213$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008214int
8215main ()
8216{
8217if ((double *) 0)
8218 return 0;
8219if (sizeof (double))
8220 return 0;
8221 ;
8222 return 0;
8223}
8224_ACEOF
8225rm -f conftest.$ac_objext
8226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008227 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008229 grep -v '^ *+' conftest.er1 >conftest.err
8230 rm -f conftest.er1
8231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8233 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008234 { ac_try='test -z "$ac_c_werror_flag"
8235 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8237 (eval $ac_try) 2>&5
8238 ac_status=$?
8239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8240 (exit $ac_status); }; } &&
8241 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8243 (eval $ac_try) 2>&5
8244 ac_status=$?
8245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8246 (exit $ac_status); }; }; then
8247 ac_cv_type_double=yes
8248else
8249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008250sed 's/^/| /' conftest.$ac_ext >&5
8251
Martin v. Löwis11437992002-04-12 09:54:03 +00008252ac_cv_type_double=no
8253fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008254rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008255fi
8256echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8257echo "${ECHO_T}$ac_cv_type_double" >&6
8258
8259echo "$as_me:$LINENO: checking size of double" >&5
8260echo $ECHO_N "checking size of double... $ECHO_C" >&6
8261if test "${ac_cv_sizeof_double+set}" = set; then
8262 echo $ECHO_N "(cached) $ECHO_C" >&6
8263else
8264 if test "$ac_cv_type_double" = yes; then
8265 # The cast to unsigned long works around a bug in the HP C Compiler
8266 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8267 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8268 # This bug is HP SR number 8606223364.
8269 if test "$cross_compiling" = yes; then
8270 # Depending upon the size, compute the lo and hi bounds.
8271cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008272/* confdefs.h. */
8273_ACEOF
8274cat confdefs.h >>conftest.$ac_ext
8275cat >>conftest.$ac_ext <<_ACEOF
8276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008277$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008278int
8279main ()
8280{
8281static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8282test_array [0] = 0
8283
8284 ;
8285 return 0;
8286}
8287_ACEOF
8288rm -f conftest.$ac_objext
8289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008290 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008292 grep -v '^ *+' conftest.er1 >conftest.err
8293 rm -f conftest.er1
8294 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8296 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008297 { ac_try='test -z "$ac_c_werror_flag"
8298 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8300 (eval $ac_try) 2>&5
8301 ac_status=$?
8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303 (exit $ac_status); }; } &&
8304 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8306 (eval $ac_try) 2>&5
8307 ac_status=$?
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 (exit $ac_status); }; }; then
8310 ac_lo=0 ac_mid=0
8311 while :; do
8312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008313/* confdefs.h. */
8314_ACEOF
8315cat confdefs.h >>conftest.$ac_ext
8316cat >>conftest.$ac_ext <<_ACEOF
8317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008318$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008319int
8320main ()
8321{
8322static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8323test_array [0] = 0
8324
8325 ;
8326 return 0;
8327}
8328_ACEOF
8329rm -f conftest.$ac_objext
8330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008331 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008333 grep -v '^ *+' conftest.er1 >conftest.err
8334 rm -f conftest.er1
8335 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008338 { ac_try='test -z "$ac_c_werror_flag"
8339 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8341 (eval $ac_try) 2>&5
8342 ac_status=$?
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); }; } &&
8345 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8347 (eval $ac_try) 2>&5
8348 ac_status=$?
8349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350 (exit $ac_status); }; }; then
8351 ac_hi=$ac_mid; break
8352else
8353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008354sed 's/^/| /' conftest.$ac_ext >&5
8355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008357 if test $ac_lo -le $ac_mid; then
8358 ac_lo= ac_hi=
8359 break
8360 fi
8361 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008362fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008363rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 done
8365else
8366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008367sed 's/^/| /' conftest.$ac_ext >&5
8368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008370/* confdefs.h. */
8371_ACEOF
8372cat confdefs.h >>conftest.$ac_ext
8373cat >>conftest.$ac_ext <<_ACEOF
8374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008375$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008376int
8377main ()
8378{
8379static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8380test_array [0] = 0
8381
8382 ;
8383 return 0;
8384}
8385_ACEOF
8386rm -f conftest.$ac_objext
8387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008388 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008390 grep -v '^ *+' conftest.er1 >conftest.err
8391 rm -f conftest.er1
8392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8394 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008395 { ac_try='test -z "$ac_c_werror_flag"
8396 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8398 (eval $ac_try) 2>&5
8399 ac_status=$?
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); }; } &&
8402 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8404 (eval $ac_try) 2>&5
8405 ac_status=$?
8406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8407 (exit $ac_status); }; }; then
8408 ac_hi=-1 ac_mid=-1
8409 while :; do
8410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008411/* confdefs.h. */
8412_ACEOF
8413cat confdefs.h >>conftest.$ac_ext
8414cat >>conftest.$ac_ext <<_ACEOF
8415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008416$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008417int
8418main ()
8419{
8420static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8421test_array [0] = 0
8422
8423 ;
8424 return 0;
8425}
8426_ACEOF
8427rm -f conftest.$ac_objext
8428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008429 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008431 grep -v '^ *+' conftest.er1 >conftest.err
8432 rm -f conftest.er1
8433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8435 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008436 { ac_try='test -z "$ac_c_werror_flag"
8437 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8439 (eval $ac_try) 2>&5
8440 ac_status=$?
8441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442 (exit $ac_status); }; } &&
8443 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8445 (eval $ac_try) 2>&5
8446 ac_status=$?
8447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8448 (exit $ac_status); }; }; then
8449 ac_lo=$ac_mid; break
8450else
8451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008452sed 's/^/| /' conftest.$ac_ext >&5
8453
Martin v. Löwis11437992002-04-12 09:54:03 +00008454ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008455 if test $ac_mid -le $ac_hi; then
8456 ac_lo= ac_hi=
8457 break
8458 fi
8459 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008460fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008461rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008462 done
8463else
8464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008465sed 's/^/| /' conftest.$ac_ext >&5
8466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467ac_lo= ac_hi=
8468fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008469rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008470fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008471rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008472# Binary search between lo and hi bounds.
8473while test "x$ac_lo" != "x$ac_hi"; do
8474 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008476/* confdefs.h. */
8477_ACEOF
8478cat confdefs.h >>conftest.$ac_ext
8479cat >>conftest.$ac_ext <<_ACEOF
8480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008481$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008482int
8483main ()
8484{
8485static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8486test_array [0] = 0
8487
8488 ;
8489 return 0;
8490}
8491_ACEOF
8492rm -f conftest.$ac_objext
8493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008494 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008496 grep -v '^ *+' conftest.er1 >conftest.err
8497 rm -f conftest.er1
8498 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8500 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008501 { ac_try='test -z "$ac_c_werror_flag"
8502 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8504 (eval $ac_try) 2>&5
8505 ac_status=$?
8506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8507 (exit $ac_status); }; } &&
8508 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8510 (eval $ac_try) 2>&5
8511 ac_status=$?
8512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8513 (exit $ac_status); }; }; then
8514 ac_hi=$ac_mid
8515else
8516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008517sed 's/^/| /' conftest.$ac_ext >&5
8518
Martin v. Löwis11437992002-04-12 09:54:03 +00008519ac_lo=`expr '(' $ac_mid ')' + 1`
8520fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008521rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008522done
8523case $ac_lo in
8524?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008525'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8526See \`config.log' for more details." >&5
8527echo "$as_me: error: cannot compute sizeof (double), 77
8528See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 { (exit 1); exit 1; }; } ;;
8530esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008531else
8532 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008533 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8534See \`config.log' for more details." >&5
8535echo "$as_me: error: cannot run test program while cross compiling
8536See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008538else
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008540/* confdefs.h. */
8541_ACEOF
8542cat confdefs.h >>conftest.$ac_ext
8543cat >>conftest.$ac_ext <<_ACEOF
8544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008545$ac_includes_default
8546long longval () { return (long) (sizeof (double)); }
8547unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008548#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008549#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008550int
8551main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008552{
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
8554 FILE *f = fopen ("conftest.val", "w");
8555 if (! f)
8556 exit (1);
8557 if (((long) (sizeof (double))) < 0)
8558 {
8559 long i = longval ();
8560 if (i != ((long) (sizeof (double))))
8561 exit (1);
8562 fprintf (f, "%ld\n", i);
8563 }
8564 else
8565 {
8566 unsigned long i = ulongval ();
8567 if (i != ((long) (sizeof (double))))
8568 exit (1);
8569 fprintf (f, "%lu\n", i);
8570 }
8571 exit (ferror (f) || fclose (f) != 0);
8572
8573 ;
8574 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575}
Martin v. Löwis11437992002-04-12 09:54:03 +00008576_ACEOF
8577rm -f conftest$ac_exeext
8578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8579 (eval $ac_link) 2>&5
8580 ac_status=$?
8581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8584 (eval $ac_try) 2>&5
8585 ac_status=$?
8586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8587 (exit $ac_status); }; }; then
8588 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008589else
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 echo "$as_me: program exited with status $ac_status" >&5
8591echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008592sed 's/^/| /' conftest.$ac_ext >&5
8593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008595{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8596See \`config.log' for more details." >&5
8597echo "$as_me: error: cannot compute sizeof (double), 77
8598See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 { (exit 1); exit 1; }; }
8600fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008601rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008602fi
8603fi
8604rm -f conftest.val
8605else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008606 ac_cv_sizeof_double=0
8607fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008608fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008609echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8610echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8611cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008612#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008613_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008614
8615
Martin v. Löwis11437992002-04-12 09:54:03 +00008616echo "$as_me:$LINENO: checking for fpos_t" >&5
8617echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8618if test "${ac_cv_type_fpos_t+set}" = set; then
8619 echo $ECHO_N "(cached) $ECHO_C" >&6
8620else
8621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008622/* confdefs.h. */
8623_ACEOF
8624cat confdefs.h >>conftest.$ac_ext
8625cat >>conftest.$ac_ext <<_ACEOF
8626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008627$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008628int
8629main ()
8630{
8631if ((fpos_t *) 0)
8632 return 0;
8633if (sizeof (fpos_t))
8634 return 0;
8635 ;
8636 return 0;
8637}
8638_ACEOF
8639rm -f conftest.$ac_objext
8640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008641 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008643 grep -v '^ *+' conftest.er1 >conftest.err
8644 rm -f conftest.er1
8645 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8647 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008648 { ac_try='test -z "$ac_c_werror_flag"
8649 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8651 (eval $ac_try) 2>&5
8652 ac_status=$?
8653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8654 (exit $ac_status); }; } &&
8655 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8657 (eval $ac_try) 2>&5
8658 ac_status=$?
8659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8660 (exit $ac_status); }; }; then
8661 ac_cv_type_fpos_t=yes
8662else
8663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008664sed 's/^/| /' conftest.$ac_ext >&5
8665
Martin v. Löwis11437992002-04-12 09:54:03 +00008666ac_cv_type_fpos_t=no
8667fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008669fi
8670echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8671echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8672
8673echo "$as_me:$LINENO: checking size of fpos_t" >&5
8674echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8675if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8676 echo $ECHO_N "(cached) $ECHO_C" >&6
8677else
8678 if test "$ac_cv_type_fpos_t" = yes; then
8679 # The cast to unsigned long works around a bug in the HP C Compiler
8680 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8681 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8682 # This bug is HP SR number 8606223364.
8683 if test "$cross_compiling" = yes; then
8684 # Depending upon the size, compute the lo and hi bounds.
8685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008686/* confdefs.h. */
8687_ACEOF
8688cat confdefs.h >>conftest.$ac_ext
8689cat >>conftest.$ac_ext <<_ACEOF
8690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008691$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008692int
8693main ()
8694{
8695static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8696test_array [0] = 0
8697
8698 ;
8699 return 0;
8700}
8701_ACEOF
8702rm -f conftest.$ac_objext
8703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008704 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008706 grep -v '^ *+' conftest.er1 >conftest.err
8707 rm -f conftest.er1
8708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8710 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008711 { ac_try='test -z "$ac_c_werror_flag"
8712 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8714 (eval $ac_try) 2>&5
8715 ac_status=$?
8716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8717 (exit $ac_status); }; } &&
8718 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8720 (eval $ac_try) 2>&5
8721 ac_status=$?
8722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723 (exit $ac_status); }; }; then
8724 ac_lo=0 ac_mid=0
8725 while :; do
8726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008727/* confdefs.h. */
8728_ACEOF
8729cat confdefs.h >>conftest.$ac_ext
8730cat >>conftest.$ac_ext <<_ACEOF
8731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008732$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008733int
8734main ()
8735{
8736static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8737test_array [0] = 0
8738
8739 ;
8740 return 0;
8741}
8742_ACEOF
8743rm -f conftest.$ac_objext
8744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008745 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008747 grep -v '^ *+' conftest.er1 >conftest.err
8748 rm -f conftest.er1
8749 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008752 { ac_try='test -z "$ac_c_werror_flag"
8753 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8755 (eval $ac_try) 2>&5
8756 ac_status=$?
8757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8758 (exit $ac_status); }; } &&
8759 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8761 (eval $ac_try) 2>&5
8762 ac_status=$?
8763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8764 (exit $ac_status); }; }; then
8765 ac_hi=$ac_mid; break
8766else
8767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008768sed 's/^/| /' conftest.$ac_ext >&5
8769
Martin v. Löwis11437992002-04-12 09:54:03 +00008770ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008771 if test $ac_lo -le $ac_mid; then
8772 ac_lo= ac_hi=
8773 break
8774 fi
8775 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008776fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 done
8779else
8780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008781sed 's/^/| /' conftest.$ac_ext >&5
8782
Martin v. Löwis11437992002-04-12 09:54:03 +00008783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008784/* confdefs.h. */
8785_ACEOF
8786cat confdefs.h >>conftest.$ac_ext
8787cat >>conftest.$ac_ext <<_ACEOF
8788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008789$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008790int
8791main ()
8792{
8793static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8794test_array [0] = 0
8795
8796 ;
8797 return 0;
8798}
8799_ACEOF
8800rm -f conftest.$ac_objext
8801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008802 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008804 grep -v '^ *+' conftest.er1 >conftest.err
8805 rm -f conftest.er1
8806 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8808 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008809 { ac_try='test -z "$ac_c_werror_flag"
8810 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8812 (eval $ac_try) 2>&5
8813 ac_status=$?
8814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8815 (exit $ac_status); }; } &&
8816 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8818 (eval $ac_try) 2>&5
8819 ac_status=$?
8820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8821 (exit $ac_status); }; }; then
8822 ac_hi=-1 ac_mid=-1
8823 while :; do
8824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* confdefs.h. */
8826_ACEOF
8827cat confdefs.h >>conftest.$ac_ext
8828cat >>conftest.$ac_ext <<_ACEOF
8829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008831int
8832main ()
8833{
8834static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8835test_array [0] = 0
8836
8837 ;
8838 return 0;
8839}
8840_ACEOF
8841rm -f conftest.$ac_objext
8842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008843 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008845 grep -v '^ *+' conftest.er1 >conftest.err
8846 rm -f conftest.er1
8847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8849 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008850 { ac_try='test -z "$ac_c_werror_flag"
8851 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8853 (eval $ac_try) 2>&5
8854 ac_status=$?
8855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8856 (exit $ac_status); }; } &&
8857 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8859 (eval $ac_try) 2>&5
8860 ac_status=$?
8861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862 (exit $ac_status); }; }; then
8863 ac_lo=$ac_mid; break
8864else
8865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008866sed 's/^/| /' conftest.$ac_ext >&5
8867
Martin v. Löwis11437992002-04-12 09:54:03 +00008868ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008869 if test $ac_mid -le $ac_hi; then
8870 ac_lo= ac_hi=
8871 break
8872 fi
8873 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008874fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008875rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 done
8877else
8878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008879sed 's/^/| /' conftest.$ac_ext >&5
8880
Martin v. Löwis11437992002-04-12 09:54:03 +00008881ac_lo= ac_hi=
8882fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008883rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008884fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008885rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008886# Binary search between lo and hi bounds.
8887while test "x$ac_lo" != "x$ac_hi"; do
8888 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* confdefs.h. */
8891_ACEOF
8892cat confdefs.h >>conftest.$ac_ext
8893cat >>conftest.$ac_ext <<_ACEOF
8894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008895$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008896int
8897main ()
8898{
8899static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8900test_array [0] = 0
8901
8902 ;
8903 return 0;
8904}
8905_ACEOF
8906rm -f conftest.$ac_objext
8907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008908 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008910 grep -v '^ *+' conftest.er1 >conftest.err
8911 rm -f conftest.er1
8912 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8914 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008915 { ac_try='test -z "$ac_c_werror_flag"
8916 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8918 (eval $ac_try) 2>&5
8919 ac_status=$?
8920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8921 (exit $ac_status); }; } &&
8922 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8924 (eval $ac_try) 2>&5
8925 ac_status=$?
8926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8927 (exit $ac_status); }; }; then
8928 ac_hi=$ac_mid
8929else
8930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008931sed 's/^/| /' conftest.$ac_ext >&5
8932
Martin v. Löwis11437992002-04-12 09:54:03 +00008933ac_lo=`expr '(' $ac_mid ')' + 1`
8934fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008935rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008936done
8937case $ac_lo in
8938?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008939'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8940See \`config.log' for more details." >&5
8941echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8942See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 { (exit 1); exit 1; }; } ;;
8944esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008945else
8946 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008947 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8948See \`config.log' for more details." >&5
8949echo "$as_me: error: cannot run test program while cross compiling
8950See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008952else
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008954/* confdefs.h. */
8955_ACEOF
8956cat confdefs.h >>conftest.$ac_ext
8957cat >>conftest.$ac_ext <<_ACEOF
8958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008959$ac_includes_default
8960long longval () { return (long) (sizeof (fpos_t)); }
8961unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008962#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008963#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008964int
8965main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008966{
Martin v. Löwis11437992002-04-12 09:54:03 +00008967
8968 FILE *f = fopen ("conftest.val", "w");
8969 if (! f)
8970 exit (1);
8971 if (((long) (sizeof (fpos_t))) < 0)
8972 {
8973 long i = longval ();
8974 if (i != ((long) (sizeof (fpos_t))))
8975 exit (1);
8976 fprintf (f, "%ld\n", i);
8977 }
8978 else
8979 {
8980 unsigned long i = ulongval ();
8981 if (i != ((long) (sizeof (fpos_t))))
8982 exit (1);
8983 fprintf (f, "%lu\n", i);
8984 }
8985 exit (ferror (f) || fclose (f) != 0);
8986
8987 ;
8988 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008989}
Martin v. Löwis11437992002-04-12 09:54:03 +00008990_ACEOF
8991rm -f conftest$ac_exeext
8992if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8993 (eval $ac_link) 2>&5
8994 ac_status=$?
8995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8996 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8998 (eval $ac_try) 2>&5
8999 ac_status=$?
9000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9001 (exit $ac_status); }; }; then
9002 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009003else
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 echo "$as_me: program exited with status $ac_status" >&5
9005echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009006sed 's/^/| /' conftest.$ac_ext >&5
9007
Martin v. Löwis11437992002-04-12 09:54:03 +00009008( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009009{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9010See \`config.log' for more details." >&5
9011echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9012See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 { (exit 1); exit 1; }; }
9014fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009015rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009016fi
9017fi
9018rm -f conftest.val
9019else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009020 ac_cv_sizeof_fpos_t=0
9021fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009022fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009023echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9024echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
9025cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009026#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009027_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009028
Michael W. Hudson54241132001-12-07 15:38:26 +00009029
9030
Martin v. Löwis11437992002-04-12 09:54:03 +00009031echo "$as_me:$LINENO: checking for long long support" >&5
9032echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009033have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009035/* confdefs.h. */
9036_ACEOF
9037cat confdefs.h >>conftest.$ac_ext
9038cat >>conftest.$ac_ext <<_ACEOF
9039/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009040
Martin v. Löwis11437992002-04-12 09:54:03 +00009041int
9042main ()
9043{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009044long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009045 ;
9046 return 0;
9047}
9048_ACEOF
9049rm -f conftest.$ac_objext
9050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009051 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009053 grep -v '^ *+' conftest.er1 >conftest.err
9054 rm -f conftest.er1
9055 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9057 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009058 { ac_try='test -z "$ac_c_werror_flag"
9059 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9061 (eval $ac_try) 2>&5
9062 ac_status=$?
9063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9064 (exit $ac_status); }; } &&
9065 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9067 (eval $ac_try) 2>&5
9068 ac_status=$?
9069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9070 (exit $ac_status); }; }; then
9071
9072
9073cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009074#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009075_ACEOF
9076
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009077 have_long_long=yes
9078
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009079else
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009081sed 's/^/| /' conftest.$ac_ext >&5
9082
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009085echo "$as_me:$LINENO: result: $have_long_long" >&5
9086echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009087if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009088echo "$as_me:$LINENO: checking for long long" >&5
9089echo $ECHO_N "checking for long long... $ECHO_C" >&6
9090if test "${ac_cv_type_long_long+set}" = set; then
9091 echo $ECHO_N "(cached) $ECHO_C" >&6
9092else
9093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009094/* confdefs.h. */
9095_ACEOF
9096cat confdefs.h >>conftest.$ac_ext
9097cat >>conftest.$ac_ext <<_ACEOF
9098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009099$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009100int
9101main ()
9102{
9103if ((long long *) 0)
9104 return 0;
9105if (sizeof (long long))
9106 return 0;
9107 ;
9108 return 0;
9109}
9110_ACEOF
9111rm -f conftest.$ac_objext
9112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009113 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009115 grep -v '^ *+' conftest.er1 >conftest.err
9116 rm -f conftest.er1
9117 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9119 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009120 { ac_try='test -z "$ac_c_werror_flag"
9121 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9123 (eval $ac_try) 2>&5
9124 ac_status=$?
9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126 (exit $ac_status); }; } &&
9127 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9129 (eval $ac_try) 2>&5
9130 ac_status=$?
9131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9132 (exit $ac_status); }; }; then
9133 ac_cv_type_long_long=yes
9134else
9135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009136sed 's/^/| /' conftest.$ac_ext >&5
9137
Martin v. Löwis11437992002-04-12 09:54:03 +00009138ac_cv_type_long_long=no
9139fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009140rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009141fi
9142echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9143echo "${ECHO_T}$ac_cv_type_long_long" >&6
9144
9145echo "$as_me:$LINENO: checking size of long long" >&5
9146echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9147if test "${ac_cv_sizeof_long_long+set}" = set; then
9148 echo $ECHO_N "(cached) $ECHO_C" >&6
9149else
9150 if test "$ac_cv_type_long_long" = yes; then
9151 # The cast to unsigned long works around a bug in the HP C Compiler
9152 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9153 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9154 # This bug is HP SR number 8606223364.
9155 if test "$cross_compiling" = yes; then
9156 # Depending upon the size, compute the lo and hi bounds.
9157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009158/* confdefs.h. */
9159_ACEOF
9160cat confdefs.h >>conftest.$ac_ext
9161cat >>conftest.$ac_ext <<_ACEOF
9162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009163$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009164int
9165main ()
9166{
9167static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9168test_array [0] = 0
9169
9170 ;
9171 return 0;
9172}
9173_ACEOF
9174rm -f conftest.$ac_objext
9175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009176 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009178 grep -v '^ *+' conftest.er1 >conftest.err
9179 rm -f conftest.er1
9180 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9182 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009183 { ac_try='test -z "$ac_c_werror_flag"
9184 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9186 (eval $ac_try) 2>&5
9187 ac_status=$?
9188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9189 (exit $ac_status); }; } &&
9190 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9192 (eval $ac_try) 2>&5
9193 ac_status=$?
9194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9195 (exit $ac_status); }; }; then
9196 ac_lo=0 ac_mid=0
9197 while :; do
9198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* confdefs.h. */
9200_ACEOF
9201cat confdefs.h >>conftest.$ac_ext
9202cat >>conftest.$ac_ext <<_ACEOF
9203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009204$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009205int
9206main ()
9207{
9208static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9209test_array [0] = 0
9210
9211 ;
9212 return 0;
9213}
9214_ACEOF
9215rm -f conftest.$ac_objext
9216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009217 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009219 grep -v '^ *+' conftest.er1 >conftest.err
9220 rm -f conftest.er1
9221 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009224 { ac_try='test -z "$ac_c_werror_flag"
9225 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9227 (eval $ac_try) 2>&5
9228 ac_status=$?
9229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9230 (exit $ac_status); }; } &&
9231 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9233 (eval $ac_try) 2>&5
9234 ac_status=$?
9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 (exit $ac_status); }; }; then
9237 ac_hi=$ac_mid; break
9238else
9239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009240sed 's/^/| /' conftest.$ac_ext >&5
9241
Martin v. Löwis11437992002-04-12 09:54:03 +00009242ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009243 if test $ac_lo -le $ac_mid; then
9244 ac_lo= ac_hi=
9245 break
9246 fi
9247 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009248fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009249rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009250 done
9251else
9252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009253sed 's/^/| /' conftest.$ac_ext >&5
9254
Martin v. Löwis11437992002-04-12 09:54:03 +00009255cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009256/* confdefs.h. */
9257_ACEOF
9258cat confdefs.h >>conftest.$ac_ext
9259cat >>conftest.$ac_ext <<_ACEOF
9260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009261$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009262int
9263main ()
9264{
9265static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9266test_array [0] = 0
9267
9268 ;
9269 return 0;
9270}
9271_ACEOF
9272rm -f conftest.$ac_objext
9273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009274 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009276 grep -v '^ *+' conftest.er1 >conftest.err
9277 rm -f conftest.er1
9278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9280 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009281 { ac_try='test -z "$ac_c_werror_flag"
9282 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9284 (eval $ac_try) 2>&5
9285 ac_status=$?
9286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9287 (exit $ac_status); }; } &&
9288 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9290 (eval $ac_try) 2>&5
9291 ac_status=$?
9292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9293 (exit $ac_status); }; }; then
9294 ac_hi=-1 ac_mid=-1
9295 while :; do
9296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009297/* confdefs.h. */
9298_ACEOF
9299cat confdefs.h >>conftest.$ac_ext
9300cat >>conftest.$ac_ext <<_ACEOF
9301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009302$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009303int
9304main ()
9305{
9306static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9307test_array [0] = 0
9308
9309 ;
9310 return 0;
9311}
9312_ACEOF
9313rm -f conftest.$ac_objext
9314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009315 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009317 grep -v '^ *+' conftest.er1 >conftest.err
9318 rm -f conftest.er1
9319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9321 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009322 { ac_try='test -z "$ac_c_werror_flag"
9323 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9325 (eval $ac_try) 2>&5
9326 ac_status=$?
9327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); }; } &&
9329 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9331 (eval $ac_try) 2>&5
9332 ac_status=$?
9333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9334 (exit $ac_status); }; }; then
9335 ac_lo=$ac_mid; break
9336else
9337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009338sed 's/^/| /' conftest.$ac_ext >&5
9339
Martin v. Löwis11437992002-04-12 09:54:03 +00009340ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009341 if test $ac_mid -le $ac_hi; then
9342 ac_lo= ac_hi=
9343 break
9344 fi
9345 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009346fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009347rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 done
9349else
9350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009351sed 's/^/| /' conftest.$ac_ext >&5
9352
Martin v. Löwis11437992002-04-12 09:54:03 +00009353ac_lo= ac_hi=
9354fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009356fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009357rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009358# Binary search between lo and hi bounds.
9359while test "x$ac_lo" != "x$ac_hi"; do
9360 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009362/* confdefs.h. */
9363_ACEOF
9364cat confdefs.h >>conftest.$ac_ext
9365cat >>conftest.$ac_ext <<_ACEOF
9366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009367$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009368int
9369main ()
9370{
9371static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9372test_array [0] = 0
9373
9374 ;
9375 return 0;
9376}
9377_ACEOF
9378rm -f conftest.$ac_objext
9379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009380 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009382 grep -v '^ *+' conftest.er1 >conftest.err
9383 rm -f conftest.er1
9384 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9386 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009387 { ac_try='test -z "$ac_c_werror_flag"
9388 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9390 (eval $ac_try) 2>&5
9391 ac_status=$?
9392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9393 (exit $ac_status); }; } &&
9394 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9396 (eval $ac_try) 2>&5
9397 ac_status=$?
9398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399 (exit $ac_status); }; }; then
9400 ac_hi=$ac_mid
9401else
9402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009403sed 's/^/| /' conftest.$ac_ext >&5
9404
Martin v. Löwis11437992002-04-12 09:54:03 +00009405ac_lo=`expr '(' $ac_mid ')' + 1`
9406fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009407rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009408done
9409case $ac_lo in
9410?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009411'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9412See \`config.log' for more details." >&5
9413echo "$as_me: error: cannot compute sizeof (long long), 77
9414See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 { (exit 1); exit 1; }; } ;;
9416esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009417else
9418 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009419 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9420See \`config.log' for more details." >&5
9421echo "$as_me: error: cannot run test program while cross compiling
9422See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009424else
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009426/* confdefs.h. */
9427_ACEOF
9428cat confdefs.h >>conftest.$ac_ext
9429cat >>conftest.$ac_ext <<_ACEOF
9430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009431$ac_includes_default
9432long longval () { return (long) (sizeof (long long)); }
9433unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009434#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009435#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009436int
9437main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009438{
Martin v. Löwis11437992002-04-12 09:54:03 +00009439
9440 FILE *f = fopen ("conftest.val", "w");
9441 if (! f)
9442 exit (1);
9443 if (((long) (sizeof (long long))) < 0)
9444 {
9445 long i = longval ();
9446 if (i != ((long) (sizeof (long long))))
9447 exit (1);
9448 fprintf (f, "%ld\n", i);
9449 }
9450 else
9451 {
9452 unsigned long i = ulongval ();
9453 if (i != ((long) (sizeof (long long))))
9454 exit (1);
9455 fprintf (f, "%lu\n", i);
9456 }
9457 exit (ferror (f) || fclose (f) != 0);
9458
9459 ;
9460 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009461}
Martin v. Löwis11437992002-04-12 09:54:03 +00009462_ACEOF
9463rm -f conftest$ac_exeext
9464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9465 (eval $ac_link) 2>&5
9466 ac_status=$?
9467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9470 (eval $ac_try) 2>&5
9471 ac_status=$?
9472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473 (exit $ac_status); }; }; then
9474 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009475else
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 echo "$as_me: program exited with status $ac_status" >&5
9477echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009478sed 's/^/| /' conftest.$ac_ext >&5
9479
Martin v. Löwis11437992002-04-12 09:54:03 +00009480( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009481{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9482See \`config.log' for more details." >&5
9483echo "$as_me: error: cannot compute sizeof (long long), 77
9484See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 { (exit 1); exit 1; }; }
9486fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009487rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009488fi
9489fi
9490rm -f conftest.val
9491else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009492 ac_cv_sizeof_long_long=0
9493fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009494fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009495echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9496echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9497cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009498#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009499_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009500
Michael W. Hudson54241132001-12-07 15:38:26 +00009501
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009502fi
9503
Martin v. Löwis11437992002-04-12 09:54:03 +00009504echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9505echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009506have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009508/* confdefs.h. */
9509_ACEOF
9510cat confdefs.h >>conftest.$ac_ext
9511cat >>conftest.$ac_ext <<_ACEOF
9512/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009513
Martin v. Löwis11437992002-04-12 09:54:03 +00009514int
9515main ()
9516{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009517uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ;
9519 return 0;
9520}
9521_ACEOF
9522rm -f conftest.$ac_objext
9523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009524 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009526 grep -v '^ *+' conftest.er1 >conftest.err
9527 rm -f conftest.er1
9528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9530 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009531 { ac_try='test -z "$ac_c_werror_flag"
9532 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9534 (eval $ac_try) 2>&5
9535 ac_status=$?
9536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9537 (exit $ac_status); }; } &&
9538 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9540 (eval $ac_try) 2>&5
9541 ac_status=$?
9542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9543 (exit $ac_status); }; }; then
9544
9545
9546cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009547#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009548_ACEOF
9549
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009550 have_uintptr_t=yes
9551
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009552else
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009554sed 's/^/| /' conftest.$ac_ext >&5
9555
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009556fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009557rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009558echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9559echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009560if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009561echo "$as_me:$LINENO: checking for uintptr_t" >&5
9562echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9563if test "${ac_cv_type_uintptr_t+set}" = set; then
9564 echo $ECHO_N "(cached) $ECHO_C" >&6
9565else
9566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009567/* confdefs.h. */
9568_ACEOF
9569cat confdefs.h >>conftest.$ac_ext
9570cat >>conftest.$ac_ext <<_ACEOF
9571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009572$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009573int
9574main ()
9575{
9576if ((uintptr_t *) 0)
9577 return 0;
9578if (sizeof (uintptr_t))
9579 return 0;
9580 ;
9581 return 0;
9582}
9583_ACEOF
9584rm -f conftest.$ac_objext
9585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009586 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009588 grep -v '^ *+' conftest.er1 >conftest.err
9589 rm -f conftest.er1
9590 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9592 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009593 { ac_try='test -z "$ac_c_werror_flag"
9594 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9596 (eval $ac_try) 2>&5
9597 ac_status=$?
9598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9599 (exit $ac_status); }; } &&
9600 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9602 (eval $ac_try) 2>&5
9603 ac_status=$?
9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605 (exit $ac_status); }; }; then
9606 ac_cv_type_uintptr_t=yes
9607else
9608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009609sed 's/^/| /' conftest.$ac_ext >&5
9610
Martin v. Löwis11437992002-04-12 09:54:03 +00009611ac_cv_type_uintptr_t=no
9612fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009613rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009614fi
9615echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9616echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9617
9618echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9619echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9620if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9621 echo $ECHO_N "(cached) $ECHO_C" >&6
9622else
9623 if test "$ac_cv_type_uintptr_t" = yes; then
9624 # The cast to unsigned long works around a bug in the HP C Compiler
9625 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9626 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9627 # This bug is HP SR number 8606223364.
9628 if test "$cross_compiling" = yes; then
9629 # Depending upon the size, compute the lo and hi bounds.
9630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009631/* confdefs.h. */
9632_ACEOF
9633cat confdefs.h >>conftest.$ac_ext
9634cat >>conftest.$ac_ext <<_ACEOF
9635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009636$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009637int
9638main ()
9639{
9640static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9641test_array [0] = 0
9642
9643 ;
9644 return 0;
9645}
9646_ACEOF
9647rm -f conftest.$ac_objext
9648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009649 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009651 grep -v '^ *+' conftest.er1 >conftest.err
9652 rm -f conftest.er1
9653 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009656 { ac_try='test -z "$ac_c_werror_flag"
9657 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9659 (eval $ac_try) 2>&5
9660 ac_status=$?
9661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9662 (exit $ac_status); }; } &&
9663 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9665 (eval $ac_try) 2>&5
9666 ac_status=$?
9667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9668 (exit $ac_status); }; }; then
9669 ac_lo=0 ac_mid=0
9670 while :; do
9671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* confdefs.h. */
9673_ACEOF
9674cat confdefs.h >>conftest.$ac_ext
9675cat >>conftest.$ac_ext <<_ACEOF
9676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009678int
9679main ()
9680{
9681static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9682test_array [0] = 0
9683
9684 ;
9685 return 0;
9686}
9687_ACEOF
9688rm -f conftest.$ac_objext
9689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009690 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009692 grep -v '^ *+' conftest.er1 >conftest.err
9693 rm -f conftest.er1
9694 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9696 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009697 { ac_try='test -z "$ac_c_werror_flag"
9698 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9700 (eval $ac_try) 2>&5
9701 ac_status=$?
9702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9703 (exit $ac_status); }; } &&
9704 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9706 (eval $ac_try) 2>&5
9707 ac_status=$?
9708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9709 (exit $ac_status); }; }; then
9710 ac_hi=$ac_mid; break
9711else
9712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009713sed 's/^/| /' conftest.$ac_ext >&5
9714
Martin v. Löwis11437992002-04-12 09:54:03 +00009715ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009716 if test $ac_lo -le $ac_mid; then
9717 ac_lo= ac_hi=
9718 break
9719 fi
9720 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009721fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009722rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 done
9724else
9725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009726sed 's/^/| /' conftest.$ac_ext >&5
9727
Martin v. Löwis11437992002-04-12 09:54:03 +00009728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009729/* confdefs.h. */
9730_ACEOF
9731cat confdefs.h >>conftest.$ac_ext
9732cat >>conftest.$ac_ext <<_ACEOF
9733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009734$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009735int
9736main ()
9737{
9738static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9739test_array [0] = 0
9740
9741 ;
9742 return 0;
9743}
9744_ACEOF
9745rm -f conftest.$ac_objext
9746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009747 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009749 grep -v '^ *+' conftest.er1 >conftest.err
9750 rm -f conftest.er1
9751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9753 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009754 { ac_try='test -z "$ac_c_werror_flag"
9755 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9757 (eval $ac_try) 2>&5
9758 ac_status=$?
9759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9760 (exit $ac_status); }; } &&
9761 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9763 (eval $ac_try) 2>&5
9764 ac_status=$?
9765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766 (exit $ac_status); }; }; then
9767 ac_hi=-1 ac_mid=-1
9768 while :; do
9769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009770/* confdefs.h. */
9771_ACEOF
9772cat confdefs.h >>conftest.$ac_ext
9773cat >>conftest.$ac_ext <<_ACEOF
9774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009775$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009776int
9777main ()
9778{
9779static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9780test_array [0] = 0
9781
9782 ;
9783 return 0;
9784}
9785_ACEOF
9786rm -f conftest.$ac_objext
9787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009788 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009790 grep -v '^ *+' conftest.er1 >conftest.err
9791 rm -f conftest.er1
9792 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9794 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009795 { ac_try='test -z "$ac_c_werror_flag"
9796 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9798 (eval $ac_try) 2>&5
9799 ac_status=$?
9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); }; } &&
9802 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9804 (eval $ac_try) 2>&5
9805 ac_status=$?
9806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9807 (exit $ac_status); }; }; then
9808 ac_lo=$ac_mid; break
9809else
9810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009811sed 's/^/| /' conftest.$ac_ext >&5
9812
Martin v. Löwis11437992002-04-12 09:54:03 +00009813ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009814 if test $ac_mid -le $ac_hi; then
9815 ac_lo= ac_hi=
9816 break
9817 fi
9818 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009819fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009820rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 done
9822else
9823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009824sed 's/^/| /' conftest.$ac_ext >&5
9825
Martin v. Löwis11437992002-04-12 09:54:03 +00009826ac_lo= ac_hi=
9827fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009828rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009829fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009830rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009831# Binary search between lo and hi bounds.
9832while test "x$ac_lo" != "x$ac_hi"; do
9833 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009835/* confdefs.h. */
9836_ACEOF
9837cat confdefs.h >>conftest.$ac_ext
9838cat >>conftest.$ac_ext <<_ACEOF
9839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009840$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009841int
9842main ()
9843{
9844static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9845test_array [0] = 0
9846
9847 ;
9848 return 0;
9849}
9850_ACEOF
9851rm -f conftest.$ac_objext
9852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009853 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009855 grep -v '^ *+' conftest.er1 >conftest.err
9856 rm -f conftest.er1
9857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9859 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009860 { ac_try='test -z "$ac_c_werror_flag"
9861 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9863 (eval $ac_try) 2>&5
9864 ac_status=$?
9865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9866 (exit $ac_status); }; } &&
9867 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9869 (eval $ac_try) 2>&5
9870 ac_status=$?
9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872 (exit $ac_status); }; }; then
9873 ac_hi=$ac_mid
9874else
9875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009876sed 's/^/| /' conftest.$ac_ext >&5
9877
Martin v. Löwis11437992002-04-12 09:54:03 +00009878ac_lo=`expr '(' $ac_mid ')' + 1`
9879fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009880rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009881done
9882case $ac_lo in
9883?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009884'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9885See \`config.log' for more details." >&5
9886echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9887See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 { (exit 1); exit 1; }; } ;;
9889esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009890else
9891 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009892 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9893See \`config.log' for more details." >&5
9894echo "$as_me: error: cannot run test program while cross compiling
9895See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009897else
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009899/* confdefs.h. */
9900_ACEOF
9901cat confdefs.h >>conftest.$ac_ext
9902cat >>conftest.$ac_ext <<_ACEOF
9903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009904$ac_includes_default
9905long longval () { return (long) (sizeof (uintptr_t)); }
9906unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009907#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009908#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009909int
9910main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009911{
Martin v. Löwis11437992002-04-12 09:54:03 +00009912
9913 FILE *f = fopen ("conftest.val", "w");
9914 if (! f)
9915 exit (1);
9916 if (((long) (sizeof (uintptr_t))) < 0)
9917 {
9918 long i = longval ();
9919 if (i != ((long) (sizeof (uintptr_t))))
9920 exit (1);
9921 fprintf (f, "%ld\n", i);
9922 }
9923 else
9924 {
9925 unsigned long i = ulongval ();
9926 if (i != ((long) (sizeof (uintptr_t))))
9927 exit (1);
9928 fprintf (f, "%lu\n", i);
9929 }
9930 exit (ferror (f) || fclose (f) != 0);
9931
9932 ;
9933 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009934}
Martin v. Löwis11437992002-04-12 09:54:03 +00009935_ACEOF
9936rm -f conftest$ac_exeext
9937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9938 (eval $ac_link) 2>&5
9939 ac_status=$?
9940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9943 (eval $ac_try) 2>&5
9944 ac_status=$?
9945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9946 (exit $ac_status); }; }; then
9947 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009948else
Martin v. Löwis11437992002-04-12 09:54:03 +00009949 echo "$as_me: program exited with status $ac_status" >&5
9950echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009951sed 's/^/| /' conftest.$ac_ext >&5
9952
Martin v. Löwis11437992002-04-12 09:54:03 +00009953( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009954{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9955See \`config.log' for more details." >&5
9956echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9957See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009958 { (exit 1); exit 1; }; }
9959fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009960rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009961fi
9962fi
9963rm -f conftest.val
9964else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009965 ac_cv_sizeof_uintptr_t=0
9966fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009967fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009968echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9969echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9970cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009971#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009972_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009973
Michael W. Hudson54241132001-12-07 15:38:26 +00009974
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009975fi
9976
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009977# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009978echo "$as_me:$LINENO: checking size of off_t" >&5
9979echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9980if test "${ac_cv_sizeof_off_t+set}" = set; then
9981 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009982else
9983 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009984 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009985else
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009987/* confdefs.h. */
9988_ACEOF
9989cat confdefs.h >>conftest.$ac_ext
9990cat >>conftest.$ac_ext <<_ACEOF
9991/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009992#include <stdio.h>
9993#include <sys/types.h>
9994main()
9995{
9996 FILE *f=fopen("conftestval", "w");
9997 if (!f) exit(1);
9998 fprintf(f, "%d\n", sizeof(off_t));
9999 exit(0);
10000}
Martin v. Löwis11437992002-04-12 09:54:03 +000010001_ACEOF
10002rm -f conftest$ac_exeext
10003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10004 (eval $ac_link) 2>&5
10005 ac_status=$?
10006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10009 (eval $ac_try) 2>&5
10010 ac_status=$?
10011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010013 ac_cv_sizeof_off_t=`cat conftestval`
10014else
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 echo "$as_me: program exited with status $ac_status" >&5
10016echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010017sed 's/^/| /' conftest.$ac_ext >&5
10018
Martin v. Löwis11437992002-04-12 09:54:03 +000010019( exit $ac_status )
10020ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010021fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010022rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010023fi
10024
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010025fi
10026
Martin v. Löwis11437992002-04-12 09:54:03 +000010027echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
10028echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
10029
10030cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010031#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010032_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010033
Michael W. Hudson54241132001-12-07 15:38:26 +000010034
Martin v. Löwis11437992002-04-12 09:54:03 +000010035echo "$as_me:$LINENO: checking whether to enable large file support" >&5
10036echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010037if test "$have_long_long" = yes -a \
10038 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
10039 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010040
Martin v. Löwis11437992002-04-12 09:54:03 +000010041cat >>confdefs.h <<\_ACEOF
10042#define HAVE_LARGEFILE_SUPPORT 1
10043_ACEOF
10044
10045 echo "$as_me:$LINENO: result: yes" >&5
10046echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 echo "$as_me:$LINENO: result: no" >&5
10049echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010050fi
10051
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010052# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010053echo "$as_me:$LINENO: checking size of time_t" >&5
10054echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
10055if test "${ac_cv_sizeof_time_t+set}" = set; then
10056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010057else
10058 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010059 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010060else
Martin v. Löwis11437992002-04-12 09:54:03 +000010061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010062/* confdefs.h. */
10063_ACEOF
10064cat confdefs.h >>conftest.$ac_ext
10065cat >>conftest.$ac_ext <<_ACEOF
10066/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010067#include <stdio.h>
10068#include <time.h>
10069main()
10070{
10071 FILE *f=fopen("conftestval", "w");
10072 if (!f) exit(1);
10073 fprintf(f, "%d\n", sizeof(time_t));
10074 exit(0);
10075}
Martin v. Löwis11437992002-04-12 09:54:03 +000010076_ACEOF
10077rm -f conftest$ac_exeext
10078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10079 (eval $ac_link) 2>&5
10080 ac_status=$?
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10084 (eval $ac_try) 2>&5
10085 ac_status=$?
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010088 ac_cv_sizeof_time_t=`cat conftestval`
10089else
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 echo "$as_me: program exited with status $ac_status" >&5
10091echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010092sed 's/^/| /' conftest.$ac_ext >&5
10093
Martin v. Löwis11437992002-04-12 09:54:03 +000010094( exit $ac_status )
10095ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010096fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010097rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010098fi
10099
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010100fi
10101
Martin v. Löwis11437992002-04-12 09:54:03 +000010102echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10103echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10104
10105cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010106#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010107_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010108
Michael W. Hudson54241132001-12-07 15:38:26 +000010109
10110
Trent Mick635f6fb2000-08-23 21:33:05 +000010111# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010112ac_save_cc="$CC"
10113if test "$ac_cv_kpthread" = "yes"
10114then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010115elif test "$ac_cv_kthread" = "yes"
10116then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010117elif test "$ac_cv_pthread" = "yes"
10118then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010120echo "$as_me:$LINENO: checking for pthread_t" >&5
10121echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010122have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010124/* confdefs.h. */
10125_ACEOF
10126cat confdefs.h >>conftest.$ac_ext
10127cat >>conftest.$ac_ext <<_ACEOF
10128/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010129#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010130int
10131main ()
10132{
Guido van Rossum12580492000-09-24 16:47:19 +000010133pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 ;
10135 return 0;
10136}
10137_ACEOF
10138rm -f conftest.$ac_objext
10139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010140 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010142 grep -v '^ *+' conftest.er1 >conftest.err
10143 rm -f conftest.er1
10144 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10146 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010147 { ac_try='test -z "$ac_c_werror_flag"
10148 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10150 (eval $ac_try) 2>&5
10151 ac_status=$?
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); }; } &&
10154 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10156 (eval $ac_try) 2>&5
10157 ac_status=$?
10158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10159 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010160 have_pthread_t=yes
10161else
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010163sed 's/^/| /' conftest.$ac_ext >&5
10164
Trent Mick635f6fb2000-08-23 21:33:05 +000010165fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010166rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010167echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10168echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010169if test "$have_pthread_t" = yes ; then
10170 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10172echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10173 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10174 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010175else
10176 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010177 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010178else
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010180/* confdefs.h. */
10181_ACEOF
10182cat confdefs.h >>conftest.$ac_ext
10183cat >>conftest.$ac_ext <<_ACEOF
10184/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010185#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010186#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010187 main()
10188 {
10189 FILE *f=fopen("conftestval", "w");
10190 if (!f) exit(1);
10191 fprintf(f, "%d\n", sizeof(pthread_t));
10192 exit(0);
10193 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010194_ACEOF
10195rm -f conftest$ac_exeext
10196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10197 (eval $ac_link) 2>&5
10198 ac_status=$?
10199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10202 (eval $ac_try) 2>&5
10203 ac_status=$?
10204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10205 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010206 ac_cv_sizeof_pthread_t=`cat conftestval`
10207else
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 echo "$as_me: program exited with status $ac_status" >&5
10209echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010210sed 's/^/| /' conftest.$ac_ext >&5
10211
Martin v. Löwis11437992002-04-12 09:54:03 +000010212( exit $ac_status )
10213ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010214fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010215rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010216fi
10217
Trent Mick635f6fb2000-08-23 21:33:05 +000010218fi
10219
Martin v. Löwis11437992002-04-12 09:54:03 +000010220 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10221echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10222
10223cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010224#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010225_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010226
10227fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010228CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010229
Martin v. Löwis11437992002-04-12 09:54:03 +000010230echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10231echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010232# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10233if test "${enable_toolbox_glue+set}" = set; then
10234 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010235
Martin v. Löwis11437992002-04-12 09:54:03 +000010236fi;
Jack Jansene578a632001-08-15 01:27:14 +000010237
10238if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010239then
Jack Jansene578a632001-08-15 01:27:14 +000010240 case $ac_sys_system/$ac_sys_release in
10241 Darwin/*)
10242 enable_toolbox_glue="yes";;
10243 *)
10244 enable_toolbox_glue="no";;
10245 esac
10246fi
10247case "$enable_toolbox_glue" in
10248yes)
Jack Jansene578a632001-08-15 01:27:14 +000010249 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010250 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010251
10252cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010253#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010254_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010255
10256 ;;
10257*)
Jack Jansene578a632001-08-15 01:27:14 +000010258 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010259 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010260 ;;
10261esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010262echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10263echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010264
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010265
10266case $ac_sys_system/$ac_sys_release in
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010267 Darwin/[01234567].*)
10268 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10269 ;;
10270 Darwin/*)
10271 OTHER_LIBTOOL_OPT=""
10272 ;;
10273esac
10274
10275
10276case $ac_sys_system/$ac_sys_release in
10277 Darwin/[01234567].*)
10278 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only ppc"
Jack Jansenb36687a2004-07-16 08:43:47 +000010279 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010280 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010281 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010282 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10283 if test ${gcc_version} '<' 4.0
10284 then
10285 LIBTOOL_CRUFT="-lcc_dynamic"
10286 else
10287 LIBTOOL_CRUFT=""
10288 fi
10289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
Jack Jansenb36687a2004-07-16 08:43:47 +000010290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010292esac
10293
Martin v. Löwis11437992002-04-12 09:54:03 +000010294echo "$as_me:$LINENO: checking for --enable-framework" >&5
10295echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010296if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010297then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010298 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010300 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010301
Martin v. Löwis11437992002-04-12 09:54:03 +000010302cat >>confdefs.h <<\_ACEOF
10303#define WITH_NEXT_FRAMEWORK 1
10304_ACEOF
10305
10306 echo "$as_me:$LINENO: result: yes" >&5
10307echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010308else
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 echo "$as_me:$LINENO: result: no" >&5
10310echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010311fi
10312
Martin v. Löwis11437992002-04-12 09:54:03 +000010313echo "$as_me:$LINENO: checking for dyld" >&5
10314echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010315case $ac_sys_system/$ac_sys_release in
10316 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010317
Martin v. Löwis11437992002-04-12 09:54:03 +000010318cat >>confdefs.h <<\_ACEOF
10319#define WITH_DYLD 1
10320_ACEOF
10321
10322 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10323echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010324 ;;
10325 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 echo "$as_me:$LINENO: result: no" >&5
10327echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010328 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010329esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010330
Guido van Rossum0a516c91994-09-12 10:58:40 +000010331# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010332
Michael W. Hudson54241132001-12-07 15:38:26 +000010333
10334
10335
10336
Guido van Rossum0a516c91994-09-12 10:58:40 +000010337# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010338# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010339echo "$as_me:$LINENO: checking SO" >&5
10340echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010341if test -z "$SO"
10342then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010343 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010344 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010345 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010346 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010347 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010348else
10349 # this might also be a termcap variable, see #610332
10350 echo
10351 echo '====================================================================='
10352 echo '+ +'
10353 echo '+ WARNING: You have set SO in your environment. +'
10354 echo '+ Do you really mean to change the extension for shared libraries? +'
10355 echo '+ Continuing in 10 seconds to let you to ponder. +'
10356 echo '+ +'
10357 echo '====================================================================='
10358 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010359fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010360echo "$as_me:$LINENO: result: $SO" >&5
10361echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010362# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010363# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010364# (Shared libraries in this instance are shared modules to be loaded into
10365# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010366echo "$as_me:$LINENO: checking LDSHARED" >&5
10367echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010368if test -z "$LDSHARED"
10369then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010370 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010371 AIX*)
10372 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010373 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010374 ;;
10375 BeOS*)
10376 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010377 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010378 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010379 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010380 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010382 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010383 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010384 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010385 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010386 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010387 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010388 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010389 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10390 if test "$enable_framework" ; then
10391 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010392 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10393 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010394 else
10395 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010396 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010397 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010398 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010399 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10400 if test "$enable_framework" ; then
10401 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010402 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10403 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010404 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010405 # No framework, use the Python app as bundle-loader
10406 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010407 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010408 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010409 Darwin/*)
10410 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10411 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010412 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010413 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010414 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010415 then
10416 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10417 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010418 else
10419 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10420 if test "$enable_framework" ; then
10421 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010422 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10423 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010424 else
10425 # No framework, use the Python app as bundle-loader
10426 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10427 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10428 fi
10429 fi
10430 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010431 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010432 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010433 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010434 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010435 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010436 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010437 else
10438 LDSHARED="ld -Bshareable ${LDFLAGS}"
10439 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010440 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010441 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010442 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010443 then LDSHARED='$(CC) -shared'
10444 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010445 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010446 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010447 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010448 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010449 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010450 *) LDSHARED="ld";;
10451 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010452fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010453echo "$as_me:$LINENO: result: $LDSHARED" >&5
10454echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010455BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010456# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010457# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010458echo "$as_me:$LINENO: checking CCSHARED" >&5
10459echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010460if test -z "$CCSHARED"
10461then
Guido van Rossum07397971997-04-29 21:49:50 +000010462 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010463 SunOS*) if test "$GCC" = yes;
10464 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000010465 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010466 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010467 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010468 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010469 else CCSHARED="+z";
10470 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010471 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010472 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010473 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010474 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010475 if test "$GCC" = "yes"
10476 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010477 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010478 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010479 SCO_SV*)
10480 if test "$GCC" = "yes"
10481 then CCSHARED="-fPIC"
10482 else CCSHARED="-Kpic -belf"
10483 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010484 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010485 IRIX*/6*) case $CC in
10486 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010487 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010488 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010489 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010490 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010491fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010492echo "$as_me:$LINENO: result: $CCSHARED" >&5
10493echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010494# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010495# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010496echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10497echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010498if test -z "$LINKFORSHARED"
10499then
Guido van Rossum07397971997-04-29 21:49:50 +000010500 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010501 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010502 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010503 LINKFORSHARED="-Wl,-E -Wl,+s";;
10504# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010505 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010506 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010507 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010508 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010509 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
10510 # which is
Jack Jansene578a632001-08-15 01:27:14 +000010511 # not used by the core itself but which needs to be in the core so
10512 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010513 # -prebind is no longer used, because it actually seems to give a
10514 # slowdown in stead of a speedup, maybe due to the large number of
10515 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010516
10517 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000010518 if test "$enable_framework"
10519 then
Jack Jansenda49e192005-01-07 13:08:22 +000010520 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010521 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010522 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010523 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010524 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010525 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010527 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10528 then
10529 LINKFORSHARED="-Wl,--export-dynamic"
10530 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010531 SunOS/5*) case $CC in
10532 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010533 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010534 then
10535 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010536 fi;;
10537 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010538 CYGWIN*)
10539 if test $enable_shared = "no"
10540 then
10541 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10542 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010543 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010545echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10546echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010547
Michael W. Hudson54241132001-12-07 15:38:26 +000010548
Martin v. Löwis11437992002-04-12 09:54:03 +000010549echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10550echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010551if test ! "$LIBRARY" = "$LDLIBRARY"
10552then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010553 case $ac_sys_system in
10554 CYGWIN*)
10555 # Cygwin needs CCSHARED when building extension DLLs
10556 # but not when building the interpreter DLL.
10557 CFLAGSFORSHARED='';;
10558 *)
10559 CFLAGSFORSHARED='$(CCSHARED)'
10560 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010562echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10563echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010564
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010565# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10566# library (with --enable-shared).
10567# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010568# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10569# if it is not required, since it creates a dependency of the shared library
10570# to LIBS. This, in turn, means that applications linking the shared libpython
10571# don't need to link LIBS explicitly. The default should be only changed
10572# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010573
10574echo "$as_me:$LINENO: checking SHLIBS" >&5
10575echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10576case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010577 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010578 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010579esac
10580echo "$as_me:$LINENO: result: $SHLIBS" >&5
10581echo "${ECHO_T}$SHLIBS" >&6
10582
10583
Guido van Rossum627b2d71993-12-24 10:39:16 +000010584# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010585
10586echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10587echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10588if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590else
Martin v. Löwis11437992002-04-12 09:54:03 +000010591 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010592LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* confdefs.h. */
10595_ACEOF
10596cat confdefs.h >>conftest.$ac_ext
10597cat >>conftest.$ac_ext <<_ACEOF
10598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010599
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010600/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010601#ifdef __cplusplus
10602extern "C"
10603#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010604/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 builtin and then its argument prototype would still apply. */
10606char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010607int
10608main ()
10609{
10610dlopen ();
10611 ;
10612 return 0;
10613}
10614_ACEOF
10615rm -f conftest.$ac_objext conftest$ac_exeext
10616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010617 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010619 grep -v '^ *+' conftest.er1 >conftest.err
10620 rm -f conftest.er1
10621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10623 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010624 { ac_try='test -z "$ac_c_werror_flag"
10625 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10627 (eval $ac_try) 2>&5
10628 ac_status=$?
10629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10630 (exit $ac_status); }; } &&
10631 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10633 (eval $ac_try) 2>&5
10634 ac_status=$?
10635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10636 (exit $ac_status); }; }; then
10637 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010638else
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010640sed 's/^/| /' conftest.$ac_ext >&5
10641
Martin v. Löwis11437992002-04-12 09:54:03 +000010642ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010643fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010644rm -f conftest.err conftest.$ac_objext \
10645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010648echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10649echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10650if test $ac_cv_lib_dl_dlopen = yes; then
10651 cat >>confdefs.h <<_ACEOF
10652#define HAVE_LIBDL 1
10653_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010654
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010655 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010656
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010657fi
10658 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010659
10660echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10661echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10662if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010664else
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010666LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010668/* confdefs.h. */
10669_ACEOF
10670cat confdefs.h >>conftest.$ac_ext
10671cat >>conftest.$ac_ext <<_ACEOF
10672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010673
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010674/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010675#ifdef __cplusplus
10676extern "C"
10677#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010678/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 builtin and then its argument prototype would still apply. */
10680char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010681int
10682main ()
10683{
10684shl_load ();
10685 ;
10686 return 0;
10687}
10688_ACEOF
10689rm -f conftest.$ac_objext conftest$ac_exeext
10690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010691 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010693 grep -v '^ *+' conftest.er1 >conftest.err
10694 rm -f conftest.er1
10695 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10697 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010698 { ac_try='test -z "$ac_c_werror_flag"
10699 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10701 (eval $ac_try) 2>&5
10702 ac_status=$?
10703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10704 (exit $ac_status); }; } &&
10705 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10707 (eval $ac_try) 2>&5
10708 ac_status=$?
10709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10710 (exit $ac_status); }; }; then
10711 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010712else
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010714sed 's/^/| /' conftest.$ac_ext >&5
10715
Martin v. Löwis11437992002-04-12 09:54:03 +000010716ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010717fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010718rm -f conftest.err conftest.$ac_objext \
10719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010720LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010722echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10723echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10724if test $ac_cv_lib_dld_shl_load = yes; then
10725 cat >>confdefs.h <<_ACEOF
10726#define HAVE_LIBDLD 1
10727_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010728
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010729 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010730
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010731fi
10732 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010733
10734# only check for sem_ini if thread support is requested
10735if test "$with_threads" = "yes" -o -z "$with_threads"; then
10736 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010737echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10738if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010740else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010741 ac_func_search_save_LIBS=$LIBS
10742ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010744/* confdefs.h. */
10745_ACEOF
10746cat confdefs.h >>conftest.$ac_ext
10747cat >>conftest.$ac_ext <<_ACEOF
10748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010749
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010750/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751#ifdef __cplusplus
10752extern "C"
10753#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010754/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 builtin and then its argument prototype would still apply. */
10756char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010757int
10758main ()
10759{
10760sem_init ();
10761 ;
10762 return 0;
10763}
10764_ACEOF
10765rm -f conftest.$ac_objext conftest$ac_exeext
10766if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010767 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010769 grep -v '^ *+' conftest.er1 >conftest.err
10770 rm -f conftest.er1
10771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10773 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010774 { ac_try='test -z "$ac_c_werror_flag"
10775 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10777 (eval $ac_try) 2>&5
10778 ac_status=$?
10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10780 (exit $ac_status); }; } &&
10781 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10783 (eval $ac_try) 2>&5
10784 ac_status=$?
10785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10786 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010787 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010788else
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010790sed 's/^/| /' conftest.$ac_ext >&5
10791
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010792fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010793rm -f conftest.err conftest.$ac_objext \
10794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010795if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010796 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010797 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* confdefs.h. */
10800_ACEOF
10801cat confdefs.h >>conftest.$ac_ext
10802cat >>conftest.$ac_ext <<_ACEOF
10803/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010804
10805/* Override any gcc2 internal prototype to avoid an error. */
10806#ifdef __cplusplus
10807extern "C"
10808#endif
10809/* We use char because int might match the return type of a gcc2
10810 builtin and then its argument prototype would still apply. */
10811char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010812int
10813main ()
10814{
10815sem_init ();
10816 ;
10817 return 0;
10818}
Martin v. Löwis11437992002-04-12 09:54:03 +000010819_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010820rm -f conftest.$ac_objext conftest$ac_exeext
10821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010822 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010824 grep -v '^ *+' conftest.er1 >conftest.err
10825 rm -f conftest.er1
10826 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10828 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010829 { ac_try='test -z "$ac_c_werror_flag"
10830 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10832 (eval $ac_try) 2>&5
10833 ac_status=$?
10834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10835 (exit $ac_status); }; } &&
10836 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10838 (eval $ac_try) 2>&5
10839 ac_status=$?
10840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10841 (exit $ac_status); }; }; then
10842 ac_cv_search_sem_init="-l$ac_lib"
10843break
10844else
10845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010846sed 's/^/| /' conftest.$ac_ext >&5
10847
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010848fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010849rm -f conftest.err conftest.$ac_objext \
10850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010851 done
10852fi
10853LIBS=$ac_func_search_save_LIBS
10854fi
10855echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10856echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10857if test "$ac_cv_search_sem_init" != no; then
10858 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010859
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010860fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010861 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010862 # posix4 on Solaris 2.6
10863 # pthread (first!) on Linux
10864fi
10865
Martin v. Löwis19d17342003-06-14 21:03:05 +000010866# check if we need libintl for locale functions
10867echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10868echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10869if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10870 echo $ECHO_N "(cached) $ECHO_C" >&6
10871else
10872 ac_check_lib_save_LIBS=$LIBS
10873LIBS="-lintl $LIBS"
10874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010875/* confdefs.h. */
10876_ACEOF
10877cat confdefs.h >>conftest.$ac_ext
10878cat >>conftest.$ac_ext <<_ACEOF
10879/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010880
10881/* Override any gcc2 internal prototype to avoid an error. */
10882#ifdef __cplusplus
10883extern "C"
10884#endif
10885/* We use char because int might match the return type of a gcc2
10886 builtin and then its argument prototype would still apply. */
10887char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010888int
10889main ()
10890{
10891textdomain ();
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896rm -f conftest.$ac_objext conftest$ac_exeext
10897if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010898 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000010899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010900 grep -v '^ *+' conftest.er1 >conftest.err
10901 rm -f conftest.er1
10902 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10904 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010905 { ac_try='test -z "$ac_c_werror_flag"
10906 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10908 (eval $ac_try) 2>&5
10909 ac_status=$?
10910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10911 (exit $ac_status); }; } &&
10912 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000010913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10914 (eval $ac_try) 2>&5
10915 ac_status=$?
10916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10917 (exit $ac_status); }; }; then
10918 ac_cv_lib_intl_textdomain=yes
10919else
10920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010921sed 's/^/| /' conftest.$ac_ext >&5
10922
Martin v. Löwis19d17342003-06-14 21:03:05 +000010923ac_cv_lib_intl_textdomain=no
10924fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010925rm -f conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010927LIBS=$ac_check_lib_save_LIBS
10928fi
10929echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10930echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10931if test $ac_cv_lib_intl_textdomain = yes; then
10932
10933cat >>confdefs.h <<\_ACEOF
10934#define WITH_LIBINTL 1
10935_ACEOF
10936
10937fi
10938
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010939
10940# checks for system dependent C++ extensions support
10941case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010942 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10943echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010945/* confdefs.h. */
10946_ACEOF
10947cat confdefs.h >>conftest.$ac_ext
10948cat >>conftest.$ac_ext <<_ACEOF
10949/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010950#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010951int
10952main ()
10953{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010954loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 ;
10956 return 0;
10957}
10958_ACEOF
10959rm -f conftest.$ac_objext conftest$ac_exeext
10960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010961 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010963 grep -v '^ *+' conftest.er1 >conftest.err
10964 rm -f conftest.er1
10965 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10967 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010968 { ac_try='test -z "$ac_c_werror_flag"
10969 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10971 (eval $ac_try) 2>&5
10972 ac_status=$?
10973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10974 (exit $ac_status); }; } &&
10975 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10977 (eval $ac_try) 2>&5
10978 ac_status=$?
10979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10980 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982cat >>confdefs.h <<\_ACEOF
10983#define AIX_GENUINE_CPLUSPLUS 1
10984_ACEOF
10985
10986 echo "$as_me:$LINENO: result: yes" >&5
10987echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010988else
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010990sed 's/^/| /' conftest.$ac_ext >&5
10991
Martin v. Löwis11437992002-04-12 09:54:03 +000010992echo "$as_me:$LINENO: result: no" >&5
10993echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010994fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010995rm -f conftest.err conftest.$ac_objext \
10996 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010997 *) ;;
10998esac
10999
Guido van Rossum70c7f481998-03-26 18:44:10 +000011000# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011001# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000011002echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
11003echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
11004if test "${ac_cv_lib_nsl_t_open+set}" = set; then
11005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011006else
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011008LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011010/* confdefs.h. */
11011_ACEOF
11012cat confdefs.h >>conftest.$ac_ext
11013cat >>conftest.$ac_ext <<_ACEOF
11014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011015
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011016/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011017#ifdef __cplusplus
11018extern "C"
11019#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011020/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 builtin and then its argument prototype would still apply. */
11022char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011023int
11024main ()
11025{
11026t_open ();
11027 ;
11028 return 0;
11029}
11030_ACEOF
11031rm -f conftest.$ac_objext conftest$ac_exeext
11032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011033 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011035 grep -v '^ *+' conftest.er1 >conftest.err
11036 rm -f conftest.er1
11037 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011040 { ac_try='test -z "$ac_c_werror_flag"
11041 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11043 (eval $ac_try) 2>&5
11044 ac_status=$?
11045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11046 (exit $ac_status); }; } &&
11047 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11049 (eval $ac_try) 2>&5
11050 ac_status=$?
11051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11052 (exit $ac_status); }; }; then
11053 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011054else
Martin v. Löwis11437992002-04-12 09:54:03 +000011055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011056sed 's/^/| /' conftest.$ac_ext >&5
11057
Martin v. Löwis11437992002-04-12 09:54:03 +000011058ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011059fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011060rm -f conftest.err conftest.$ac_objext \
11061 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011062LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011064echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11065echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11066if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011067 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011068fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011069 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011070echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11071echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11072if test "${ac_cv_lib_socket_socket+set}" = set; then
11073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011074else
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011076LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011078/* confdefs.h. */
11079_ACEOF
11080cat confdefs.h >>conftest.$ac_ext
11081cat >>conftest.$ac_ext <<_ACEOF
11082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011083
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011084/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011085#ifdef __cplusplus
11086extern "C"
11087#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011088/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 builtin and then its argument prototype would still apply. */
11090char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011091int
11092main ()
11093{
11094socket ();
11095 ;
11096 return 0;
11097}
11098_ACEOF
11099rm -f conftest.$ac_objext conftest$ac_exeext
11100if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011101 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011103 grep -v '^ *+' conftest.er1 >conftest.err
11104 rm -f conftest.er1
11105 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11107 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011108 { ac_try='test -z "$ac_c_werror_flag"
11109 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11111 (eval $ac_try) 2>&5
11112 ac_status=$?
11113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11114 (exit $ac_status); }; } &&
11115 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11117 (eval $ac_try) 2>&5
11118 ac_status=$?
11119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11120 (exit $ac_status); }; }; then
11121 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011122else
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011124sed 's/^/| /' conftest.$ac_ext >&5
11125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011127fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011128rm -f conftest.err conftest.$ac_objext \
11129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011130LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011131fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011132echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11133echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11134if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011135 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011136fi
11137 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011138
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011139case "$ac_sys_system" in
11140BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011141echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11142echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11143if test "${ac_cv_lib_net_socket+set}" = set; then
11144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011145else
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011147LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011149/* confdefs.h. */
11150_ACEOF
11151cat confdefs.h >>conftest.$ac_ext
11152cat >>conftest.$ac_ext <<_ACEOF
11153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011154
Guido van Rossumad678af1998-10-02 14:42:15 +000011155/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011156#ifdef __cplusplus
11157extern "C"
11158#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011159/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 builtin and then its argument prototype would still apply. */
11161char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011162int
11163main ()
11164{
11165socket ();
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170rm -f conftest.$ac_objext conftest$ac_exeext
11171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011172 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011174 grep -v '^ *+' conftest.er1 >conftest.err
11175 rm -f conftest.er1
11176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11178 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011179 { ac_try='test -z "$ac_c_werror_flag"
11180 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11182 (eval $ac_try) 2>&5
11183 ac_status=$?
11184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185 (exit $ac_status); }; } &&
11186 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11188 (eval $ac_try) 2>&5
11189 ac_status=$?
11190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191 (exit $ac_status); }; }; then
11192 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011193else
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011195sed 's/^/| /' conftest.$ac_ext >&5
11196
Martin v. Löwis11437992002-04-12 09:54:03 +000011197ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011198fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011199rm -f conftest.err conftest.$ac_objext \
11200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011201LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011202fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011203echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11204echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11205if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011206 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011207fi
11208 # BeOS
11209;;
11210esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011211
Martin v. Löwis11437992002-04-12 09:54:03 +000011212echo "$as_me:$LINENO: checking for --with-libs" >&5
11213echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11214
Guido van Rossuma68acba1996-07-31 17:36:39 +000011215# Check whether --with-libs or --without-libs was given.
11216if test "${with_libs+set}" = set; then
11217 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
11219echo "$as_me:$LINENO: result: $withval" >&5
11220echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011221LIBS="$withval $LIBS"
11222
11223else
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 echo "$as_me:$LINENO: result: no" >&5
11225echo "${ECHO_T}no" >&6
11226fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011227
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011228# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011229
11230
Martin v. Löwis11437992002-04-12 09:54:03 +000011231echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11232echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11233
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011234# Check whether --with-signal-module or --without-signal-module was given.
11235if test "${with_signal_module+set}" = set; then
11236 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011237
Martin v. Löwis11437992002-04-12 09:54:03 +000011238fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011239
11240if test -z "$with_signal_module"
11241then with_signal_module="yes"
11242fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011243echo "$as_me:$LINENO: result: $with_signal_module" >&5
11244echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011245
11246if test "${with_signal_module}" = "yes"; then
11247 USE_SIGNAL_MODULE=""
11248 SIGNAL_OBJS=""
11249else
11250 USE_SIGNAL_MODULE="#"
11251 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11252fi
11253
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011254# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011255
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011256USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011257
Martin v. Löwis11437992002-04-12 09:54:03 +000011258echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11259echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11260
Guido van Rossumec2f0731997-01-22 20:54:01 +000011261
11262# Check whether --with-dec-threads or --without-dec-threads was given.
11263if test "${with_dec_threads+set}" = set; then
11264 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011265
11266echo "$as_me:$LINENO: result: $withval" >&5
11267echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011268LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011269if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011270 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011271fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011272else
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 echo "$as_me:$LINENO: result: no" >&5
11274echo "${ECHO_T}no" >&6
11275fi;
11276
11277# Templates for things AC_DEFINEd more than once.
11278# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011279
11280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281
11282
11283
11284
11285
11286echo "$as_me:$LINENO: checking for --with-threads" >&5
11287echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11288
Guido van Rossumec2f0731997-01-22 20:54:01 +000011289# Check whether --with-threads or --without-threads was given.
11290if test "${with_threads+set}" = set; then
11291 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011292
Martin v. Löwis11437992002-04-12 09:54:03 +000011293fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011294
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011295# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011296
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011298if test "${with_thread+set}" = set; then
11299 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011300 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011301fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011302
11303if test -z "$with_threads"
11304then with_threads="yes"
11305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011306echo "$as_me:$LINENO: result: $with_threads" >&5
11307echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011308
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011309
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011310if test "$with_threads" = "no"
11311then
11312 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011313elif test "$ac_cv_pthread_is_default" = yes
11314then
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011316#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011317_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011318
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011319 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011321#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011322_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011323
11324 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011326elif test "$ac_cv_kpthread" = "yes"
11327then
11328 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011329 if test "$ac_cv_cxx_thread" = "yes"; then
11330 CXX="$CXX -Kpthread"
11331 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011333#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011334_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011335
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011336 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011337 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011338elif test "$ac_cv_kthread" = "yes"
11339then
11340 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011341 if test "$ac_cv_cxx_thread" = "yes"; then
11342 CXX="$CXX -Kthread"
11343 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011344 cat >>confdefs.h <<\_ACEOF
11345#define WITH_THREAD 1
11346_ACEOF
11347
11348 posix_threads=yes
11349 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011350elif test "$ac_cv_pthread" = "yes"
11351then
11352 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011353 if test "$ac_cv_cxx_thread" = "yes"; then
11354 CXX="$CXX -pthread"
11355 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011356 cat >>confdefs.h <<\_ACEOF
11357#define WITH_THREAD 1
11358_ACEOF
11359
11360 posix_threads=yes
11361 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011362else
11363 if test ! -z "$with_threads" -a -d "$with_threads"
11364 then LDFLAGS="$LDFLAGS -L$with_threads"
11365 fi
11366 if test ! -z "$withval" -a -d "$withval"
11367 then LDFLAGS="$LDFLAGS -L$withval"
11368 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011369
11370 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011371 # define _POSIX_THREADS in unistd.h. Some apparently don't
11372 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11374echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011376/* confdefs.h. */
11377_ACEOF
11378cat confdefs.h >>conftest.$ac_ext
11379cat >>conftest.$ac_ext <<_ACEOF
11380/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011381
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011382#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011383#ifdef _POSIX_THREADS
11384yes
11385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
11387_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011389 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011390 unistd_defines_pthreads=yes
11391else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011392 unistd_defines_pthreads=no
11393fi
11394rm -f conftest*
11395
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11397echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011398
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011400#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011401_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011402
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 if test "${ac_cv_header_cthreads_h+set}" = set; then
11404 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11405echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11406if test "${ac_cv_header_cthreads_h+set}" = set; then
11407 echo $ECHO_N "(cached) $ECHO_C" >&6
11408fi
11409echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11410echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011411else
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 # Is the header compilable?
11413echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11414echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* confdefs.h. */
11417_ACEOF
11418cat confdefs.h >>conftest.$ac_ext
11419cat >>conftest.$ac_ext <<_ACEOF
11420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011421$ac_includes_default
11422#include <cthreads.h>
11423_ACEOF
11424rm -f conftest.$ac_objext
11425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011426 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011428 grep -v '^ *+' conftest.er1 >conftest.err
11429 rm -f conftest.er1
11430 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11432 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011433 { ac_try='test -z "$ac_c_werror_flag"
11434 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11436 (eval $ac_try) 2>&5
11437 ac_status=$?
11438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11439 (exit $ac_status); }; } &&
11440 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11442 (eval $ac_try) 2>&5
11443 ac_status=$?
11444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11445 (exit $ac_status); }; }; then
11446 ac_header_compiler=yes
11447else
11448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011449sed 's/^/| /' conftest.$ac_ext >&5
11450
Martin v. Löwis11437992002-04-12 09:54:03 +000011451ac_header_compiler=no
11452fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011453rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011454echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11455echo "${ECHO_T}$ac_header_compiler" >&6
11456
11457# Is the header present?
11458echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11459echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11460cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011461/* confdefs.h. */
11462_ACEOF
11463cat confdefs.h >>conftest.$ac_ext
11464cat >>conftest.$ac_ext <<_ACEOF
11465/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011466#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011467_ACEOF
11468if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11469 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11470 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011471 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 rm -f conftest.er1
11473 cat conftest.err >&5
11474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475 (exit $ac_status); } >/dev/null; then
11476 if test -s conftest.err; then
11477 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011478 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 else
11480 ac_cpp_err=
11481 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011482else
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 ac_cpp_err=yes
11484fi
11485if test -z "$ac_cpp_err"; then
11486 ac_header_preproc=yes
11487else
11488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011489sed 's/^/| /' conftest.$ac_ext >&5
11490
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011492fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011493rm -f conftest.err conftest.$ac_ext
11494echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11495echo "${ECHO_T}$ac_header_preproc" >&6
11496
11497# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011498case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11499 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11501echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011502 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11503echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11504 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011505 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011506 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011507 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11508echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011509 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11510echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11511 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11512echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11513 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11514echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011515 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11516echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011517 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11518echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011519 (
11520 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011521## ------------------------------------------------ ##
11522## Report this to http://www.python.org/python-bugs ##
11523## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011524_ASBOX
11525 ) |
11526 sed "s/^/$as_me: WARNING: /" >&2
11527 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011528esac
11529echo "$as_me:$LINENO: checking for cthreads.h" >&5
11530echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11531if test "${ac_cv_header_cthreads_h+set}" = set; then
11532 echo $ECHO_N "(cached) $ECHO_C" >&6
11533else
11534 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011536echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11537echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11538
11539fi
11540if test $ac_cv_header_cthreads_h = yes; then
11541 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011542#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011543_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011544
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011546#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011547_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011548
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
11550cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011551#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011552_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011553
11554 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011555 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011556else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011557
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11559 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11560echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11561if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11562 echo $ECHO_N "(cached) $ECHO_C" >&6
11563fi
11564echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11565echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011566else
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 # Is the header compilable?
11568echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11569echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* confdefs.h. */
11572_ACEOF
11573cat confdefs.h >>conftest.$ac_ext
11574cat >>conftest.$ac_ext <<_ACEOF
11575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011576$ac_includes_default
11577#include <mach/cthreads.h>
11578_ACEOF
11579rm -f conftest.$ac_objext
11580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011581 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011583 grep -v '^ *+' conftest.er1 >conftest.err
11584 rm -f conftest.er1
11585 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011588 { ac_try='test -z "$ac_c_werror_flag"
11589 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11591 (eval $ac_try) 2>&5
11592 ac_status=$?
11593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11594 (exit $ac_status); }; } &&
11595 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11597 (eval $ac_try) 2>&5
11598 ac_status=$?
11599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11600 (exit $ac_status); }; }; then
11601 ac_header_compiler=yes
11602else
11603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011604sed 's/^/| /' conftest.$ac_ext >&5
11605
Martin v. Löwis11437992002-04-12 09:54:03 +000011606ac_header_compiler=no
11607fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011609echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11610echo "${ECHO_T}$ac_header_compiler" >&6
11611
11612# Is the header present?
11613echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11614echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011616/* confdefs.h. */
11617_ACEOF
11618cat confdefs.h >>conftest.$ac_ext
11619cat >>conftest.$ac_ext <<_ACEOF
11620/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011621#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011622_ACEOF
11623if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11624 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11625 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011626 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 rm -f conftest.er1
11628 cat conftest.err >&5
11629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11630 (exit $ac_status); } >/dev/null; then
11631 if test -s conftest.err; then
11632 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011633 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 else
11635 ac_cpp_err=
11636 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011637else
Martin v. Löwis11437992002-04-12 09:54:03 +000011638 ac_cpp_err=yes
11639fi
11640if test -z "$ac_cpp_err"; then
11641 ac_header_preproc=yes
11642else
11643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011644sed 's/^/| /' conftest.$ac_ext >&5
11645
Martin v. Löwis11437992002-04-12 09:54:03 +000011646 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011648rm -f conftest.err conftest.$ac_ext
11649echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11650echo "${ECHO_T}$ac_header_preproc" >&6
11651
11652# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011653case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11654 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011655 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11656echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011657 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
11658echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
11659 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011660 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011661 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011662 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11663echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011664 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11665echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11666 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
11667echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
11668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11669echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011670 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
11671echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011672 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
11673echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011674 (
11675 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011676## ------------------------------------------------ ##
11677## Report this to http://www.python.org/python-bugs ##
11678## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011679_ASBOX
11680 ) |
11681 sed "s/^/$as_me: WARNING: /" >&2
11682 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011683esac
11684echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11685echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11686if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11687 echo $ECHO_N "(cached) $ECHO_C" >&6
11688else
11689 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011691echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11692echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11693
11694fi
11695if test $ac_cv_header_mach_cthreads_h = yes; then
11696 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011697#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011698_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011699
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011701#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011702_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011703
Martin v. Löwis11437992002-04-12 09:54:03 +000011704
11705cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011706#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011707_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011708
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011709 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011710else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011711
Martin v. Löwis11437992002-04-12 09:54:03 +000011712 echo "$as_me:$LINENO: checking for --with-pth" >&5
11713echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11714
11715# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011716if test "${with_pth+set}" = set; then
11717 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011718 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011719echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011720 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011721#define WITH_THREAD 1
11722_ACEOF
11723
11724
11725cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011726#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011727_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011728
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011729 LIBS="-lpth $LIBS"
11730 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011731else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011732 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011733echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011734
11735 # Just looking for pthread_create in libpthread is not enough:
11736 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11737 # So we really have to include pthread.h, and then link.
11738 _libs=$LIBS
11739 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011740 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11741echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011743/* confdefs.h. */
11744_ACEOF
11745cat confdefs.h >>conftest.$ac_ext
11746cat >>conftest.$ac_ext <<_ACEOF
11747/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011748#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011749
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011750void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011751int
11752main ()
11753{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011754
11755pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 ;
11757 return 0;
11758}
11759_ACEOF
11760rm -f conftest.$ac_objext conftest$ac_exeext
11761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011762 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011764 grep -v '^ *+' conftest.er1 >conftest.err
11765 rm -f conftest.er1
11766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011769 { ac_try='test -z "$ac_c_werror_flag"
11770 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11772 (eval $ac_try) 2>&5
11773 ac_status=$?
11774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775 (exit $ac_status); }; } &&
11776 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11778 (eval $ac_try) 2>&5
11779 ac_status=$?
11780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781 (exit $ac_status); }; }; then
11782
11783 echo "$as_me:$LINENO: result: yes" >&5
11784echo "${ECHO_T}yes" >&6
11785 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011786#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011787_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011788
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011789 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011790 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011791else
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011793sed 's/^/| /' conftest.$ac_ext >&5
11794
Martin v. Löwis11437992002-04-12 09:54:03 +000011795
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011796 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11798echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11799if test "${ac_cv_func_pthread_detach+set}" = set; then
11800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011801else
Martin v. Löwis11437992002-04-12 09:54:03 +000011802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011803/* confdefs.h. */
11804_ACEOF
11805cat confdefs.h >>conftest.$ac_ext
11806cat >>conftest.$ac_ext <<_ACEOF
11807/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011808/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011809 which can conflict with char pthread_detach (); below.
11810 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011811 <limits.h> exists even on freestanding compilers. Under hpux,
11812 including <limits.h> includes <sys/time.h> and causes problems
11813 checking for functions defined therein. */
11814#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011815# include <limits.h>
11816#else
11817# include <assert.h>
11818#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011819/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011820#ifdef __cplusplus
11821extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011822{
Martin v. Löwis11437992002-04-12 09:54:03 +000011823#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011824/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 builtin and then its argument prototype would still apply. */
11826char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011827/* The GNU C library defines this for functions which it implements
11828 to always fail with ENOSYS. Some functions are actually named
11829 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011830#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011831choke me
11832#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011833char (*f) () = pthread_detach;
11834#endif
11835#ifdef __cplusplus
11836}
Guido van Rossumad678af1998-10-02 14:42:15 +000011837#endif
11838
Skip Montanaro6dead952003-09-25 14:50:04 +000011839int
11840main ()
11841{
11842return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 ;
11844 return 0;
11845}
11846_ACEOF
11847rm -f conftest.$ac_objext conftest$ac_exeext
11848if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011849 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011851 grep -v '^ *+' conftest.er1 >conftest.err
11852 rm -f conftest.er1
11853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11855 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011856 { ac_try='test -z "$ac_c_werror_flag"
11857 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11859 (eval $ac_try) 2>&5
11860 ac_status=$?
11861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11862 (exit $ac_status); }; } &&
11863 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11865 (eval $ac_try) 2>&5
11866 ac_status=$?
11867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11868 (exit $ac_status); }; }; then
11869 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011870else
Martin v. Löwis11437992002-04-12 09:54:03 +000011871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011872sed 's/^/| /' conftest.$ac_ext >&5
11873
Martin v. Löwis11437992002-04-12 09:54:03 +000011874ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011875fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011876rm -f conftest.err conftest.$ac_objext \
11877 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011878fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011879echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11880echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11881if test $ac_cv_func_pthread_detach = yes; then
11882 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011883#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011884_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011885
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011886 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011887 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011888else
Guido van Rossumad678af1998-10-02 14:42:15 +000011889
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011890 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11891 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11892echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11893if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11894 echo $ECHO_N "(cached) $ECHO_C" >&6
11895fi
11896echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11897echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11898else
11899 # Is the header compilable?
11900echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11901echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011903/* confdefs.h. */
11904_ACEOF
11905cat confdefs.h >>conftest.$ac_ext
11906cat >>conftest.$ac_ext <<_ACEOF
11907/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011908$ac_includes_default
11909#include <atheos/threads.h>
11910_ACEOF
11911rm -f conftest.$ac_objext
11912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011913 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011915 grep -v '^ *+' conftest.er1 >conftest.err
11916 rm -f conftest.er1
11917 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11919 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011920 { ac_try='test -z "$ac_c_werror_flag"
11921 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11923 (eval $ac_try) 2>&5
11924 ac_status=$?
11925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926 (exit $ac_status); }; } &&
11927 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11929 (eval $ac_try) 2>&5
11930 ac_status=$?
11931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11932 (exit $ac_status); }; }; then
11933 ac_header_compiler=yes
11934else
11935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011936sed 's/^/| /' conftest.$ac_ext >&5
11937
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011938ac_header_compiler=no
11939fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011940rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011941echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11942echo "${ECHO_T}$ac_header_compiler" >&6
11943
11944# Is the header present?
11945echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11946echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011948/* confdefs.h. */
11949_ACEOF
11950cat confdefs.h >>conftest.$ac_ext
11951cat >>conftest.$ac_ext <<_ACEOF
11952/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011953#include <atheos/threads.h>
11954_ACEOF
11955if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11956 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11957 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011958 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011959 rm -f conftest.er1
11960 cat conftest.err >&5
11961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11962 (exit $ac_status); } >/dev/null; then
11963 if test -s conftest.err; then
11964 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011965 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011966 else
11967 ac_cpp_err=
11968 fi
11969else
11970 ac_cpp_err=yes
11971fi
11972if test -z "$ac_cpp_err"; then
11973 ac_header_preproc=yes
11974else
11975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011976sed 's/^/| /' conftest.$ac_ext >&5
11977
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011978 ac_header_preproc=no
11979fi
11980rm -f conftest.err conftest.$ac_ext
11981echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11982echo "${ECHO_T}$ac_header_preproc" >&6
11983
11984# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011985case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11986 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011987 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11988echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011989 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
11990echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
11991 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011992 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011993 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011994 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11995echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011996 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11997echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11998 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
11999echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
12000 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
12001echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012002 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
12003echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012004 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
12005echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012006 (
12007 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012008## ------------------------------------------------ ##
12009## Report this to http://www.python.org/python-bugs ##
12010## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012011_ASBOX
12012 ) |
12013 sed "s/^/$as_me: WARNING: /" >&2
12014 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012015esac
12016echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12017echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12018if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12019 echo $ECHO_N "(cached) $ECHO_C" >&6
12020else
12021 ac_cv_header_atheos_threads_h=$ac_header_preproc
12022fi
12023echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12024echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12025
12026fi
12027if test $ac_cv_header_atheos_threads_h = yes; then
12028 cat >>confdefs.h <<\_ACEOF
12029#define WITH_THREAD 1
12030_ACEOF
12031
12032
12033cat >>confdefs.h <<\_ACEOF
12034#define ATHEOS_THREADS 1
12035_ACEOF
12036
12037 THREADOBJ="Python/thread.o"
12038else
12039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12041 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12042echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12043if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12044 echo $ECHO_N "(cached) $ECHO_C" >&6
12045fi
12046echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12047echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012048else
Martin v. Löwis11437992002-04-12 09:54:03 +000012049 # Is the header compilable?
12050echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
12051echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
12052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012053/* confdefs.h. */
12054_ACEOF
12055cat confdefs.h >>conftest.$ac_ext
12056cat >>conftest.$ac_ext <<_ACEOF
12057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012058$ac_includes_default
12059#include <kernel/OS.h>
12060_ACEOF
12061rm -f conftest.$ac_objext
12062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012063 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012065 grep -v '^ *+' conftest.er1 >conftest.err
12066 rm -f conftest.er1
12067 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12069 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012070 { ac_try='test -z "$ac_c_werror_flag"
12071 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12073 (eval $ac_try) 2>&5
12074 ac_status=$?
12075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12076 (exit $ac_status); }; } &&
12077 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12079 (eval $ac_try) 2>&5
12080 ac_status=$?
12081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12082 (exit $ac_status); }; }; then
12083 ac_header_compiler=yes
12084else
12085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012086sed 's/^/| /' conftest.$ac_ext >&5
12087
Martin v. Löwis11437992002-04-12 09:54:03 +000012088ac_header_compiler=no
12089fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012090rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012091echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12092echo "${ECHO_T}$ac_header_compiler" >&6
12093
12094# Is the header present?
12095echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12096echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012098/* confdefs.h. */
12099_ACEOF
12100cat confdefs.h >>conftest.$ac_ext
12101cat >>conftest.$ac_ext <<_ACEOF
12102/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012103#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012104_ACEOF
12105if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12106 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12107 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012108 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 rm -f conftest.er1
12110 cat conftest.err >&5
12111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12112 (exit $ac_status); } >/dev/null; then
12113 if test -s conftest.err; then
12114 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012115 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012116 else
12117 ac_cpp_err=
12118 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012119else
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 ac_cpp_err=yes
12121fi
12122if test -z "$ac_cpp_err"; then
12123 ac_header_preproc=yes
12124else
12125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012126sed 's/^/| /' conftest.$ac_ext >&5
12127
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012130rm -f conftest.err conftest.$ac_ext
12131echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12132echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012133
Martin v. Löwis11437992002-04-12 09:54:03 +000012134# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012135case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12136 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12138echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012139 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12140echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12141 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012142 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012143 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012144 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12145echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012146 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12147echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12148 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12149echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12150 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12151echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012152 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12153echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012154 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12155echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012156 (
12157 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012158## ------------------------------------------------ ##
12159## Report this to http://www.python.org/python-bugs ##
12160## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012161_ASBOX
12162 ) |
12163 sed "s/^/$as_me: WARNING: /" >&2
12164 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012165esac
12166echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12167echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12168if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12169 echo $ECHO_N "(cached) $ECHO_C" >&6
12170else
12171 ac_cv_header_kernel_OS_h=$ac_header_preproc
12172fi
12173echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12174echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12175
12176fi
12177if test $ac_cv_header_kernel_OS_h = yes; then
12178 cat >>confdefs.h <<\_ACEOF
12179#define WITH_THREAD 1
12180_ACEOF
12181
12182
12183cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012184#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012185_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012186
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012187 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012188else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012189
Martin v. Löwis11437992002-04-12 09:54:03 +000012190 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12191echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12192if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12193 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012194else
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012196LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012197cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012198/* confdefs.h. */
12199_ACEOF
12200cat confdefs.h >>conftest.$ac_ext
12201cat >>conftest.$ac_ext <<_ACEOF
12202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012203
Greg Steinadf63d62000-07-05 10:38:09 +000012204/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012205#ifdef __cplusplus
12206extern "C"
12207#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012208/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 builtin and then its argument prototype would still apply. */
12210char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012211int
12212main ()
12213{
12214pthread_create ();
12215 ;
12216 return 0;
12217}
12218_ACEOF
12219rm -f conftest.$ac_objext conftest$ac_exeext
12220if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012221 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012223 grep -v '^ *+' conftest.er1 >conftest.err
12224 rm -f conftest.er1
12225 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12227 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012228 { ac_try='test -z "$ac_c_werror_flag"
12229 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12231 (eval $ac_try) 2>&5
12232 ac_status=$?
12233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12234 (exit $ac_status); }; } &&
12235 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12237 (eval $ac_try) 2>&5
12238 ac_status=$?
12239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12240 (exit $ac_status); }; }; then
12241 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012242else
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012244sed 's/^/| /' conftest.$ac_ext >&5
12245
Martin v. Löwis11437992002-04-12 09:54:03 +000012246ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012247fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012248rm -f conftest.err conftest.$ac_objext \
12249 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012250LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012251fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012252echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12253echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12254if test $ac_cv_lib_pthreads_pthread_create = yes; then
12255 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012256#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012257_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012258
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012259 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012260 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012261 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012262else
Greg Steinadf63d62000-07-05 10:38:09 +000012263
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12265echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12266if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12267 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012268else
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012270LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012271cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012272/* confdefs.h. */
12273_ACEOF
12274cat confdefs.h >>conftest.$ac_ext
12275cat >>conftest.$ac_ext <<_ACEOF
12276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012277
Guido van Rossum49545951997-12-02 19:28:29 +000012278/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012279#ifdef __cplusplus
12280extern "C"
12281#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012282/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 builtin and then its argument prototype would still apply. */
12284char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012285int
12286main ()
12287{
12288pthread_create ();
12289 ;
12290 return 0;
12291}
12292_ACEOF
12293rm -f conftest.$ac_objext conftest$ac_exeext
12294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012295 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012297 grep -v '^ *+' conftest.er1 >conftest.err
12298 rm -f conftest.er1
12299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12301 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012302 { ac_try='test -z "$ac_c_werror_flag"
12303 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12305 (eval $ac_try) 2>&5
12306 ac_status=$?
12307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308 (exit $ac_status); }; } &&
12309 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12311 (eval $ac_try) 2>&5
12312 ac_status=$?
12313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314 (exit $ac_status); }; }; then
12315 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012316else
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012318sed 's/^/| /' conftest.$ac_ext >&5
12319
Martin v. Löwis11437992002-04-12 09:54:03 +000012320ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012321fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012322rm -f conftest.err conftest.$ac_objext \
12323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012324LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012326echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12327echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12328if test $ac_cv_lib_c_r_pthread_create = yes; then
12329 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012330#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012331_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012332
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012333 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012334 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012335 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012336else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012337
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12339echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12340if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12341 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012342else
Martin v. Löwis11437992002-04-12 09:54:03 +000012343 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012344LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012345cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* confdefs.h. */
12347_ACEOF
12348cat confdefs.h >>conftest.$ac_ext
12349cat >>conftest.$ac_ext <<_ACEOF
12350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012351
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012352/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012353#ifdef __cplusplus
12354extern "C"
12355#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012356/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 builtin and then its argument prototype would still apply. */
12358char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012359int
12360main ()
12361{
12362__pthread_create_system ();
12363 ;
12364 return 0;
12365}
12366_ACEOF
12367rm -f conftest.$ac_objext conftest$ac_exeext
12368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012369 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012371 grep -v '^ *+' conftest.er1 >conftest.err
12372 rm -f conftest.er1
12373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012376 { ac_try='test -z "$ac_c_werror_flag"
12377 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12379 (eval $ac_try) 2>&5
12380 ac_status=$?
12381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12382 (exit $ac_status); }; } &&
12383 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12385 (eval $ac_try) 2>&5
12386 ac_status=$?
12387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12388 (exit $ac_status); }; }; then
12389 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012390else
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012392sed 's/^/| /' conftest.$ac_ext >&5
12393
Martin v. Löwis11437992002-04-12 09:54:03 +000012394ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012395fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012396rm -f conftest.err conftest.$ac_objext \
12397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012398LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012400echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12401echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12402if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12403 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012404#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012405_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012407 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012408 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012409 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012410else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012411
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12413echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12414if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12415 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012416else
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012418LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012420/* confdefs.h. */
12421_ACEOF
12422cat confdefs.h >>conftest.$ac_ext
12423cat >>conftest.$ac_ext <<_ACEOF
12424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Guido van Rossumb93a8621998-05-07 13:27:32 +000012426/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012427#ifdef __cplusplus
12428extern "C"
12429#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012430/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012431 builtin and then its argument prototype would still apply. */
12432char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012433int
12434main ()
12435{
12436pthread_create ();
12437 ;
12438 return 0;
12439}
12440_ACEOF
12441rm -f conftest.$ac_objext conftest$ac_exeext
12442if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012443 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012445 grep -v '^ *+' conftest.er1 >conftest.err
12446 rm -f conftest.er1
12447 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12449 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012450 { ac_try='test -z "$ac_c_werror_flag"
12451 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12453 (eval $ac_try) 2>&5
12454 ac_status=$?
12455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12456 (exit $ac_status); }; } &&
12457 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12459 (eval $ac_try) 2>&5
12460 ac_status=$?
12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462 (exit $ac_status); }; }; then
12463 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012464else
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012466sed 's/^/| /' conftest.$ac_ext >&5
12467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012469fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012470rm -f conftest.err conftest.$ac_objext \
12471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012472LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012474echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12475echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12476if test $ac_cv_lib_cma_pthread_create = yes; then
12477 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012478#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012479_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012480
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012481 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012482 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012483 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012484else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012485
Martin v. Löwis130fb172001-07-19 11:00:41 +000012486 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012487fi
12488
Guido van Rossum627b2d71993-12-24 10:39:16 +000012489
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012490fi
12491
Guido van Rossum0be3e491997-05-22 20:33:33 +000012492fi
12493
Guido van Rossum49545951997-12-02 19:28:29 +000012494fi
12495
Guido van Rossumb93a8621998-05-07 13:27:32 +000012496fi
12497
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012498
Michael W. Hudson54241132001-12-07 15:38:26 +000012499fi
12500
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012501
12502fi
12503
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012504fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012505rm -f conftest.err conftest.$ac_objext \
12506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012507fi;
12508fi
12509
12510
12511fi
12512
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012513
Michael W. Hudson54241132001-12-07 15:38:26 +000012514
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12516echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12517if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012519else
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012521LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012523/* confdefs.h. */
12524_ACEOF
12525cat confdefs.h >>conftest.$ac_ext
12526cat >>conftest.$ac_ext <<_ACEOF
12527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012528
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012529/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012530#ifdef __cplusplus
12531extern "C"
12532#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012533/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 builtin and then its argument prototype would still apply. */
12535char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012536int
12537main ()
12538{
12539usconfig ();
12540 ;
12541 return 0;
12542}
12543_ACEOF
12544rm -f conftest.$ac_objext conftest$ac_exeext
12545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012546 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012548 grep -v '^ *+' conftest.er1 >conftest.err
12549 rm -f conftest.er1
12550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012553 { ac_try='test -z "$ac_c_werror_flag"
12554 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556 (eval $ac_try) 2>&5
12557 ac_status=$?
12558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559 (exit $ac_status); }; } &&
12560 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12562 (eval $ac_try) 2>&5
12563 ac_status=$?
12564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565 (exit $ac_status); }; }; then
12566 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012567else
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012569sed 's/^/| /' conftest.$ac_ext >&5
12570
Martin v. Löwis11437992002-04-12 09:54:03 +000012571ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012572fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012573rm -f conftest.err conftest.$ac_objext \
12574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012575LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012577echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12578echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12579if test $ac_cv_lib_mpc_usconfig = yes; then
12580 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012581#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012582_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012583
Martin v. Löwis130fb172001-07-19 11:00:41 +000012584 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012585 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012586 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012587fi
12588
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012589
Neal Norwitza978ab02002-11-02 16:58:05 +000012590 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12592echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12593if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12594 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012595else
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012597LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012598cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012599/* confdefs.h. */
12600_ACEOF
12601cat confdefs.h >>conftest.$ac_ext
12602cat >>conftest.$ac_ext <<_ACEOF
12603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012604
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012605/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012606#ifdef __cplusplus
12607extern "C"
12608#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012609/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 builtin and then its argument prototype would still apply. */
12611char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012612int
12613main ()
12614{
12615thr_create ();
12616 ;
12617 return 0;
12618}
12619_ACEOF
12620rm -f conftest.$ac_objext conftest$ac_exeext
12621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012622 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012624 grep -v '^ *+' conftest.er1 >conftest.err
12625 rm -f conftest.er1
12626 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12628 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012629 { ac_try='test -z "$ac_c_werror_flag"
12630 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12632 (eval $ac_try) 2>&5
12633 ac_status=$?
12634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12635 (exit $ac_status); }; } &&
12636 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12638 (eval $ac_try) 2>&5
12639 ac_status=$?
12640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641 (exit $ac_status); }; }; then
12642 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012643else
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012645sed 's/^/| /' conftest.$ac_ext >&5
12646
Martin v. Löwis11437992002-04-12 09:54:03 +000012647ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012648fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012649rm -f conftest.err conftest.$ac_objext \
12650 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012651LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012653echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12654echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12655if test $ac_cv_lib_thread_thr_create = yes; then
12656 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012657#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012658_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012659
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012660 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012661 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012662 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012663fi
12664
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012665 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012666
Martin v. Löwis130fb172001-07-19 11:00:41 +000012667 if test "$USE_THREAD_MODULE" != "#"
12668 then
12669 # If the above checks didn't disable threads, (at least) OSF1
12670 # needs this '-threads' argument during linking.
12671 case $ac_sys_system in
12672 OSF1) LDLAST=-threads;;
12673 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012674 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012675fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012676
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012677if test "$posix_threads" = "yes"; then
12678 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012679
12680cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012681#define _POSIX_THREADS 1
12682_ACEOF
12683
12684 fi
12685
12686 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12687 case $ac_sys_system/$ac_sys_release in
12688 SunOS/5.6)
12689cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012690#define HAVE_PTHREAD_DESTRUCTOR 1
12691_ACEOF
12692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012693 ;;
12694 SunOS/5.8)
12695cat >>confdefs.h <<\_ACEOF
12696#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12697_ACEOF
12698
12699 ;;
12700 esac
12701
12702 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12703echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12704 if test "${ac_cv_pthread_system_supported+set}" = set; then
12705 echo $ECHO_N "(cached) $ECHO_C" >&6
12706else
12707 if test "$cross_compiling" = yes; then
12708 ac_cv_pthread_system_supported=no
12709else
12710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012711/* confdefs.h. */
12712_ACEOF
12713cat confdefs.h >>conftest.$ac_ext
12714cat >>conftest.$ac_ext <<_ACEOF
12715/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012716#include <pthread.h>
12717 void *foo(void *parm) {
12718 return NULL;
12719 }
12720 main() {
12721 pthread_attr_t attr;
12722 pthread_t id;
12723 if (pthread_attr_init(&attr)) exit(-1);
12724 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12725 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12726 exit(0);
12727 }
12728_ACEOF
12729rm -f conftest$ac_exeext
12730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12731 (eval $ac_link) 2>&5
12732 ac_status=$?
12733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12734 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12736 (eval $ac_try) 2>&5
12737 ac_status=$?
12738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12739 (exit $ac_status); }; }; then
12740 ac_cv_pthread_system_supported=yes
12741else
12742 echo "$as_me: program exited with status $ac_status" >&5
12743echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012744sed 's/^/| /' conftest.$ac_ext >&5
12745
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012746( exit $ac_status )
12747ac_cv_pthread_system_supported=no
12748fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012749rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012750fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012751
Guido van Rossum627b2d71993-12-24 10:39:16 +000012752fi
12753
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012754 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12755echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12756 if test "$ac_cv_pthread_system_supported" = "yes"; then
12757
12758cat >>confdefs.h <<\_ACEOF
12759#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12760_ACEOF
12761
12762 fi
12763
12764for ac_func in pthread_sigmask
12765do
12766as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12767echo "$as_me:$LINENO: checking for $ac_func" >&5
12768echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12769if eval "test \"\${$as_ac_var+set}\" = set"; then
12770 echo $ECHO_N "(cached) $ECHO_C" >&6
12771else
12772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* confdefs.h. */
12774_ACEOF
12775cat confdefs.h >>conftest.$ac_ext
12776cat >>conftest.$ac_ext <<_ACEOF
12777/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012778/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012779 which can conflict with char $ac_func (); below.
12780 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012781 <limits.h> exists even on freestanding compilers. Under hpux,
12782 including <limits.h> includes <sys/time.h> and causes problems
12783 checking for functions defined therein. */
12784#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012785# include <limits.h>
12786#else
12787# include <assert.h>
12788#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012789/* Override any gcc2 internal prototype to avoid an error. */
12790#ifdef __cplusplus
12791extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012792{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012793#endif
12794/* We use char because int might match the return type of a gcc2
12795 builtin and then its argument prototype would still apply. */
12796char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012797/* The GNU C library defines this for functions which it implements
12798 to always fail with ENOSYS. Some functions are actually named
12799 something starting with __ and the normal name is an alias. */
12800#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12801choke me
12802#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012803char (*f) () = $ac_func;
12804#endif
12805#ifdef __cplusplus
12806}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012807#endif
12808
Skip Montanaro6dead952003-09-25 14:50:04 +000012809int
12810main ()
12811{
12812return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012813 ;
12814 return 0;
12815}
12816_ACEOF
12817rm -f conftest.$ac_objext conftest$ac_exeext
12818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012819 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012821 grep -v '^ *+' conftest.er1 >conftest.err
12822 rm -f conftest.er1
12823 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12825 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012826 { ac_try='test -z "$ac_c_werror_flag"
12827 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12829 (eval $ac_try) 2>&5
12830 ac_status=$?
12831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12832 (exit $ac_status); }; } &&
12833 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12835 (eval $ac_try) 2>&5
12836 ac_status=$?
12837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12838 (exit $ac_status); }; }; then
12839 eval "$as_ac_var=yes"
12840else
12841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012842sed 's/^/| /' conftest.$ac_ext >&5
12843
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012844eval "$as_ac_var=no"
12845fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012846rm -f conftest.err conftest.$ac_objext \
12847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012848fi
12849echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12850echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12851if test `eval echo '${'$as_ac_var'}'` = yes; then
12852 cat >>confdefs.h <<_ACEOF
12853#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12854_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012855 case $ac_sys_system in
12856 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012857
Jason Tishlerfac083d2003-07-22 15:20:49 +000012858cat >>confdefs.h <<\_ACEOF
12859#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12860_ACEOF
12861
12862 ;;
12863 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012864fi
12865done
12866
12867fi
12868
12869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012870# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
12872
12873echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12874echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012875# Check whether --enable-ipv6 or --disable-ipv6 was given.
12876if test "${enable_ipv6+set}" = set; then
12877 enableval="$enable_ipv6"
12878 case "$enableval" in
12879 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 echo "$as_me:$LINENO: result: no" >&5
12881echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012882 ipv6=no
12883 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 *) echo "$as_me:$LINENO: result: yes" >&5
12885echo "${ECHO_T}yes" >&6
12886 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012887#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012888_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012889
12890 ipv6=yes
12891 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012893else
Martin v. Löwis11437992002-04-12 09:54:03 +000012894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012895 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 echo "$as_me:$LINENO: result: no" >&5
12897echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012898 ipv6=no
12899
12900else
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012902/* confdefs.h. */
12903_ACEOF
12904cat confdefs.h >>conftest.$ac_ext
12905cat >>conftest.$ac_ext <<_ACEOF
12906/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012907 /* AF_INET6 available check */
12908#include <sys/types.h>
12909#include <sys/socket.h>
12910main()
12911{
12912 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12913 exit(1);
12914 else
12915 exit(0);
12916}
12917
Martin v. Löwis11437992002-04-12 09:54:03 +000012918_ACEOF
12919rm -f conftest$ac_exeext
12920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12921 (eval $ac_link) 2>&5
12922 ac_status=$?
12923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12926 (eval $ac_try) 2>&5
12927 ac_status=$?
12928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929 (exit $ac_status); }; }; then
12930 echo "$as_me:$LINENO: result: yes" >&5
12931echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012932 ipv6=yes
12933else
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 echo "$as_me: program exited with status $ac_status" >&5
12935echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012936sed 's/^/| /' conftest.$ac_ext >&5
12937
Martin v. Löwis11437992002-04-12 09:54:03 +000012938( exit $ac_status )
12939echo "$as_me:$LINENO: result: no" >&5
12940echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012941 ipv6=no
12942fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012943rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012944fi
12945
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012946if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12948echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012950/* confdefs.h. */
12951_ACEOF
12952cat confdefs.h >>conftest.$ac_ext
12953cat >>conftest.$ac_ext <<_ACEOF
12954/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012955#include <sys/types.h>
12956#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012957int
12958main ()
12959{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012960struct sockaddr_in6 x;
12961x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 ;
12963 return 0;
12964}
12965_ACEOF
12966rm -f conftest.$ac_objext
12967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012968 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012970 grep -v '^ *+' conftest.er1 >conftest.err
12971 rm -f conftest.er1
12972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12974 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012975 { ac_try='test -z "$ac_c_werror_flag"
12976 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12978 (eval $ac_try) 2>&5
12979 ac_status=$?
12980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12981 (exit $ac_status); }; } &&
12982 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12984 (eval $ac_try) 2>&5
12985 ac_status=$?
12986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12987 (exit $ac_status); }; }; then
12988 echo "$as_me:$LINENO: result: yes" >&5
12989echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012990 ipv6=yes
12991else
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012993sed 's/^/| /' conftest.$ac_ext >&5
12994
Martin v. Löwis11437992002-04-12 09:54:03 +000012995echo "$as_me:$LINENO: result: no" >&5
12996echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012997 ipv6=no
12998fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013000fi
13001
13002if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013003 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013004#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013005_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013006
13007fi
13008
Martin v. Löwis11437992002-04-12 09:54:03 +000013009fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013010
13011ipv6type=unknown
13012ipv6lib=none
13013ipv6trylibc=no
13014
13015if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
13017echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000013018 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
13019 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013020 case $i in
13021 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013023/* confdefs.h. */
13024_ACEOF
13025cat confdefs.h >>conftest.$ac_ext
13026cat >>conftest.$ac_ext <<_ACEOF
13027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013029#include <netinet/in.h>
13030#ifdef IPV6_INRIA_VERSION
13031yes
13032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013035 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013036 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013037fi
13038rm -f conftest*
13039
13040 ;;
13041 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013043/* confdefs.h. */
13044_ACEOF
13045cat confdefs.h >>conftest.$ac_ext
13046cat >>conftest.$ac_ext <<_ACEOF
13047/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013048
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013049#include <netinet/in.h>
13050#ifdef __KAME__
13051yes
13052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013053_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013055 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013056 ipv6type=$i;
13057 ipv6lib=inet6
13058 ipv6libdir=/usr/local/v6/lib
13059 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013060fi
13061rm -f conftest*
13062
13063 ;;
13064 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013066/* confdefs.h. */
13067_ACEOF
13068cat confdefs.h >>conftest.$ac_ext
13069cat >>conftest.$ac_ext <<_ACEOF
13070/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013071
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013072#include <features.h>
13073#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
13074yes
13075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013076_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013078 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013079 ipv6type=$i;
13080 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013081fi
13082rm -f conftest*
13083
13084 ;;
13085 linux-inet6)
13086 if test -d /usr/inet6; then
13087 ipv6type=$i
13088 ipv6lib=inet6
13089 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013090 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013091 fi
13092 ;;
13093 solaris)
13094 if test -f /etc/netconfig; then
13095 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13096 ipv6type=$i
13097 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013098 fi
13099 fi
13100 ;;
13101 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013103/* confdefs.h. */
13104_ACEOF
13105cat confdefs.h >>conftest.$ac_ext
13106cat >>conftest.$ac_ext <<_ACEOF
13107/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013108
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013109#include <sys/param.h>
13110#ifdef _TOSHIBA_INET6
13111yes
13112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013113_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013115 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013116 ipv6type=$i;
13117 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013118 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013119fi
13120rm -f conftest*
13121
13122 ;;
13123 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013125/* confdefs.h. */
13126_ACEOF
13127cat confdefs.h >>conftest.$ac_ext
13128cat >>conftest.$ac_ext <<_ACEOF
13129/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013131#include </usr/local/v6/include/sys/v6config.h>
13132#ifdef __V6D__
13133yes
13134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013135_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013137 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013138 ipv6type=$i;
13139 ipv6lib=v6;
13140 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013141 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013142fi
13143rm -f conftest*
13144
13145 ;;
13146 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013148/* confdefs.h. */
13149_ACEOF
13150cat confdefs.h >>conftest.$ac_ext
13151cat >>conftest.$ac_ext <<_ACEOF
13152/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013153
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013154#include <sys/param.h>
13155#ifdef _ZETA_MINAMI_INET6
13156yes
13157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013158_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013160 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013161 ipv6type=$i;
13162 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013163 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013164fi
13165rm -f conftest*
13166
13167 ;;
13168 esac
13169 if test "$ipv6type" != "unknown"; then
13170 break
13171 fi
13172 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 echo "$as_me:$LINENO: result: $ipv6type" >&5
13174echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013175fi
13176
13177if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13178 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13179 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13180 echo "using lib$ipv6lib"
13181 else
13182 if test $ipv6trylibc = "yes"; then
13183 echo "using libc"
13184 else
13185 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13186 echo "You need to fetch lib$ipv6lib.a from appropriate"
13187 echo 'ipv6 kit and compile beforehand.'
13188 exit 1
13189 fi
13190 fi
13191fi
13192
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013193# Check for --with-doc-strings
13194echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13195echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13196
13197# Check whether --with-doc-strings or --without-doc-strings was given.
13198if test "${with_doc_strings+set}" = set; then
13199 withval="$with_doc_strings"
13200
13201fi;
13202
13203if test -z "$with_doc_strings"
13204then with_doc_strings="yes"
13205fi
13206if test "$with_doc_strings" != "no"
13207then
13208
13209cat >>confdefs.h <<\_ACEOF
13210#define WITH_DOC_STRINGS 1
13211_ACEOF
13212
13213fi
13214echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13215echo "${ECHO_T}$with_doc_strings" >&6
13216
Neil Schemenauera35c6882001-02-27 04:45:05 +000013217# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013218echo "$as_me:$LINENO: checking for --with-tsc" >&5
13219echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13220
13221# Check whether --with-tsc or --without-tsc was given.
13222if test "${with_tsc+set}" = set; then
13223 withval="$with_tsc"
13224
13225if test "$withval" != no
13226then
13227
13228cat >>confdefs.h <<\_ACEOF
13229#define WITH_TSC 1
13230_ACEOF
13231
13232 echo "$as_me:$LINENO: result: yes" >&5
13233echo "${ECHO_T}yes" >&6
13234else echo "$as_me:$LINENO: result: no" >&5
13235echo "${ECHO_T}no" >&6
13236fi
13237else
13238 echo "$as_me:$LINENO: result: no" >&5
13239echo "${ECHO_T}no" >&6
13240fi;
13241
13242# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013243echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13244echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13245
Neil Schemenauera35c6882001-02-27 04:45:05 +000013246# Check whether --with-pymalloc or --without-pymalloc was given.
13247if test "${with_pymalloc+set}" = set; then
13248 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013249
Martin v. Löwis11437992002-04-12 09:54:03 +000013250fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013251
Neil Schemenauer16c22972002-03-22 15:34:49 +000013252if test -z "$with_pymalloc"
13253then with_pymalloc="yes"
13254fi
13255if test "$with_pymalloc" != "no"
13256then
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
13258cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013259#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013260_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013261
13262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013263echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13264echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013265
Barry Warsawef82cd72000-06-30 16:21:01 +000013266# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013267echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13268echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13269
Barry Warsawef82cd72000-06-30 16:21:01 +000013270# Check whether --with-wctype-functions or --without-wctype-functions was given.
13271if test "${with_wctype_functions+set}" = set; then
13272 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Barry Warsawef82cd72000-06-30 16:21:01 +000013274if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013275then
13276
13277cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013278#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013279_ACEOF
13280
13281 echo "$as_me:$LINENO: result: yes" >&5
13282echo "${ECHO_T}yes" >&6
13283else echo "$as_me:$LINENO: result: no" >&5
13284echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013285fi
13286else
Martin v. Löwis11437992002-04-12 09:54:03 +000013287 echo "$as_me:$LINENO: result: no" >&5
13288echo "${ECHO_T}no" >&6
13289fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013290
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013291# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013292
Guido van Rossum98935bf2001-09-05 19:13:16 +000013293DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013294
Guido van Rossume97ee181999-12-20 21:27:22 +000013295# the dlopen() function means we might want to use dynload_shlib.o. some
13296# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013297
Thomas Wouters3a584202000-08-05 23:28:51 +000013298for ac_func in dlopen
13299do
Martin v. Löwis11437992002-04-12 09:54:03 +000013300as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13301echo "$as_me:$LINENO: checking for $ac_func" >&5
13302echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13303if eval "test \"\${$as_ac_var+set}\" = set"; then
13304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013305else
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013307/* confdefs.h. */
13308_ACEOF
13309cat confdefs.h >>conftest.$ac_ext
13310cat >>conftest.$ac_ext <<_ACEOF
13311/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000013312/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013313 which can conflict with char $ac_func (); below.
13314 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013315 <limits.h> exists even on freestanding compilers. Under hpux,
13316 including <limits.h> includes <sys/time.h> and causes problems
13317 checking for functions defined therein. */
13318#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013319# include <limits.h>
13320#else
13321# include <assert.h>
13322#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013323/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013324#ifdef __cplusplus
13325extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013326{
Martin v. Löwis11437992002-04-12 09:54:03 +000013327#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013328/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 builtin and then its argument prototype would still apply. */
13330char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013331/* The GNU C library defines this for functions which it implements
13332 to always fail with ENOSYS. Some functions are actually named
13333 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013334#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013335choke me
13336#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013337char (*f) () = $ac_func;
13338#endif
13339#ifdef __cplusplus
13340}
Guido van Rossume97ee181999-12-20 21:27:22 +000013341#endif
13342
Skip Montanaro6dead952003-09-25 14:50:04 +000013343int
13344main ()
13345{
13346return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013347 ;
13348 return 0;
13349}
13350_ACEOF
13351rm -f conftest.$ac_objext conftest$ac_exeext
13352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013353 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013355 grep -v '^ *+' conftest.er1 >conftest.err
13356 rm -f conftest.er1
13357 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13359 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013360 { ac_try='test -z "$ac_c_werror_flag"
13361 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13363 (eval $ac_try) 2>&5
13364 ac_status=$?
13365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13366 (exit $ac_status); }; } &&
13367 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13369 (eval $ac_try) 2>&5
13370 ac_status=$?
13371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13372 (exit $ac_status); }; }; then
13373 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013374else
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013376sed 's/^/| /' conftest.$ac_ext >&5
13377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013379fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013380rm -f conftest.err conftest.$ac_objext \
13381 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013383echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13384echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13385if test `eval echo '${'$as_ac_var'}'` = yes; then
13386 cat >>confdefs.h <<_ACEOF
13387#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13388_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013389
Guido van Rossume97ee181999-12-20 21:27:22 +000013390fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013391done
Guido van Rossume97ee181999-12-20 21:27:22 +000013392
Michael W. Hudson54241132001-12-07 15:38:26 +000013393
Guido van Rossume97ee181999-12-20 21:27:22 +000013394# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13395# loading of modules.
13396
Martin v. Löwis11437992002-04-12 09:54:03 +000013397echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13398echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013399if test -z "$DYNLOADFILE"
13400then
13401 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013402 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13403 if test "$ac_cv_func_dlopen" = yes
13404 then DYNLOADFILE="dynload_shlib.o"
13405 else DYNLOADFILE="dynload_aix.o"
13406 fi
13407 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013408 BeOS*) DYNLOADFILE="dynload_beos.o";;
13409 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013410 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013411 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013412 *)
13413 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13414 # out any dynamic loading
13415 if test "$ac_cv_func_dlopen" = yes
13416 then DYNLOADFILE="dynload_shlib.o"
13417 else DYNLOADFILE="dynload_stub.o"
13418 fi
13419 ;;
13420 esac
13421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013422echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13423echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013424if test "$DYNLOADFILE" != "dynload_stub.o"
13425then
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
13427cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013428#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013429_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013430
13431fi
13432
Neil Schemenauer4e425612001-06-19 15:44:15 +000013433# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13434
Michael W. Hudson54241132001-12-07 15:38:26 +000013435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13437echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013438if test -z "$MACHDEP_OBJS"
13439then
Jack Jansene578a632001-08-15 01:27:14 +000013440 MACHDEP_OBJS=$extra_machdep_objs
13441else
13442 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013443fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013444echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13445echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013446
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
Martin v. Löwisd6320502004-08-12 13:45:08 +000013519
Martin v. Löwisc3001752005-01-23 09:27:24 +000013520
13521
Martin v. Löwisd6320502004-08-12 13:45:08 +000013522for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13523 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013524 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000013525 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013526 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013527 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013528 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013529 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013530 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013531 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013532 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013533 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013534do
Martin v. Löwis11437992002-04-12 09:54:03 +000013535as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13536echo "$as_me:$LINENO: checking for $ac_func" >&5
13537echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13538if eval "test \"\${$as_ac_var+set}\" = set"; then
13539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013540else
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013542/* confdefs.h. */
13543_ACEOF
13544cat confdefs.h >>conftest.$ac_ext
13545cat >>conftest.$ac_ext <<_ACEOF
13546/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013547/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013548 which can conflict with char $ac_func (); below.
13549 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013550 <limits.h> exists even on freestanding compilers. Under hpux,
13551 including <limits.h> includes <sys/time.h> and causes problems
13552 checking for functions defined therein. */
13553#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013554# include <limits.h>
13555#else
13556# include <assert.h>
13557#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013558/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013559#ifdef __cplusplus
13560extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013561{
Martin v. Löwis11437992002-04-12 09:54:03 +000013562#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013563/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 builtin and then its argument prototype would still apply. */
13565char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013566/* The GNU C library defines this for functions which it implements
13567 to always fail with ENOSYS. Some functions are actually named
13568 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013570choke me
13571#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013572char (*f) () = $ac_func;
13573#endif
13574#ifdef __cplusplus
13575}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013576#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577
Skip Montanaro6dead952003-09-25 14:50:04 +000013578int
13579main ()
13580{
13581return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;
13583 return 0;
13584}
13585_ACEOF
13586rm -f conftest.$ac_objext conftest$ac_exeext
13587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013588 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013590 grep -v '^ *+' conftest.er1 >conftest.err
13591 rm -f conftest.er1
13592 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13594 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013595 { ac_try='test -z "$ac_c_werror_flag"
13596 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13598 (eval $ac_try) 2>&5
13599 ac_status=$?
13600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13601 (exit $ac_status); }; } &&
13602 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13604 (eval $ac_try) 2>&5
13605 ac_status=$?
13606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13607 (exit $ac_status); }; }; then
13608 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013609else
Martin v. Löwis11437992002-04-12 09:54:03 +000013610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013611sed 's/^/| /' conftest.$ac_ext >&5
13612
Martin v. Löwis11437992002-04-12 09:54:03 +000013613eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013614fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013615rm -f conftest.err conftest.$ac_objext \
13616 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013617fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013618echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13619echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13620if test `eval echo '${'$as_ac_var'}'` = yes; then
13621 cat >>confdefs.h <<_ACEOF
13622#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13623_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013624
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013625fi
13626done
13627
Michael W. Hudson54241132001-12-07 15:38:26 +000013628
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013629# For some functions, having a definition is not sufficient, since
13630# we want to take their address.
13631echo "$as_me:$LINENO: checking for chroot" >&5
13632echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013634/* confdefs.h. */
13635_ACEOF
13636cat confdefs.h >>conftest.$ac_ext
13637cat >>conftest.$ac_ext <<_ACEOF
13638/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013639#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013640int
13641main ()
13642{
13643void *x=chroot
13644 ;
13645 return 0;
13646}
13647_ACEOF
13648rm -f conftest.$ac_objext
13649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013650 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013652 grep -v '^ *+' conftest.er1 >conftest.err
13653 rm -f conftest.er1
13654 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13656 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013657 { ac_try='test -z "$ac_c_werror_flag"
13658 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13660 (eval $ac_try) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); }; } &&
13664 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13666 (eval $ac_try) 2>&5
13667 ac_status=$?
13668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13669 (exit $ac_status); }; }; then
13670
13671cat >>confdefs.h <<\_ACEOF
13672#define HAVE_CHROOT 1
13673_ACEOF
13674
13675 echo "$as_me:$LINENO: result: yes" >&5
13676echo "${ECHO_T}yes" >&6
13677else
13678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013679sed 's/^/| /' conftest.$ac_ext >&5
13680
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013681echo "$as_me:$LINENO: result: no" >&5
13682echo "${ECHO_T}no" >&6
13683
13684fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013685rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013686echo "$as_me:$LINENO: checking for link" >&5
13687echo $ECHO_N "checking for link... $ECHO_C" >&6
13688cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013689/* confdefs.h. */
13690_ACEOF
13691cat confdefs.h >>conftest.$ac_ext
13692cat >>conftest.$ac_ext <<_ACEOF
13693/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013694#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013695int
13696main ()
13697{
13698void *x=link
13699 ;
13700 return 0;
13701}
13702_ACEOF
13703rm -f conftest.$ac_objext
13704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013705 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013707 grep -v '^ *+' conftest.er1 >conftest.err
13708 rm -f conftest.er1
13709 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13711 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013712 { ac_try='test -z "$ac_c_werror_flag"
13713 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13715 (eval $ac_try) 2>&5
13716 ac_status=$?
13717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718 (exit $ac_status); }; } &&
13719 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13721 (eval $ac_try) 2>&5
13722 ac_status=$?
13723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13724 (exit $ac_status); }; }; then
13725
13726cat >>confdefs.h <<\_ACEOF
13727#define HAVE_LINK 1
13728_ACEOF
13729
13730 echo "$as_me:$LINENO: result: yes" >&5
13731echo "${ECHO_T}yes" >&6
13732else
13733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013734sed 's/^/| /' conftest.$ac_ext >&5
13735
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013736echo "$as_me:$LINENO: result: no" >&5
13737echo "${ECHO_T}no" >&6
13738
13739fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013741echo "$as_me:$LINENO: checking for symlink" >&5
13742echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013744/* confdefs.h. */
13745_ACEOF
13746cat confdefs.h >>conftest.$ac_ext
13747cat >>conftest.$ac_ext <<_ACEOF
13748/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013749#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013750int
13751main ()
13752{
13753void *x=symlink
13754 ;
13755 return 0;
13756}
13757_ACEOF
13758rm -f conftest.$ac_objext
13759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013760 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013762 grep -v '^ *+' conftest.er1 >conftest.err
13763 rm -f conftest.er1
13764 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013767 { ac_try='test -z "$ac_c_werror_flag"
13768 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13770 (eval $ac_try) 2>&5
13771 ac_status=$?
13772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13773 (exit $ac_status); }; } &&
13774 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13776 (eval $ac_try) 2>&5
13777 ac_status=$?
13778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13779 (exit $ac_status); }; }; then
13780
13781cat >>confdefs.h <<\_ACEOF
13782#define HAVE_SYMLINK 1
13783_ACEOF
13784
13785 echo "$as_me:$LINENO: result: yes" >&5
13786echo "${ECHO_T}yes" >&6
13787else
13788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013789sed 's/^/| /' conftest.$ac_ext >&5
13790
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013791echo "$as_me:$LINENO: result: no" >&5
13792echo "${ECHO_T}no" >&6
13793
13794fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013796echo "$as_me:$LINENO: checking for fchdir" >&5
13797echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013799/* confdefs.h. */
13800_ACEOF
13801cat confdefs.h >>conftest.$ac_ext
13802cat >>conftest.$ac_ext <<_ACEOF
13803/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013804#include <unistd.h>
13805int
13806main ()
13807{
13808void *x=fchdir
13809 ;
13810 return 0;
13811}
13812_ACEOF
13813rm -f conftest.$ac_objext
13814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013815 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013817 grep -v '^ *+' conftest.er1 >conftest.err
13818 rm -f conftest.er1
13819 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13821 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013822 { ac_try='test -z "$ac_c_werror_flag"
13823 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13825 (eval $ac_try) 2>&5
13826 ac_status=$?
13827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13828 (exit $ac_status); }; } &&
13829 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13831 (eval $ac_try) 2>&5
13832 ac_status=$?
13833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13834 (exit $ac_status); }; }; then
13835
13836cat >>confdefs.h <<\_ACEOF
13837#define HAVE_FCHDIR 1
13838_ACEOF
13839
13840 echo "$as_me:$LINENO: result: yes" >&5
13841echo "${ECHO_T}yes" >&6
13842else
13843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013844sed 's/^/| /' conftest.$ac_ext >&5
13845
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013846echo "$as_me:$LINENO: result: no" >&5
13847echo "${ECHO_T}no" >&6
13848
13849fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013851echo "$as_me:$LINENO: checking for fsync" >&5
13852echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* confdefs.h. */
13855_ACEOF
13856cat confdefs.h >>conftest.$ac_ext
13857cat >>conftest.$ac_ext <<_ACEOF
13858/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013859#include <unistd.h>
13860int
13861main ()
13862{
13863void *x=fsync
13864 ;
13865 return 0;
13866}
13867_ACEOF
13868rm -f conftest.$ac_objext
13869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013870 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013872 grep -v '^ *+' conftest.er1 >conftest.err
13873 rm -f conftest.er1
13874 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13876 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013877 { ac_try='test -z "$ac_c_werror_flag"
13878 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13880 (eval $ac_try) 2>&5
13881 ac_status=$?
13882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883 (exit $ac_status); }; } &&
13884 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13886 (eval $ac_try) 2>&5
13887 ac_status=$?
13888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13889 (exit $ac_status); }; }; then
13890
13891cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013892#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013893_ACEOF
13894
13895 echo "$as_me:$LINENO: result: yes" >&5
13896echo "${ECHO_T}yes" >&6
13897else
13898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013899sed 's/^/| /' conftest.$ac_ext >&5
13900
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013901echo "$as_me:$LINENO: result: no" >&5
13902echo "${ECHO_T}no" >&6
13903
13904fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013905rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013906echo "$as_me:$LINENO: checking for fdatasync" >&5
13907echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13908cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013909/* confdefs.h. */
13910_ACEOF
13911cat confdefs.h >>conftest.$ac_ext
13912cat >>conftest.$ac_ext <<_ACEOF
13913/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013914#include <unistd.h>
13915int
13916main ()
13917{
13918void *x=fdatasync
13919 ;
13920 return 0;
13921}
13922_ACEOF
13923rm -f conftest.$ac_objext
13924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013925 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013927 grep -v '^ *+' conftest.er1 >conftest.err
13928 rm -f conftest.er1
13929 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13931 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013932 { ac_try='test -z "$ac_c_werror_flag"
13933 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13935 (eval $ac_try) 2>&5
13936 ac_status=$?
13937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13938 (exit $ac_status); }; } &&
13939 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13941 (eval $ac_try) 2>&5
13942 ac_status=$?
13943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13944 (exit $ac_status); }; }; then
13945
13946cat >>confdefs.h <<\_ACEOF
13947#define HAVE_FDATASYNC 1
13948_ACEOF
13949
13950 echo "$as_me:$LINENO: result: yes" >&5
13951echo "${ECHO_T}yes" >&6
13952else
13953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013954sed 's/^/| /' conftest.$ac_ext >&5
13955
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013956echo "$as_me:$LINENO: result: no" >&5
13957echo "${ECHO_T}no" >&6
13958
13959fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013960rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013961
Martin v. Löwisd5843682002-11-21 20:41:28 +000013962# On some systems (eg. FreeBSD 5), we would find a definition of the
13963# functions ctermid_r, setgroups in the library, but no prototype
13964# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13965# address to avoid compiler warnings and potential miscompilations
13966# because of the missing prototypes.
13967
13968echo "$as_me:$LINENO: checking for ctermid_r" >&5
13969echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13970cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013971/* confdefs.h. */
13972_ACEOF
13973cat confdefs.h >>conftest.$ac_ext
13974cat >>conftest.$ac_ext <<_ACEOF
13975/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013976
13977#include "confdefs.h"
13978#include <stdio.h>
13979
Martin v. Löwisd5843682002-11-21 20:41:28 +000013980int
13981main ()
13982{
13983void* p = ctermid_r
13984 ;
13985 return 0;
13986}
13987_ACEOF
13988rm -f conftest.$ac_objext
13989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013990 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000013991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013992 grep -v '^ *+' conftest.er1 >conftest.err
13993 rm -f conftest.er1
13994 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13996 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013997 { ac_try='test -z "$ac_c_werror_flag"
13998 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14000 (eval $ac_try) 2>&5
14001 ac_status=$?
14002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14003 (exit $ac_status); }; } &&
14004 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14006 (eval $ac_try) 2>&5
14007 ac_status=$?
14008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14009 (exit $ac_status); }; }; then
14010
14011cat >>confdefs.h <<\_ACEOF
14012#define HAVE_CTERMID_R 1
14013_ACEOF
14014
14015 echo "$as_me:$LINENO: result: yes" >&5
14016echo "${ECHO_T}yes" >&6
14017else
14018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014019sed 's/^/| /' conftest.$ac_ext >&5
14020
Martin v. Löwisd5843682002-11-21 20:41:28 +000014021echo "$as_me:$LINENO: result: no" >&5
14022echo "${ECHO_T}no" >&6
14023
14024fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014026
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014027echo "$as_me:$LINENO: checking for flock" >&5
14028echo $ECHO_N "checking for flock... $ECHO_C" >&6
14029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014030/* confdefs.h. */
14031_ACEOF
14032cat confdefs.h >>conftest.$ac_ext
14033cat >>conftest.$ac_ext <<_ACEOF
14034/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014035
14036#include "confdefs.h"
14037#include <sys/file.h>
14038
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014039int
14040main ()
14041{
14042void* p = flock
14043 ;
14044 return 0;
14045}
14046_ACEOF
14047rm -f conftest.$ac_objext
14048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014049 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014051 grep -v '^ *+' conftest.er1 >conftest.err
14052 rm -f conftest.er1
14053 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14055 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014056 { ac_try='test -z "$ac_c_werror_flag"
14057 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14059 (eval $ac_try) 2>&5
14060 ac_status=$?
14061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14062 (exit $ac_status); }; } &&
14063 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14065 (eval $ac_try) 2>&5
14066 ac_status=$?
14067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068 (exit $ac_status); }; }; then
14069
14070cat >>confdefs.h <<\_ACEOF
14071#define HAVE_FLOCK 1
14072_ACEOF
14073
14074 echo "$as_me:$LINENO: result: yes" >&5
14075echo "${ECHO_T}yes" >&6
14076else
14077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014078sed 's/^/| /' conftest.$ac_ext >&5
14079
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014080echo "$as_me:$LINENO: result: no" >&5
14081echo "${ECHO_T}no" >&6
14082
14083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014085
14086echo "$as_me:$LINENO: checking for getpagesize" >&5
14087echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014089/* confdefs.h. */
14090_ACEOF
14091cat confdefs.h >>conftest.$ac_ext
14092cat >>conftest.$ac_ext <<_ACEOF
14093/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014094
14095#include "confdefs.h"
14096#include <unistd.h>
14097
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014098int
14099main ()
14100{
14101void* p = getpagesize
14102 ;
14103 return 0;
14104}
14105_ACEOF
14106rm -f conftest.$ac_objext
14107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014108 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014110 grep -v '^ *+' conftest.er1 >conftest.err
14111 rm -f conftest.er1
14112 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14114 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014115 { ac_try='test -z "$ac_c_werror_flag"
14116 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14118 (eval $ac_try) 2>&5
14119 ac_status=$?
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); }; } &&
14122 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14124 (eval $ac_try) 2>&5
14125 ac_status=$?
14126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127 (exit $ac_status); }; }; then
14128
14129cat >>confdefs.h <<\_ACEOF
14130#define HAVE_GETPAGESIZE 1
14131_ACEOF
14132
14133 echo "$as_me:$LINENO: result: yes" >&5
14134echo "${ECHO_T}yes" >&6
14135else
14136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014137sed 's/^/| /' conftest.$ac_ext >&5
14138
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014139echo "$as_me:$LINENO: result: no" >&5
14140echo "${ECHO_T}no" >&6
14141
14142fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014143rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014144
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014145for ac_prog in true
14146do
14147 # Extract the first word of "$ac_prog", so it can be a program name with args.
14148set dummy $ac_prog; ac_word=$2
14149echo "$as_me:$LINENO: checking for $ac_word" >&5
14150echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14151if test "${ac_cv_prog_TRUE+set}" = set; then
14152 echo $ECHO_N "(cached) $ECHO_C" >&6
14153else
14154 if test -n "$TRUE"; then
14155 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14156else
14157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14158for as_dir in $PATH
14159do
14160 IFS=$as_save_IFS
14161 test -z "$as_dir" && as_dir=.
14162 for ac_exec_ext in '' $ac_executable_extensions; do
14163 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14164 ac_cv_prog_TRUE="$ac_prog"
14165 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14166 break 2
14167 fi
14168done
14169done
14170
14171fi
14172fi
14173TRUE=$ac_cv_prog_TRUE
14174if test -n "$TRUE"; then
14175 echo "$as_me:$LINENO: result: $TRUE" >&5
14176echo "${ECHO_T}$TRUE" >&6
14177else
14178 echo "$as_me:$LINENO: result: no" >&5
14179echo "${ECHO_T}no" >&6
14180fi
14181
14182 test -n "$TRUE" && break
14183done
14184test -n "$TRUE" || TRUE="/bin/true"
14185
14186
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014187echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14188echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14189if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14190 echo $ECHO_N "(cached) $ECHO_C" >&6
14191else
14192 ac_check_lib_save_LIBS=$LIBS
14193LIBS="-lc $LIBS"
14194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014195/* confdefs.h. */
14196_ACEOF
14197cat confdefs.h >>conftest.$ac_ext
14198cat >>conftest.$ac_ext <<_ACEOF
14199/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014200
14201/* Override any gcc2 internal prototype to avoid an error. */
14202#ifdef __cplusplus
14203extern "C"
14204#endif
14205/* We use char because int might match the return type of a gcc2
14206 builtin and then its argument prototype would still apply. */
14207char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014208int
14209main ()
14210{
14211inet_aton ();
14212 ;
14213 return 0;
14214}
14215_ACEOF
14216rm -f conftest.$ac_objext conftest$ac_exeext
14217if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014218 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014220 grep -v '^ *+' conftest.er1 >conftest.err
14221 rm -f conftest.er1
14222 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14224 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014225 { ac_try='test -z "$ac_c_werror_flag"
14226 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14228 (eval $ac_try) 2>&5
14229 ac_status=$?
14230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14231 (exit $ac_status); }; } &&
14232 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14234 (eval $ac_try) 2>&5
14235 ac_status=$?
14236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237 (exit $ac_status); }; }; then
14238 ac_cv_lib_c_inet_aton=yes
14239else
14240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014241sed 's/^/| /' conftest.$ac_ext >&5
14242
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014243ac_cv_lib_c_inet_aton=no
14244fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014245rm -f conftest.err conftest.$ac_objext \
14246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014247LIBS=$ac_check_lib_save_LIBS
14248fi
14249echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14250echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14251if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014252 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014253else
14254
14255echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14256echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14257if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14258 echo $ECHO_N "(cached) $ECHO_C" >&6
14259else
14260 ac_check_lib_save_LIBS=$LIBS
14261LIBS="-lresolv $LIBS"
14262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014263/* confdefs.h. */
14264_ACEOF
14265cat confdefs.h >>conftest.$ac_ext
14266cat >>conftest.$ac_ext <<_ACEOF
14267/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014268
14269/* Override any gcc2 internal prototype to avoid an error. */
14270#ifdef __cplusplus
14271extern "C"
14272#endif
14273/* We use char because int might match the return type of a gcc2
14274 builtin and then its argument prototype would still apply. */
14275char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014276int
14277main ()
14278{
14279inet_aton ();
14280 ;
14281 return 0;
14282}
14283_ACEOF
14284rm -f conftest.$ac_objext conftest$ac_exeext
14285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014286 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014288 grep -v '^ *+' conftest.er1 >conftest.err
14289 rm -f conftest.er1
14290 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14292 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014293 { ac_try='test -z "$ac_c_werror_flag"
14294 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14296 (eval $ac_try) 2>&5
14297 ac_status=$?
14298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14299 (exit $ac_status); }; } &&
14300 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14302 (eval $ac_try) 2>&5
14303 ac_status=$?
14304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14305 (exit $ac_status); }; }; then
14306 ac_cv_lib_resolv_inet_aton=yes
14307else
14308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014309sed 's/^/| /' conftest.$ac_ext >&5
14310
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014311ac_cv_lib_resolv_inet_aton=no
14312fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014313rm -f conftest.err conftest.$ac_objext \
14314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014315LIBS=$ac_check_lib_save_LIBS
14316fi
14317echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14318echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14319if test $ac_cv_lib_resolv_inet_aton = yes; then
14320 cat >>confdefs.h <<_ACEOF
14321#define HAVE_LIBRESOLV 1
14322_ACEOF
14323
14324 LIBS="-lresolv $LIBS"
14325
14326fi
14327
14328
14329fi
14330
14331
Martin v. Löwise9416172003-05-03 10:12:45 +000014332echo "$as_me:$LINENO: checking for hstrerror" >&5
14333echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14334cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014335/* confdefs.h. */
14336_ACEOF
14337cat confdefs.h >>conftest.$ac_ext
14338cat >>conftest.$ac_ext <<_ACEOF
14339/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014340
14341#include "confdefs.h"
14342#include <netdb.h>
14343
Martin v. Löwise9416172003-05-03 10:12:45 +000014344int
14345main ()
14346{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014347void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014348 ;
14349 return 0;
14350}
14351_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014352rm -f conftest.$ac_objext conftest$ac_exeext
14353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014354 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014356 grep -v '^ *+' conftest.er1 >conftest.err
14357 rm -f conftest.er1
14358 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14360 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014361 { ac_try='test -z "$ac_c_werror_flag"
14362 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14364 (eval $ac_try) 2>&5
14365 ac_status=$?
14366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14367 (exit $ac_status); }; } &&
14368 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14370 (eval $ac_try) 2>&5
14371 ac_status=$?
14372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14373 (exit $ac_status); }; }; then
14374
14375cat >>confdefs.h <<\_ACEOF
14376#define HAVE_HSTRERROR 1
14377_ACEOF
14378
14379 echo "$as_me:$LINENO: result: yes" >&5
14380echo "${ECHO_T}yes" >&6
14381else
14382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014383sed 's/^/| /' conftest.$ac_ext >&5
14384
Martin v. Löwise9416172003-05-03 10:12:45 +000014385echo "$as_me:$LINENO: result: no" >&5
14386echo "${ECHO_T}no" >&6
14387
14388fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014389rm -f conftest.err conftest.$ac_objext \
14390 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014391
14392echo "$as_me:$LINENO: checking for inet_aton" >&5
14393echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014395/* confdefs.h. */
14396_ACEOF
14397cat confdefs.h >>conftest.$ac_ext
14398cat >>conftest.$ac_ext <<_ACEOF
14399/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014400
14401#include "confdefs.h"
14402#include <sys/socket.h>
14403#include <netinet/in.h>
14404#include <arpa/inet.h>
14405
Martin v. Löwise9416172003-05-03 10:12:45 +000014406int
14407main ()
14408{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014409void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014410 ;
14411 return 0;
14412}
14413_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014414rm -f conftest.$ac_objext conftest$ac_exeext
14415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014416 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014418 grep -v '^ *+' conftest.er1 >conftest.err
14419 rm -f conftest.er1
14420 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014423 { ac_try='test -z "$ac_c_werror_flag"
14424 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14426 (eval $ac_try) 2>&5
14427 ac_status=$?
14428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14429 (exit $ac_status); }; } &&
14430 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14432 (eval $ac_try) 2>&5
14433 ac_status=$?
14434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14435 (exit $ac_status); }; }; then
14436
14437cat >>confdefs.h <<\_ACEOF
14438#define HAVE_INET_ATON 1
14439_ACEOF
14440
14441 echo "$as_me:$LINENO: result: yes" >&5
14442echo "${ECHO_T}yes" >&6
14443else
14444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014445sed 's/^/| /' conftest.$ac_ext >&5
14446
Martin v. Löwise9416172003-05-03 10:12:45 +000014447echo "$as_me:$LINENO: result: no" >&5
14448echo "${ECHO_T}no" >&6
14449
14450fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014451rm -f conftest.err conftest.$ac_objext \
14452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014453
14454echo "$as_me:$LINENO: checking for inet_pton" >&5
14455echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014457/* confdefs.h. */
14458_ACEOF
14459cat confdefs.h >>conftest.$ac_ext
14460cat >>conftest.$ac_ext <<_ACEOF
14461/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014462
14463#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014464#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014465#include <sys/socket.h>
14466#include <netinet/in.h>
14467#include <arpa/inet.h>
14468
Martin v. Löwise9416172003-05-03 10:12:45 +000014469int
14470main ()
14471{
14472void* p = inet_pton
14473 ;
14474 return 0;
14475}
14476_ACEOF
14477rm -f conftest.$ac_objext
14478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014479 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014481 grep -v '^ *+' conftest.er1 >conftest.err
14482 rm -f conftest.er1
14483 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14485 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014486 { ac_try='test -z "$ac_c_werror_flag"
14487 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14489 (eval $ac_try) 2>&5
14490 ac_status=$?
14491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14492 (exit $ac_status); }; } &&
14493 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14495 (eval $ac_try) 2>&5
14496 ac_status=$?
14497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14498 (exit $ac_status); }; }; then
14499
14500cat >>confdefs.h <<\_ACEOF
14501#define HAVE_INET_PTON 1
14502_ACEOF
14503
14504 echo "$as_me:$LINENO: result: yes" >&5
14505echo "${ECHO_T}yes" >&6
14506else
14507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014508sed 's/^/| /' conftest.$ac_ext >&5
14509
Martin v. Löwise9416172003-05-03 10:12:45 +000014510echo "$as_me:$LINENO: result: no" >&5
14511echo "${ECHO_T}no" >&6
14512
14513fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014515
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014516# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014517echo "$as_me:$LINENO: checking for setgroups" >&5
14518echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14519cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014520/* confdefs.h. */
14521_ACEOF
14522cat confdefs.h >>conftest.$ac_ext
14523cat >>conftest.$ac_ext <<_ACEOF
14524/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014525
14526#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014527#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014528#ifdef HAVE_GRP_H
14529#include <grp.h>
14530#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014531
Martin v. Löwisd5843682002-11-21 20:41:28 +000014532int
14533main ()
14534{
14535void* p = setgroups
14536 ;
14537 return 0;
14538}
14539_ACEOF
14540rm -f conftest.$ac_objext
14541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014542 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014544 grep -v '^ *+' conftest.er1 >conftest.err
14545 rm -f conftest.er1
14546 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14548 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014549 { ac_try='test -z "$ac_c_werror_flag"
14550 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14552 (eval $ac_try) 2>&5
14553 ac_status=$?
14554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14555 (exit $ac_status); }; } &&
14556 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14558 (eval $ac_try) 2>&5
14559 ac_status=$?
14560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14561 (exit $ac_status); }; }; then
14562
14563cat >>confdefs.h <<\_ACEOF
14564#define HAVE_SETGROUPS 1
14565_ACEOF
14566
14567 echo "$as_me:$LINENO: result: yes" >&5
14568echo "${ECHO_T}yes" >&6
14569else
14570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014571sed 's/^/| /' conftest.$ac_ext >&5
14572
Martin v. Löwisd5843682002-11-21 20:41:28 +000014573echo "$as_me:$LINENO: result: no" >&5
14574echo "${ECHO_T}no" >&6
14575
14576fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014577rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014578
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014579# check for openpty and forkpty
14580
Martin v. Löwis11437992002-04-12 09:54:03 +000014581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014582for ac_func in openpty
14583do
Martin v. Löwis11437992002-04-12 09:54:03 +000014584as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14585echo "$as_me:$LINENO: checking for $ac_func" >&5
14586echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14587if eval "test \"\${$as_ac_var+set}\" = set"; then
14588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014589else
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014591/* confdefs.h. */
14592_ACEOF
14593cat confdefs.h >>conftest.$ac_ext
14594cat >>conftest.$ac_ext <<_ACEOF
14595/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014596/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014597 which can conflict with char $ac_func (); below.
14598 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014599 <limits.h> exists even on freestanding compilers. Under hpux,
14600 including <limits.h> includes <sys/time.h> and causes problems
14601 checking for functions defined therein. */
14602#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014603# include <limits.h>
14604#else
14605# include <assert.h>
14606#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014607/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014608#ifdef __cplusplus
14609extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014610{
Martin v. Löwis11437992002-04-12 09:54:03 +000014611#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014612/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 builtin and then its argument prototype would still apply. */
14614char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014615/* The GNU C library defines this for functions which it implements
14616 to always fail with ENOSYS. Some functions are actually named
14617 something starting with __ and the normal name is an alias. */
14618#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14619choke me
14620#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014621char (*f) () = $ac_func;
14622#endif
14623#ifdef __cplusplus
14624}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014625#endif
14626
Skip Montanaro6dead952003-09-25 14:50:04 +000014627int
14628main ()
14629{
14630return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014631 ;
14632 return 0;
14633}
14634_ACEOF
14635rm -f conftest.$ac_objext conftest$ac_exeext
14636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014637 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014639 grep -v '^ *+' conftest.er1 >conftest.err
14640 rm -f conftest.er1
14641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14643 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014644 { ac_try='test -z "$ac_c_werror_flag"
14645 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14647 (eval $ac_try) 2>&5
14648 ac_status=$?
14649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14650 (exit $ac_status); }; } &&
14651 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14653 (eval $ac_try) 2>&5
14654 ac_status=$?
14655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14656 (exit $ac_status); }; }; then
14657 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014658else
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014660sed 's/^/| /' conftest.$ac_ext >&5
14661
Martin v. Löwis11437992002-04-12 09:54:03 +000014662eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014663fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014664rm -f conftest.err conftest.$ac_objext \
14665 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014667echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14668echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14669if test `eval echo '${'$as_ac_var'}'` = yes; then
14670 cat >>confdefs.h <<_ACEOF
14671#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14672_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014673
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014674else
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14676echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14677if test "${ac_cv_lib_util_openpty+set}" = set; then
14678 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014679else
Martin v. Löwis11437992002-04-12 09:54:03 +000014680 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014681LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014683/* confdefs.h. */
14684_ACEOF
14685cat confdefs.h >>conftest.$ac_ext
14686cat >>conftest.$ac_ext <<_ACEOF
14687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
Fred Drake8cef4cf2000-06-28 16:40:38 +000014689/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014690#ifdef __cplusplus
14691extern "C"
14692#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014693/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014694 builtin and then its argument prototype would still apply. */
14695char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014696int
14697main ()
14698{
14699openpty ();
14700 ;
14701 return 0;
14702}
14703_ACEOF
14704rm -f conftest.$ac_objext conftest$ac_exeext
14705if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014706 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014708 grep -v '^ *+' conftest.er1 >conftest.err
14709 rm -f conftest.er1
14710 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014713 { ac_try='test -z "$ac_c_werror_flag"
14714 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14716 (eval $ac_try) 2>&5
14717 ac_status=$?
14718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14719 (exit $ac_status); }; } &&
14720 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14722 (eval $ac_try) 2>&5
14723 ac_status=$?
14724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14725 (exit $ac_status); }; }; then
14726 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014727else
Martin v. Löwis11437992002-04-12 09:54:03 +000014728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014729sed 's/^/| /' conftest.$ac_ext >&5
14730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014732fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014733rm -f conftest.err conftest.$ac_objext \
14734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014735LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014737echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14738echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14739if test $ac_cv_lib_util_openpty = yes; then
14740 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014741#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014742_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014743 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014744else
14745 echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
14746echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6
14747if test "${ac_cv_lib_bsd_openpty+set}" = set; then
14748 echo $ECHO_N "(cached) $ECHO_C" >&6
14749else
14750 ac_check_lib_save_LIBS=$LIBS
14751LIBS="-lbsd $LIBS"
14752cat >conftest.$ac_ext <<_ACEOF
14753/* confdefs.h. */
14754_ACEOF
14755cat confdefs.h >>conftest.$ac_ext
14756cat >>conftest.$ac_ext <<_ACEOF
14757/* end confdefs.h. */
14758
14759/* Override any gcc2 internal prototype to avoid an error. */
14760#ifdef __cplusplus
14761extern "C"
14762#endif
14763/* We use char because int might match the return type of a gcc2
14764 builtin and then its argument prototype would still apply. */
14765char openpty ();
14766int
14767main ()
14768{
14769openpty ();
14770 ;
14771 return 0;
14772}
14773_ACEOF
14774rm -f conftest.$ac_objext conftest$ac_exeext
14775if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14776 (eval $ac_link) 2>conftest.er1
14777 ac_status=$?
14778 grep -v '^ *+' conftest.er1 >conftest.err
14779 rm -f conftest.er1
14780 cat conftest.err >&5
14781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14782 (exit $ac_status); } &&
14783 { ac_try='test -z "$ac_c_werror_flag"
14784 || test ! -s conftest.err'
14785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14786 (eval $ac_try) 2>&5
14787 ac_status=$?
14788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789 (exit $ac_status); }; } &&
14790 { ac_try='test -s conftest$ac_exeext'
14791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14792 (eval $ac_try) 2>&5
14793 ac_status=$?
14794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14795 (exit $ac_status); }; }; then
14796 ac_cv_lib_bsd_openpty=yes
14797else
14798 echo "$as_me: failed program was:" >&5
14799sed 's/^/| /' conftest.$ac_ext >&5
14800
14801ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014802fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014803rm -f conftest.err conftest.$ac_objext \
14804 conftest$ac_exeext conftest.$ac_ext
14805LIBS=$ac_check_lib_save_LIBS
14806fi
14807echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
14808echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6
14809if test $ac_cv_lib_bsd_openpty = yes; then
14810 cat >>confdefs.h <<\_ACEOF
14811#define HAVE_OPENPTY 1
14812_ACEOF
14813 LIBS="$LIBS -lbsd"
14814fi
14815
14816
14817fi
14818
Fred Drake8cef4cf2000-06-28 16:40:38 +000014819
14820fi
14821done
14822
Martin v. Löwis11437992002-04-12 09:54:03 +000014823
Fred Drake8cef4cf2000-06-28 16:40:38 +000014824for ac_func in forkpty
14825do
Martin v. Löwis11437992002-04-12 09:54:03 +000014826as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14827echo "$as_me:$LINENO: checking for $ac_func" >&5
14828echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14829if eval "test \"\${$as_ac_var+set}\" = set"; then
14830 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014831else
Martin v. Löwis11437992002-04-12 09:54:03 +000014832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014833/* confdefs.h. */
14834_ACEOF
14835cat confdefs.h >>conftest.$ac_ext
14836cat >>conftest.$ac_ext <<_ACEOF
14837/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014838/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014839 which can conflict with char $ac_func (); below.
14840 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014841 <limits.h> exists even on freestanding compilers. Under hpux,
14842 including <limits.h> includes <sys/time.h> and causes problems
14843 checking for functions defined therein. */
14844#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014845# include <limits.h>
14846#else
14847# include <assert.h>
14848#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014849/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014850#ifdef __cplusplus
14851extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014852{
Martin v. Löwis11437992002-04-12 09:54:03 +000014853#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014854/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 builtin and then its argument prototype would still apply. */
14856char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014857/* The GNU C library defines this for functions which it implements
14858 to always fail with ENOSYS. Some functions are actually named
14859 something starting with __ and the normal name is an alias. */
14860#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14861choke me
14862#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014863char (*f) () = $ac_func;
14864#endif
14865#ifdef __cplusplus
14866}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014867#endif
14868
Skip Montanaro6dead952003-09-25 14:50:04 +000014869int
14870main ()
14871{
14872return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014873 ;
14874 return 0;
14875}
14876_ACEOF
14877rm -f conftest.$ac_objext conftest$ac_exeext
14878if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014879 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014881 grep -v '^ *+' conftest.er1 >conftest.err
14882 rm -f conftest.er1
14883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14885 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014886 { ac_try='test -z "$ac_c_werror_flag"
14887 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14889 (eval $ac_try) 2>&5
14890 ac_status=$?
14891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14892 (exit $ac_status); }; } &&
14893 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14895 (eval $ac_try) 2>&5
14896 ac_status=$?
14897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14898 (exit $ac_status); }; }; then
14899 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014900else
Martin v. Löwis11437992002-04-12 09:54:03 +000014901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014902sed 's/^/| /' conftest.$ac_ext >&5
14903
Martin v. Löwis11437992002-04-12 09:54:03 +000014904eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014905fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014906rm -f conftest.err conftest.$ac_objext \
14907 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014908fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014909echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14910echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14911if test `eval echo '${'$as_ac_var'}'` = yes; then
14912 cat >>confdefs.h <<_ACEOF
14913#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14914_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014915
Fred Drake8cef4cf2000-06-28 16:40:38 +000014916else
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14918echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14919if test "${ac_cv_lib_util_forkpty+set}" = set; then
14920 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014921else
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014923LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014924cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014925/* confdefs.h. */
14926_ACEOF
14927cat confdefs.h >>conftest.$ac_ext
14928cat >>conftest.$ac_ext <<_ACEOF
14929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014930
Fred Drake8cef4cf2000-06-28 16:40:38 +000014931/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014932#ifdef __cplusplus
14933extern "C"
14934#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014935/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 builtin and then its argument prototype would still apply. */
14937char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014938int
14939main ()
14940{
14941forkpty ();
14942 ;
14943 return 0;
14944}
14945_ACEOF
14946rm -f conftest.$ac_objext conftest$ac_exeext
14947if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014948 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014950 grep -v '^ *+' conftest.er1 >conftest.err
14951 rm -f conftest.er1
14952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14954 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014955 { ac_try='test -z "$ac_c_werror_flag"
14956 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14958 (eval $ac_try) 2>&5
14959 ac_status=$?
14960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14961 (exit $ac_status); }; } &&
14962 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14964 (eval $ac_try) 2>&5
14965 ac_status=$?
14966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14967 (exit $ac_status); }; }; then
14968 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014969else
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014971sed 's/^/| /' conftest.$ac_ext >&5
14972
Martin v. Löwis11437992002-04-12 09:54:03 +000014973ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014974fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014975rm -f conftest.err conftest.$ac_objext \
14976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014977LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014978fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014979echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14980echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14981if test $ac_cv_lib_util_forkpty = yes; then
14982 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014983#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014984_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014985 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014986else
14987 echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
14988echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6
14989if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
14990 echo $ECHO_N "(cached) $ECHO_C" >&6
14991else
14992 ac_check_lib_save_LIBS=$LIBS
14993LIBS="-lbsd $LIBS"
14994cat >conftest.$ac_ext <<_ACEOF
14995/* confdefs.h. */
14996_ACEOF
14997cat confdefs.h >>conftest.$ac_ext
14998cat >>conftest.$ac_ext <<_ACEOF
14999/* end confdefs.h. */
15000
15001/* Override any gcc2 internal prototype to avoid an error. */
15002#ifdef __cplusplus
15003extern "C"
15004#endif
15005/* We use char because int might match the return type of a gcc2
15006 builtin and then its argument prototype would still apply. */
15007char forkpty ();
15008int
15009main ()
15010{
15011forkpty ();
15012 ;
15013 return 0;
15014}
15015_ACEOF
15016rm -f conftest.$ac_objext conftest$ac_exeext
15017if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15018 (eval $ac_link) 2>conftest.er1
15019 ac_status=$?
15020 grep -v '^ *+' conftest.er1 >conftest.err
15021 rm -f conftest.er1
15022 cat conftest.err >&5
15023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15024 (exit $ac_status); } &&
15025 { ac_try='test -z "$ac_c_werror_flag"
15026 || test ! -s conftest.err'
15027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15028 (eval $ac_try) 2>&5
15029 ac_status=$?
15030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15031 (exit $ac_status); }; } &&
15032 { ac_try='test -s conftest$ac_exeext'
15033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15034 (eval $ac_try) 2>&5
15035 ac_status=$?
15036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15037 (exit $ac_status); }; }; then
15038 ac_cv_lib_bsd_forkpty=yes
15039else
15040 echo "$as_me: failed program was:" >&5
15041sed 's/^/| /' conftest.$ac_ext >&5
15042
15043ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015044fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015045rm -f conftest.err conftest.$ac_objext \
15046 conftest$ac_exeext conftest.$ac_ext
15047LIBS=$ac_check_lib_save_LIBS
15048fi
15049echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
15050echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6
15051if test $ac_cv_lib_bsd_forkpty = yes; then
15052 cat >>confdefs.h <<\_ACEOF
15053#define HAVE_FORKPTY 1
15054_ACEOF
15055 LIBS="$LIBS -lbsd"
15056fi
15057
15058
15059fi
15060
Fred Drake8cef4cf2000-06-28 16:40:38 +000015061
15062fi
15063done
15064
Jack Jansendd19cf82001-12-06 22:36:17 +000015065
Michael W. Hudson54241132001-12-07 15:38:26 +000015066# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015067
15068
15069
15070
15071
15072
Fred Drake8cef4cf2000-06-28 16:40:38 +000015073for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
15074do
Martin v. Löwis11437992002-04-12 09:54:03 +000015075as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15076echo "$as_me:$LINENO: checking for $ac_func" >&5
15077echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15078if eval "test \"\${$as_ac_var+set}\" = set"; then
15079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015080else
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015082/* confdefs.h. */
15083_ACEOF
15084cat confdefs.h >>conftest.$ac_ext
15085cat >>conftest.$ac_ext <<_ACEOF
15086/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015087/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015088 which can conflict with char $ac_func (); below.
15089 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015090 <limits.h> exists even on freestanding compilers. Under hpux,
15091 including <limits.h> includes <sys/time.h> and causes problems
15092 checking for functions defined therein. */
15093#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015094# include <limits.h>
15095#else
15096# include <assert.h>
15097#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015098/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015099#ifdef __cplusplus
15100extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015101{
Martin v. Löwis11437992002-04-12 09:54:03 +000015102#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015103/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 builtin and then its argument prototype would still apply. */
15105char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015106/* The GNU C library defines this for functions which it implements
15107 to always fail with ENOSYS. Some functions are actually named
15108 something starting with __ and the normal name is an alias. */
15109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15110choke me
15111#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015112char (*f) () = $ac_func;
15113#endif
15114#ifdef __cplusplus
15115}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015116#endif
15117
Skip Montanaro6dead952003-09-25 14:50:04 +000015118int
15119main ()
15120{
15121return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 ;
15123 return 0;
15124}
15125_ACEOF
15126rm -f conftest.$ac_objext conftest$ac_exeext
15127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015128 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015130 grep -v '^ *+' conftest.er1 >conftest.err
15131 rm -f conftest.er1
15132 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15134 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015135 { ac_try='test -z "$ac_c_werror_flag"
15136 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15138 (eval $ac_try) 2>&5
15139 ac_status=$?
15140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15141 (exit $ac_status); }; } &&
15142 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15144 (eval $ac_try) 2>&5
15145 ac_status=$?
15146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15147 (exit $ac_status); }; }; then
15148 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015149else
Martin v. Löwis11437992002-04-12 09:54:03 +000015150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015151sed 's/^/| /' conftest.$ac_ext >&5
15152
Martin v. Löwis11437992002-04-12 09:54:03 +000015153eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015154fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015155rm -f conftest.err conftest.$ac_objext \
15156 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015158echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15159echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15160if test `eval echo '${'$as_ac_var'}'` = yes; then
15161 cat >>confdefs.h <<_ACEOF
15162#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15163_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015164
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015165fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015166done
15167
Michael W. Hudson54241132001-12-07 15:38:26 +000015168
Martin v. Löwis11437992002-04-12 09:54:03 +000015169
15170
15171
15172
15173
Martin v. Löwis1142de32002-03-29 16:28:31 +000015174for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000015175do
Martin v. Löwis11437992002-04-12 09:54:03 +000015176as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15177echo "$as_me:$LINENO: checking for $ac_func" >&5
15178echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15179if eval "test \"\${$as_ac_var+set}\" = set"; then
15180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015181else
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015183/* confdefs.h. */
15184_ACEOF
15185cat confdefs.h >>conftest.$ac_ext
15186cat >>conftest.$ac_ext <<_ACEOF
15187/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015188/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015189 which can conflict with char $ac_func (); below.
15190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015191 <limits.h> exists even on freestanding compilers. Under hpux,
15192 including <limits.h> includes <sys/time.h> and causes problems
15193 checking for functions defined therein. */
15194#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015195# include <limits.h>
15196#else
15197# include <assert.h>
15198#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015199/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015200#ifdef __cplusplus
15201extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015202{
Martin v. Löwis11437992002-04-12 09:54:03 +000015203#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015204/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 builtin and then its argument prototype would still apply. */
15206char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015207/* The GNU C library defines this for functions which it implements
15208 to always fail with ENOSYS. Some functions are actually named
15209 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015210#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015211choke me
15212#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015213char (*f) () = $ac_func;
15214#endif
15215#ifdef __cplusplus
15216}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015217#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015218
Skip Montanaro6dead952003-09-25 14:50:04 +000015219int
15220main ()
15221{
15222return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ;
15224 return 0;
15225}
15226_ACEOF
15227rm -f conftest.$ac_objext conftest$ac_exeext
15228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015229 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015231 grep -v '^ *+' conftest.er1 >conftest.err
15232 rm -f conftest.er1
15233 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15235 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015236 { ac_try='test -z "$ac_c_werror_flag"
15237 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15239 (eval $ac_try) 2>&5
15240 ac_status=$?
15241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15242 (exit $ac_status); }; } &&
15243 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15245 (eval $ac_try) 2>&5
15246 ac_status=$?
15247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15248 (exit $ac_status); }; }; then
15249 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015250else
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015252sed 's/^/| /' conftest.$ac_ext >&5
15253
Martin v. Löwis11437992002-04-12 09:54:03 +000015254eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015255fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015256rm -f conftest.err conftest.$ac_objext \
15257 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015259echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15260echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15261if test `eval echo '${'$as_ac_var'}'` = yes; then
15262 cat >>confdefs.h <<_ACEOF
15263#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15264_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015265
Martin v. Löwis1142de32002-03-29 16:28:31 +000015266else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015267 case $LIBOBJS in
15268 "$ac_func.$ac_objext" | \
15269 *" $ac_func.$ac_objext" | \
15270 "$ac_func.$ac_objext "* | \
15271 *" $ac_func.$ac_objext "* ) ;;
15272 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15273esac
15274
Martin v. Löwis1142de32002-03-29 16:28:31 +000015275fi
15276done
15277
15278
Martin v. Löwis11437992002-04-12 09:54:03 +000015279
Martin v. Löwis1142de32002-03-29 16:28:31 +000015280for ac_func in getpgrp
15281do
Martin v. Löwis11437992002-04-12 09:54:03 +000015282as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15283echo "$as_me:$LINENO: checking for $ac_func" >&5
15284echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15285if eval "test \"\${$as_ac_var+set}\" = set"; then
15286 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015287else
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015289/* confdefs.h. */
15290_ACEOF
15291cat confdefs.h >>conftest.$ac_ext
15292cat >>conftest.$ac_ext <<_ACEOF
15293/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000015294/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015295 which can conflict with char $ac_func (); below.
15296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015297 <limits.h> exists even on freestanding compilers. Under hpux,
15298 including <limits.h> includes <sys/time.h> and causes problems
15299 checking for functions defined therein. */
15300#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015301# include <limits.h>
15302#else
15303# include <assert.h>
15304#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015305/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015306#ifdef __cplusplus
15307extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015308{
Martin v. Löwis11437992002-04-12 09:54:03 +000015309#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015310/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015311 builtin and then its argument prototype would still apply. */
15312char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015313/* The GNU C library defines this for functions which it implements
15314 to always fail with ENOSYS. Some functions are actually named
15315 something starting with __ and the normal name is an alias. */
15316#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15317choke me
15318#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015319char (*f) () = $ac_func;
15320#endif
15321#ifdef __cplusplus
15322}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015323#endif
15324
Skip Montanaro6dead952003-09-25 14:50:04 +000015325int
15326main ()
15327{
15328return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 ;
15330 return 0;
15331}
15332_ACEOF
15333rm -f conftest.$ac_objext conftest$ac_exeext
15334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015335 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015337 grep -v '^ *+' conftest.er1 >conftest.err
15338 rm -f conftest.er1
15339 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15341 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015342 { ac_try='test -z "$ac_c_werror_flag"
15343 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15345 (eval $ac_try) 2>&5
15346 ac_status=$?
15347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15348 (exit $ac_status); }; } &&
15349 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15351 (eval $ac_try) 2>&5
15352 ac_status=$?
15353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15354 (exit $ac_status); }; }; then
15355 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015356else
Martin v. Löwis11437992002-04-12 09:54:03 +000015357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015358sed 's/^/| /' conftest.$ac_ext >&5
15359
Martin v. Löwis11437992002-04-12 09:54:03 +000015360eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015361fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015362rm -f conftest.err conftest.$ac_objext \
15363 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015365echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15366echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15367if test `eval echo '${'$as_ac_var'}'` = yes; then
15368 cat >>confdefs.h <<_ACEOF
15369#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15370_ACEOF
15371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015372/* confdefs.h. */
15373_ACEOF
15374cat confdefs.h >>conftest.$ac_ext
15375cat >>conftest.$ac_ext <<_ACEOF
15376/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015377#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015378int
15379main ()
15380{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015381getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015382 ;
15383 return 0;
15384}
15385_ACEOF
15386rm -f conftest.$ac_objext
15387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015388 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015390 grep -v '^ *+' conftest.er1 >conftest.err
15391 rm -f conftest.er1
15392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15394 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015395 { ac_try='test -z "$ac_c_werror_flag"
15396 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15398 (eval $ac_try) 2>&5
15399 ac_status=$?
15400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15401 (exit $ac_status); }; } &&
15402 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15404 (eval $ac_try) 2>&5
15405 ac_status=$?
15406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15407 (exit $ac_status); }; }; then
15408
15409cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015410#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015411_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015412
Martin v. Löwis11437992002-04-12 09:54:03 +000015413
Guido van Rossumf78abae1997-01-21 22:02:36 +000015414else
Martin v. Löwis11437992002-04-12 09:54:03 +000015415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015416sed 's/^/| /' conftest.$ac_ext >&5
15417
Guido van Rossum627b2d71993-12-24 10:39:16 +000015418fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015419rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015420
Guido van Rossum627b2d71993-12-24 10:39:16 +000015421fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015422done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015423
Jack Jansen150753c2003-03-29 22:07:47 +000015424
15425for ac_func in setpgrp
15426do
15427as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15428echo "$as_me:$LINENO: checking for $ac_func" >&5
15429echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15430if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015432else
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015434/* confdefs.h. */
15435_ACEOF
15436cat confdefs.h >>conftest.$ac_ext
15437cat >>conftest.$ac_ext <<_ACEOF
15438/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015439/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015440 which can conflict with char $ac_func (); below.
15441 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015442 <limits.h> exists even on freestanding compilers. Under hpux,
15443 including <limits.h> includes <sys/time.h> and causes problems
15444 checking for functions defined therein. */
15445#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015446# include <limits.h>
15447#else
15448# include <assert.h>
15449#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015450/* Override any gcc2 internal prototype to avoid an error. */
15451#ifdef __cplusplus
15452extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015453{
Martin v. Löwis11437992002-04-12 09:54:03 +000015454#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015455/* We use char because int might match the return type of a gcc2
15456 builtin and then its argument prototype would still apply. */
15457char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015458/* The GNU C library defines this for functions which it implements
15459 to always fail with ENOSYS. Some functions are actually named
15460 something starting with __ and the normal name is an alias. */
15461#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15462choke me
15463#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015464char (*f) () = $ac_func;
15465#endif
15466#ifdef __cplusplus
15467}
Jack Jansen150753c2003-03-29 22:07:47 +000015468#endif
15469
Skip Montanaro6dead952003-09-25 14:50:04 +000015470int
15471main ()
15472{
15473return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015474 ;
15475 return 0;
15476}
15477_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015478rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015479if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015480 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015482 grep -v '^ *+' conftest.er1 >conftest.err
15483 rm -f conftest.er1
15484 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015486 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015487 { ac_try='test -z "$ac_c_werror_flag"
15488 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15490 (eval $ac_try) 2>&5
15491 ac_status=$?
15492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15493 (exit $ac_status); }; } &&
15494 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15496 (eval $ac_try) 2>&5
15497 ac_status=$?
15498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15499 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015500 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015501else
Jack Jansen150753c2003-03-29 22:07:47 +000015502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015503sed 's/^/| /' conftest.$ac_ext >&5
15504
Jack Jansen150753c2003-03-29 22:07:47 +000015505eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015506fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015507rm -f conftest.err conftest.$ac_objext \
15508 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015509fi
Jack Jansen150753c2003-03-29 22:07:47 +000015510echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15511echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15512if test `eval echo '${'$as_ac_var'}'` = yes; then
15513 cat >>confdefs.h <<_ACEOF
15514#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15515_ACEOF
15516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015517/* confdefs.h. */
15518_ACEOF
15519cat confdefs.h >>conftest.$ac_ext
15520cat >>conftest.$ac_ext <<_ACEOF
15521/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015522#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015523int
15524main ()
15525{
15526setpgrp(0,0);
15527 ;
15528 return 0;
15529}
15530_ACEOF
15531rm -f conftest.$ac_objext
15532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015533 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015535 grep -v '^ *+' conftest.er1 >conftest.err
15536 rm -f conftest.er1
15537 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15539 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015540 { ac_try='test -z "$ac_c_werror_flag"
15541 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15543 (eval $ac_try) 2>&5
15544 ac_status=$?
15545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15546 (exit $ac_status); }; } &&
15547 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000015548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15549 (eval $ac_try) 2>&5
15550 ac_status=$?
15551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15552 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015553
15554cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015555#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015556_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015557
Jack Jansen150753c2003-03-29 22:07:47 +000015558
15559else
15560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015561sed 's/^/| /' conftest.$ac_ext >&5
15562
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015563fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015564rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015565
15566fi
15567done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015568
Martin v. Löwis11437992002-04-12 09:54:03 +000015569
Thomas Wouters3a584202000-08-05 23:28:51 +000015570for ac_func in gettimeofday
15571do
Martin v. Löwis11437992002-04-12 09:54:03 +000015572as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15573echo "$as_me:$LINENO: checking for $ac_func" >&5
15574echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15575if eval "test \"\${$as_ac_var+set}\" = set"; then
15576 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015577else
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015579/* confdefs.h. */
15580_ACEOF
15581cat confdefs.h >>conftest.$ac_ext
15582cat >>conftest.$ac_ext <<_ACEOF
15583/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015584/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015585 which can conflict with char $ac_func (); below.
15586 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015587 <limits.h> exists even on freestanding compilers. Under hpux,
15588 including <limits.h> includes <sys/time.h> and causes problems
15589 checking for functions defined therein. */
15590#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015591# include <limits.h>
15592#else
15593# include <assert.h>
15594#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015595/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015596#ifdef __cplusplus
15597extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015598{
Martin v. Löwis11437992002-04-12 09:54:03 +000015599#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015600/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 builtin and then its argument prototype would still apply. */
15602char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015603/* The GNU C library defines this for functions which it implements
15604 to always fail with ENOSYS. Some functions are actually named
15605 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015606#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015607choke me
15608#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015609char (*f) () = $ac_func;
15610#endif
15611#ifdef __cplusplus
15612}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015613#endif
15614
Skip Montanaro6dead952003-09-25 14:50:04 +000015615int
15616main ()
15617{
15618return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 ;
15620 return 0;
15621}
15622_ACEOF
15623rm -f conftest.$ac_objext conftest$ac_exeext
15624if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015625 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015627 grep -v '^ *+' conftest.er1 >conftest.err
15628 rm -f conftest.er1
15629 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15631 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015632 { ac_try='test -z "$ac_c_werror_flag"
15633 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15635 (eval $ac_try) 2>&5
15636 ac_status=$?
15637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15638 (exit $ac_status); }; } &&
15639 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15641 (eval $ac_try) 2>&5
15642 ac_status=$?
15643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15644 (exit $ac_status); }; }; then
15645 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015646else
Martin v. Löwis11437992002-04-12 09:54:03 +000015647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015648sed 's/^/| /' conftest.$ac_ext >&5
15649
Martin v. Löwis11437992002-04-12 09:54:03 +000015650eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015651fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015652rm -f conftest.err conftest.$ac_objext \
15653 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015655echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15656echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15657if test `eval echo '${'$as_ac_var'}'` = yes; then
15658 cat >>confdefs.h <<_ACEOF
15659#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15660_ACEOF
15661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015662/* confdefs.h. */
15663_ACEOF
15664cat confdefs.h >>conftest.$ac_ext
15665cat >>conftest.$ac_ext <<_ACEOF
15666/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015667#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015668int
15669main ()
15670{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015671gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 ;
15673 return 0;
15674}
15675_ACEOF
15676rm -f conftest.$ac_objext
15677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015678 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015680 grep -v '^ *+' conftest.er1 >conftest.err
15681 rm -f conftest.er1
15682 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15684 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015685 { ac_try='test -z "$ac_c_werror_flag"
15686 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15688 (eval $ac_try) 2>&5
15689 ac_status=$?
15690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691 (exit $ac_status); }; } &&
15692 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15694 (eval $ac_try) 2>&5
15695 ac_status=$?
15696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015698 :
15699else
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015701sed 's/^/| /' conftest.$ac_ext >&5
15702
Martin v. Löwis11437992002-04-12 09:54:03 +000015703
15704cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015705#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015706_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015707
Martin v. Löwis11437992002-04-12 09:54:03 +000015708
Guido van Rossum627b2d71993-12-24 10:39:16 +000015709fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015710rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015711
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015712fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015713done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015714
Michael W. Hudson54241132001-12-07 15:38:26 +000015715
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015716echo "$as_me:$LINENO: checking for major" >&5
15717echo $ECHO_N "checking for major... $ECHO_C" >&6
15718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015719/* confdefs.h. */
15720_ACEOF
15721cat confdefs.h >>conftest.$ac_ext
15722cat >>conftest.$ac_ext <<_ACEOF
15723/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015724
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015725#if defined(MAJOR_IN_MKDEV)
15726#include <sys/mkdev.h>
15727#elif defined(MAJOR_IN_SYSMACROS)
15728#include <sys/sysmacros.h>
15729#else
15730#include <sys/types.h>
15731#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015732
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015733int
15734main ()
15735{
15736
15737 makedev(major(0),minor(0));
15738
15739 ;
15740 return 0;
15741}
15742_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000015743rm -f conftest.$ac_objext conftest$ac_exeext
15744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015745 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015747 grep -v '^ *+' conftest.er1 >conftest.err
15748 rm -f conftest.er1
15749 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15751 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015752 { ac_try='test -z "$ac_c_werror_flag"
15753 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15755 (eval $ac_try) 2>&5
15756 ac_status=$?
15757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15758 (exit $ac_status); }; } &&
15759 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15761 (eval $ac_try) 2>&5
15762 ac_status=$?
15763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764 (exit $ac_status); }; }; then
15765
15766
15767cat >>confdefs.h <<\_ACEOF
15768#define HAVE_DEVICE_MACROS 1
15769_ACEOF
15770
15771 echo "$as_me:$LINENO: result: yes" >&5
15772echo "${ECHO_T}yes" >&6
15773
15774else
15775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015776sed 's/^/| /' conftest.$ac_ext >&5
15777
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015778
15779 echo "$as_me:$LINENO: result: no" >&5
15780echo "${ECHO_T}no" >&6
15781
15782fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015783rm -f conftest.err conftest.$ac_objext \
15784 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015785
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015786# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015787# for [no]getaddrinfo in netdb.h.
15788echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15789echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
15790cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015791/* confdefs.h. */
15792_ACEOF
15793cat confdefs.h >>conftest.$ac_ext
15794cat >>conftest.$ac_ext <<_ACEOF
15795/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015796
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015797#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015798#include <sys/socket.h>
15799#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015800#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015801
Martin v. Löwis11437992002-04-12 09:54:03 +000015802int
15803main ()
15804{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015805
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015806getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015807
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 ;
15809 return 0;
15810}
15811_ACEOF
15812rm -f conftest.$ac_objext conftest$ac_exeext
15813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015814 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015816 grep -v '^ *+' conftest.er1 >conftest.err
15817 rm -f conftest.er1
15818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015821 { ac_try='test -z "$ac_c_werror_flag"
15822 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15824 (eval $ac_try) 2>&5
15825 ac_status=$?
15826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15827 (exit $ac_status); }; } &&
15828 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15830 (eval $ac_try) 2>&5
15831 ac_status=$?
15832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15833 (exit $ac_status); }; }; then
15834
15835echo "$as_me:$LINENO: result: yes" >&5
15836echo "${ECHO_T}yes" >&6
15837echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
15838echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015839if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015840 echo "$as_me:$LINENO: result: buggy" >&5
15841echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015842buggygetaddrinfo=yes
15843else
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015845/* confdefs.h. */
15846_ACEOF
15847cat confdefs.h >>conftest.$ac_ext
15848cat >>conftest.$ac_ext <<_ACEOF
15849/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015850
15851#include <sys/types.h>
15852#include <netdb.h>
15853#include <string.h>
15854#include <sys/socket.h>
15855#include <netinet/in.h>
15856
15857main()
15858{
15859 int passive, gaierr, inet4 = 0, inet6 = 0;
15860 struct addrinfo hints, *ai, *aitop;
15861 char straddr[INET6_ADDRSTRLEN], strport[16];
15862
15863 for (passive = 0; passive <= 1; passive++) {
15864 memset(&hints, 0, sizeof(hints));
15865 hints.ai_family = AF_UNSPEC;
15866 hints.ai_flags = passive ? AI_PASSIVE : 0;
15867 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015868 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015869 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15870 (void)gai_strerror(gaierr);
15871 goto bad;
15872 }
15873 for (ai = aitop; ai; ai = ai->ai_next) {
15874 if (ai->ai_addr == NULL ||
15875 ai->ai_addrlen == 0 ||
15876 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15877 straddr, sizeof(straddr), strport, sizeof(strport),
15878 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15879 goto bad;
15880 }
15881 switch (ai->ai_family) {
15882 case AF_INET:
15883 if (strcmp(strport, "54321") != 0) {
15884 goto bad;
15885 }
15886 if (passive) {
15887 if (strcmp(straddr, "0.0.0.0") != 0) {
15888 goto bad;
15889 }
15890 } else {
15891 if (strcmp(straddr, "127.0.0.1") != 0) {
15892 goto bad;
15893 }
15894 }
15895 inet4++;
15896 break;
15897 case AF_INET6:
15898 if (strcmp(strport, "54321") != 0) {
15899 goto bad;
15900 }
15901 if (passive) {
15902 if (strcmp(straddr, "::") != 0) {
15903 goto bad;
15904 }
15905 } else {
15906 if (strcmp(straddr, "::1") != 0) {
15907 goto bad;
15908 }
15909 }
15910 inet6++;
15911 break;
15912 case AF_UNSPEC:
15913 goto bad;
15914 break;
15915 default:
15916 /* another family support? */
15917 break;
15918 }
15919 }
15920 }
15921
15922 if (!(inet4 == 0 || inet4 == 2))
15923 goto bad;
15924 if (!(inet6 == 0 || inet6 == 2))
15925 goto bad;
15926
15927 if (aitop)
15928 freeaddrinfo(aitop);
15929 exit(0);
15930
15931 bad:
15932 if (aitop)
15933 freeaddrinfo(aitop);
15934 exit(1);
15935}
15936
Martin v. Löwis11437992002-04-12 09:54:03 +000015937_ACEOF
15938rm -f conftest$ac_exeext
15939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15940 (eval $ac_link) 2>&5
15941 ac_status=$?
15942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15945 (eval $ac_try) 2>&5
15946 ac_status=$?
15947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948 (exit $ac_status); }; }; then
15949 echo "$as_me:$LINENO: result: good" >&5
15950echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015951buggygetaddrinfo=no
15952else
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 echo "$as_me: program exited with status $ac_status" >&5
15954echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015955sed 's/^/| /' conftest.$ac_ext >&5
15956
Martin v. Löwis11437992002-04-12 09:54:03 +000015957( exit $ac_status )
15958echo "$as_me:$LINENO: result: buggy" >&5
15959echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015960buggygetaddrinfo=yes
15961fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015962rm -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 +000015963fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015964else
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015966sed 's/^/| /' conftest.$ac_ext >&5
15967
Martin v. Löwis11437992002-04-12 09:54:03 +000015968
15969echo "$as_me:$LINENO: result: no" >&5
15970echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015971buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015972
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015973fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015974rm -f conftest.err conftest.$ac_objext \
15975 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015976
15977if test "$buggygetaddrinfo" = "yes"; then
15978 if test "$ipv6" = "yes"; then
15979 echo 'Fatal: You must get working getaddrinfo() function.'
15980 echo ' or you can specify "--disable-ipv6"'.
15981 exit 1
15982 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015983else
Martin v. Löwis11437992002-04-12 09:54:03 +000015984
15985cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015986#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015987_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015988
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015989fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015991for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015992do
Martin v. Löwis11437992002-04-12 09:54:03 +000015993as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15994echo "$as_me:$LINENO: checking for $ac_func" >&5
15995echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15996if eval "test \"\${$as_ac_var+set}\" = set"; then
15997 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015998else
Martin v. Löwis11437992002-04-12 09:54:03 +000015999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016000/* confdefs.h. */
16001_ACEOF
16002cat confdefs.h >>conftest.$ac_ext
16003cat >>conftest.$ac_ext <<_ACEOF
16004/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016005/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016006 which can conflict with char $ac_func (); below.
16007 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016008 <limits.h> exists even on freestanding compilers. Under hpux,
16009 including <limits.h> includes <sys/time.h> and causes problems
16010 checking for functions defined therein. */
16011#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016012# include <limits.h>
16013#else
16014# include <assert.h>
16015#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016016/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016017#ifdef __cplusplus
16018extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016019{
Martin v. Löwis11437992002-04-12 09:54:03 +000016020#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016021/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 builtin and then its argument prototype would still apply. */
16023char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016024/* The GNU C library defines this for functions which it implements
16025 to always fail with ENOSYS. Some functions are actually named
16026 something starting with __ and the normal name is an alias. */
16027#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16028choke me
16029#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016030char (*f) () = $ac_func;
16031#endif
16032#ifdef __cplusplus
16033}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016034#endif
16035
Skip Montanaro6dead952003-09-25 14:50:04 +000016036int
16037main ()
16038{
16039return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016040 ;
16041 return 0;
16042}
16043_ACEOF
16044rm -f conftest.$ac_objext conftest$ac_exeext
16045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016046 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016048 grep -v '^ *+' conftest.er1 >conftest.err
16049 rm -f conftest.er1
16050 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016053 { ac_try='test -z "$ac_c_werror_flag"
16054 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16056 (eval $ac_try) 2>&5
16057 ac_status=$?
16058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16059 (exit $ac_status); }; } &&
16060 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16062 (eval $ac_try) 2>&5
16063 ac_status=$?
16064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16065 (exit $ac_status); }; }; then
16066 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016067else
Martin v. Löwis11437992002-04-12 09:54:03 +000016068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016069sed 's/^/| /' conftest.$ac_ext >&5
16070
Martin v. Löwis11437992002-04-12 09:54:03 +000016071eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016072fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016073rm -f conftest.err conftest.$ac_objext \
16074 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016075fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016076echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16077echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16078if test `eval echo '${'$as_ac_var'}'` = yes; then
16079 cat >>confdefs.h <<_ACEOF
16080#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16081_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016082
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016083fi
16084done
16085
Michael W. Hudson54241132001-12-07 15:38:26 +000016086
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016087# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000016088echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
16089echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16090if test "${ac_cv_header_time+set}" = set; then
16091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016092else
Martin v. Löwis11437992002-04-12 09:54:03 +000016093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016094/* confdefs.h. */
16095_ACEOF
16096cat confdefs.h >>conftest.$ac_ext
16097cat >>conftest.$ac_ext <<_ACEOF
16098/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016099#include <sys/types.h>
16100#include <sys/time.h>
16101#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016102
Martin v. Löwis11437992002-04-12 09:54:03 +000016103int
16104main ()
16105{
16106if ((struct tm *) 0)
16107return 0;
16108 ;
16109 return 0;
16110}
16111_ACEOF
16112rm -f conftest.$ac_objext
16113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016114 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016116 grep -v '^ *+' conftest.er1 >conftest.err
16117 rm -f conftest.er1
16118 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16120 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016121 { ac_try='test -z "$ac_c_werror_flag"
16122 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16124 (eval $ac_try) 2>&5
16125 ac_status=$?
16126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16127 (exit $ac_status); }; } &&
16128 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16130 (eval $ac_try) 2>&5
16131 ac_status=$?
16132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16133 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016134 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016135else
Martin v. Löwis11437992002-04-12 09:54:03 +000016136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016137sed 's/^/| /' conftest.$ac_ext >&5
16138
Martin v. Löwis11437992002-04-12 09:54:03 +000016139ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016140fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016141rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016142fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016143echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
16144echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016145if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016146
16147cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016148#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016149_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016150
16151fi
16152
Martin v. Löwis11437992002-04-12 09:54:03 +000016153echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
16154echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
16155if test "${ac_cv_struct_tm+set}" = set; then
16156 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016157else
Martin v. Löwis11437992002-04-12 09:54:03 +000016158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016159/* confdefs.h. */
16160_ACEOF
16161cat confdefs.h >>conftest.$ac_ext
16162cat >>conftest.$ac_ext <<_ACEOF
16163/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016164#include <sys/types.h>
16165#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016166
Martin v. Löwis11437992002-04-12 09:54:03 +000016167int
16168main ()
16169{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016170struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 ;
16172 return 0;
16173}
16174_ACEOF
16175rm -f conftest.$ac_objext
16176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016177 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016179 grep -v '^ *+' conftest.er1 >conftest.err
16180 rm -f conftest.er1
16181 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16183 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016184 { ac_try='test -z "$ac_c_werror_flag"
16185 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16187 (eval $ac_try) 2>&5
16188 ac_status=$?
16189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16190 (exit $ac_status); }; } &&
16191 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16193 (eval $ac_try) 2>&5
16194 ac_status=$?
16195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16196 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016197 ac_cv_struct_tm=time.h
16198else
Martin v. Löwis11437992002-04-12 09:54:03 +000016199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016200sed 's/^/| /' conftest.$ac_ext >&5
16201
Martin v. Löwis11437992002-04-12 09:54:03 +000016202ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016203fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016204rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016206echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16207echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016208if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016209
16210cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016211#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016212_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016213
16214fi
16215
Martin v. Löwis11437992002-04-12 09:54:03 +000016216echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16217echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16218if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016220else
Martin v. Löwis11437992002-04-12 09:54:03 +000016221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016222/* confdefs.h. */
16223_ACEOF
16224cat confdefs.h >>conftest.$ac_ext
16225cat >>conftest.$ac_ext <<_ACEOF
16226/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016227#include <sys/types.h>
16228#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016229
16230
Martin v. Löwis11437992002-04-12 09:54:03 +000016231int
16232main ()
16233{
16234static struct tm ac_aggr;
16235if (ac_aggr.tm_zone)
16236return 0;
16237 ;
16238 return 0;
16239}
16240_ACEOF
16241rm -f conftest.$ac_objext
16242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016243 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016245 grep -v '^ *+' conftest.er1 >conftest.err
16246 rm -f conftest.er1
16247 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16249 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016250 { ac_try='test -z "$ac_c_werror_flag"
16251 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16253 (eval $ac_try) 2>&5
16254 ac_status=$?
16255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16256 (exit $ac_status); }; } &&
16257 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16259 (eval $ac_try) 2>&5
16260 ac_status=$?
16261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16262 (exit $ac_status); }; }; then
16263 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016264else
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016266sed 's/^/| /' conftest.$ac_ext >&5
16267
16268cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016269/* confdefs.h. */
16270_ACEOF
16271cat confdefs.h >>conftest.$ac_ext
16272cat >>conftest.$ac_ext <<_ACEOF
16273/* end confdefs.h. */
16274#include <sys/types.h>
16275#include <$ac_cv_struct_tm>
16276
16277
16278int
16279main ()
16280{
16281static struct tm ac_aggr;
16282if (sizeof ac_aggr.tm_zone)
16283return 0;
16284 ;
16285 return 0;
16286}
16287_ACEOF
16288rm -f conftest.$ac_objext
16289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016290 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016292 grep -v '^ *+' conftest.er1 >conftest.err
16293 rm -f conftest.er1
16294 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16296 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016297 { ac_try='test -z "$ac_c_werror_flag"
16298 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16300 (eval $ac_try) 2>&5
16301 ac_status=$?
16302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16303 (exit $ac_status); }; } &&
16304 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16306 (eval $ac_try) 2>&5
16307 ac_status=$?
16308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16309 (exit $ac_status); }; }; then
16310 ac_cv_member_struct_tm_tm_zone=yes
16311else
16312 echo "$as_me: failed program was:" >&5
16313sed 's/^/| /' conftest.$ac_ext >&5
16314
Martin v. Löwis11437992002-04-12 09:54:03 +000016315ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016316fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016317rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016318fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016319rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016321echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16322echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16323if test $ac_cv_member_struct_tm_tm_zone = yes; then
16324
16325cat >>confdefs.h <<_ACEOF
16326#define HAVE_STRUCT_TM_TM_ZONE 1
16327_ACEOF
16328
16329
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016330fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016331
Martin v. Löwis11437992002-04-12 09:54:03 +000016332if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16333
16334cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016335#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016336_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016337
16338else
Martin v. Löwis11437992002-04-12 09:54:03 +000016339 echo "$as_me:$LINENO: checking for tzname" >&5
16340echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16341if test "${ac_cv_var_tzname+set}" = set; then
16342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016343else
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016345/* confdefs.h. */
16346_ACEOF
16347cat confdefs.h >>conftest.$ac_ext
16348cat >>conftest.$ac_ext <<_ACEOF
16349/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016350#include <time.h>
16351#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016352extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016354
Martin v. Löwis11437992002-04-12 09:54:03 +000016355int
16356main ()
16357{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016358atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016359 ;
16360 return 0;
16361}
16362_ACEOF
16363rm -f conftest.$ac_objext conftest$ac_exeext
16364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016365 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016367 grep -v '^ *+' conftest.er1 >conftest.err
16368 rm -f conftest.er1
16369 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16371 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016372 { ac_try='test -z "$ac_c_werror_flag"
16373 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16375 (eval $ac_try) 2>&5
16376 ac_status=$?
16377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16378 (exit $ac_status); }; } &&
16379 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16381 (eval $ac_try) 2>&5
16382 ac_status=$?
16383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16384 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016385 ac_cv_var_tzname=yes
16386else
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016388sed 's/^/| /' conftest.$ac_ext >&5
16389
Martin v. Löwis11437992002-04-12 09:54:03 +000016390ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016391fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016392rm -f conftest.err conftest.$ac_objext \
16393 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016395echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16396echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016397 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016398
16399cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016400#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016401_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016402
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016403 fi
16404fi
16405
Martin v. Löwis11437992002-04-12 09:54:03 +000016406echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16407echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16408if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16409 echo $ECHO_N "(cached) $ECHO_C" >&6
16410else
16411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016412/* confdefs.h. */
16413_ACEOF
16414cat confdefs.h >>conftest.$ac_ext
16415cat >>conftest.$ac_ext <<_ACEOF
16416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016417$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016418int
16419main ()
16420{
16421static struct stat ac_aggr;
16422if (ac_aggr.st_rdev)
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
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwis11437992002-04-12 09:54:03 +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'
Martin v. Löwis11437992002-04-12 09:54:03 +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_rdev=yes
16451else
16452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016453sed 's/^/| /' conftest.$ac_ext >&5
16454
16455cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016456/* confdefs.h. */
16457_ACEOF
16458cat confdefs.h >>conftest.$ac_ext
16459cat >>conftest.$ac_ext <<_ACEOF
16460/* end confdefs.h. */
16461$ac_includes_default
16462int
16463main ()
16464{
16465static struct stat ac_aggr;
16466if (sizeof ac_aggr.st_rdev)
16467return 0;
16468 ;
16469 return 0;
16470}
16471_ACEOF
16472rm -f conftest.$ac_objext
16473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016474 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016476 grep -v '^ *+' conftest.er1 >conftest.err
16477 rm -f conftest.er1
16478 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16480 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016481 { ac_try='test -z "$ac_c_werror_flag"
16482 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16484 (eval $ac_try) 2>&5
16485 ac_status=$?
16486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16487 (exit $ac_status); }; } &&
16488 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16490 (eval $ac_try) 2>&5
16491 ac_status=$?
16492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16493 (exit $ac_status); }; }; then
16494 ac_cv_member_struct_stat_st_rdev=yes
16495else
16496 echo "$as_me: failed program was:" >&5
16497sed 's/^/| /' conftest.$ac_ext >&5
16498
Martin v. Löwis11437992002-04-12 09:54:03 +000016499ac_cv_member_struct_stat_st_rdev=no
16500fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016501rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016502fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016505echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16506echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16507if test $ac_cv_member_struct_stat_st_rdev = yes; then
16508
16509cat >>confdefs.h <<_ACEOF
16510#define HAVE_STRUCT_STAT_ST_RDEV 1
16511_ACEOF
16512
16513
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016514fi
16515
Martin v. Löwis11437992002-04-12 09:54:03 +000016516echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16517echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16518if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16519 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016520else
Martin v. Löwis11437992002-04-12 09:54:03 +000016521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016522/* confdefs.h. */
16523_ACEOF
16524cat confdefs.h >>conftest.$ac_ext
16525cat >>conftest.$ac_ext <<_ACEOF
16526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016527$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016528int
16529main ()
16530{
16531static struct stat ac_aggr;
16532if (ac_aggr.st_blksize)
16533return 0;
16534 ;
16535 return 0;
16536}
16537_ACEOF
16538rm -f conftest.$ac_objext
16539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016540 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016542 grep -v '^ *+' conftest.er1 >conftest.err
16543 rm -f conftest.er1
16544 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16546 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016547 { ac_try='test -z "$ac_c_werror_flag"
16548 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016549 { (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'
Martin v. Löwis11437992002-04-12 09:54:03 +000016555 { (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_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016561else
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016563sed 's/^/| /' conftest.$ac_ext >&5
16564
16565cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016566/* confdefs.h. */
16567_ACEOF
16568cat confdefs.h >>conftest.$ac_ext
16569cat >>conftest.$ac_ext <<_ACEOF
16570/* end confdefs.h. */
16571$ac_includes_default
16572int
16573main ()
16574{
16575static struct stat ac_aggr;
16576if (sizeof ac_aggr.st_blksize)
16577return 0;
16578 ;
16579 return 0;
16580}
16581_ACEOF
16582rm -f conftest.$ac_objext
16583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016584 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016586 grep -v '^ *+' conftest.er1 >conftest.err
16587 rm -f conftest.er1
16588 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16590 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016591 { ac_try='test -z "$ac_c_werror_flag"
16592 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16594 (eval $ac_try) 2>&5
16595 ac_status=$?
16596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16597 (exit $ac_status); }; } &&
16598 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16600 (eval $ac_try) 2>&5
16601 ac_status=$?
16602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16603 (exit $ac_status); }; }; then
16604 ac_cv_member_struct_stat_st_blksize=yes
16605else
16606 echo "$as_me: failed program was:" >&5
16607sed 's/^/| /' conftest.$ac_ext >&5
16608
Martin v. Löwis11437992002-04-12 09:54:03 +000016609ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016610fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016612fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016613rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016614fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016615echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
16616echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
16617if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016618
Martin v. Löwis11437992002-04-12 09:54:03 +000016619cat >>confdefs.h <<_ACEOF
16620#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16621_ACEOF
16622
16623
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016624fi
16625
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000016626echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
16627echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
16628if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
16629 echo $ECHO_N "(cached) $ECHO_C" >&6
16630else
16631 cat >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 (ac_aggr.st_flags)
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_flags=yes
16671else
16672 echo "$as_me: failed program was:" >&5
16673sed 's/^/| /' conftest.$ac_ext >&5
16674
16675cat >conftest.$ac_ext <<_ACEOF
16676/* confdefs.h. */
16677_ACEOF
16678cat confdefs.h >>conftest.$ac_ext
16679cat >>conftest.$ac_ext <<_ACEOF
16680/* end confdefs.h. */
16681$ac_includes_default
16682int
16683main ()
16684{
16685static struct stat ac_aggr;
16686if (sizeof ac_aggr.st_flags)
16687return 0;
16688 ;
16689 return 0;
16690}
16691_ACEOF
16692rm -f conftest.$ac_objext
16693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16694 (eval $ac_compile) 2>conftest.er1
16695 ac_status=$?
16696 grep -v '^ *+' conftest.er1 >conftest.err
16697 rm -f conftest.er1
16698 cat conftest.err >&5
16699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16700 (exit $ac_status); } &&
16701 { ac_try='test -z "$ac_c_werror_flag"
16702 || test ! -s conftest.err'
16703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16704 (eval $ac_try) 2>&5
16705 ac_status=$?
16706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16707 (exit $ac_status); }; } &&
16708 { ac_try='test -s conftest.$ac_objext'
16709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16710 (eval $ac_try) 2>&5
16711 ac_status=$?
16712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16713 (exit $ac_status); }; }; then
16714 ac_cv_member_struct_stat_st_flags=yes
16715else
16716 echo "$as_me: failed program was:" >&5
16717sed 's/^/| /' conftest.$ac_ext >&5
16718
16719ac_cv_member_struct_stat_st_flags=no
16720fi
16721rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16722fi
16723rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16724fi
16725echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
16726echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
16727if test $ac_cv_member_struct_stat_st_flags = yes; then
16728
16729cat >>confdefs.h <<_ACEOF
16730#define HAVE_STRUCT_STAT_ST_FLAGS 1
16731_ACEOF
16732
16733
16734fi
16735
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016736echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
16737echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
16738if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
16739 echo $ECHO_N "(cached) $ECHO_C" >&6
16740else
16741 cat >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 (ac_aggr.st_gen)
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_gen=yes
16781else
16782 echo "$as_me: failed program was:" >&5
16783sed 's/^/| /' conftest.$ac_ext >&5
16784
16785cat >conftest.$ac_ext <<_ACEOF
16786/* confdefs.h. */
16787_ACEOF
16788cat confdefs.h >>conftest.$ac_ext
16789cat >>conftest.$ac_ext <<_ACEOF
16790/* end confdefs.h. */
16791$ac_includes_default
16792int
16793main ()
16794{
16795static struct stat ac_aggr;
16796if (sizeof ac_aggr.st_gen)
16797return 0;
16798 ;
16799 return 0;
16800}
16801_ACEOF
16802rm -f conftest.$ac_objext
16803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16804 (eval $ac_compile) 2>conftest.er1
16805 ac_status=$?
16806 grep -v '^ *+' conftest.er1 >conftest.err
16807 rm -f conftest.er1
16808 cat conftest.err >&5
16809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16810 (exit $ac_status); } &&
16811 { ac_try='test -z "$ac_c_werror_flag"
16812 || test ! -s conftest.err'
16813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16814 (eval $ac_try) 2>&5
16815 ac_status=$?
16816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16817 (exit $ac_status); }; } &&
16818 { ac_try='test -s conftest.$ac_objext'
16819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16820 (eval $ac_try) 2>&5
16821 ac_status=$?
16822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16823 (exit $ac_status); }; }; then
16824 ac_cv_member_struct_stat_st_gen=yes
16825else
16826 echo "$as_me: failed program was:" >&5
16827sed 's/^/| /' conftest.$ac_ext >&5
16828
16829ac_cv_member_struct_stat_st_gen=no
16830fi
16831rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16832fi
16833rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16834fi
16835echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
16836echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
16837if test $ac_cv_member_struct_stat_st_gen = yes; then
16838
16839cat >>confdefs.h <<_ACEOF
16840#define HAVE_STRUCT_STAT_ST_GEN 1
16841_ACEOF
16842
16843
16844fi
16845
16846echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
16847echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
16848if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
16849 echo $ECHO_N "(cached) $ECHO_C" >&6
16850else
16851 cat >conftest.$ac_ext <<_ACEOF
16852/* 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 (ac_aggr.st_birthtime)
16863return 0;
16864 ;
16865 return 0;
16866}
16867_ACEOF
16868rm -f conftest.$ac_objext
16869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16870 (eval $ac_compile) 2>conftest.er1
16871 ac_status=$?
16872 grep -v '^ *+' conftest.er1 >conftest.err
16873 rm -f conftest.er1
16874 cat conftest.err >&5
16875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16876 (exit $ac_status); } &&
16877 { ac_try='test -z "$ac_c_werror_flag"
16878 || test ! -s conftest.err'
16879 { (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'
16885 { (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_birthtime=yes
16891else
16892 echo "$as_me: failed program was:" >&5
16893sed 's/^/| /' conftest.$ac_ext >&5
16894
16895cat >conftest.$ac_ext <<_ACEOF
16896/* confdefs.h. */
16897_ACEOF
16898cat confdefs.h >>conftest.$ac_ext
16899cat >>conftest.$ac_ext <<_ACEOF
16900/* end confdefs.h. */
16901$ac_includes_default
16902int
16903main ()
16904{
16905static struct stat ac_aggr;
16906if (sizeof ac_aggr.st_birthtime)
16907return 0;
16908 ;
16909 return 0;
16910}
16911_ACEOF
16912rm -f conftest.$ac_objext
16913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16914 (eval $ac_compile) 2>conftest.er1
16915 ac_status=$?
16916 grep -v '^ *+' conftest.er1 >conftest.err
16917 rm -f conftest.er1
16918 cat conftest.err >&5
16919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16920 (exit $ac_status); } &&
16921 { ac_try='test -z "$ac_c_werror_flag"
16922 || test ! -s conftest.err'
16923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16924 (eval $ac_try) 2>&5
16925 ac_status=$?
16926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16927 (exit $ac_status); }; } &&
16928 { ac_try='test -s conftest.$ac_objext'
16929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16930 (eval $ac_try) 2>&5
16931 ac_status=$?
16932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16933 (exit $ac_status); }; }; then
16934 ac_cv_member_struct_stat_st_birthtime=yes
16935else
16936 echo "$as_me: failed program was:" >&5
16937sed 's/^/| /' conftest.$ac_ext >&5
16938
16939ac_cv_member_struct_stat_st_birthtime=no
16940fi
16941rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16942fi
16943rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16944fi
16945echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
16946echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
16947if test $ac_cv_member_struct_stat_st_birthtime = yes; then
16948
16949cat >>confdefs.h <<_ACEOF
16950#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
16951_ACEOF
16952
16953
16954fi
16955
Martin v. Löwis11437992002-04-12 09:54:03 +000016956echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
16957echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
16958if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
16959 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016960else
Martin v. Löwis11437992002-04-12 09:54:03 +000016961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016962/* confdefs.h. */
16963_ACEOF
16964cat confdefs.h >>conftest.$ac_ext
16965cat >>conftest.$ac_ext <<_ACEOF
16966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016967$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016968int
16969main ()
16970{
16971static struct stat ac_aggr;
16972if (ac_aggr.st_blocks)
16973return 0;
16974 ;
16975 return 0;
16976}
16977_ACEOF
16978rm -f conftest.$ac_objext
16979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016980 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016982 grep -v '^ *+' conftest.er1 >conftest.err
16983 rm -f conftest.er1
16984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16986 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016987 { ac_try='test -z "$ac_c_werror_flag"
16988 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16990 (eval $ac_try) 2>&5
16991 ac_status=$?
16992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16993 (exit $ac_status); }; } &&
16994 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16996 (eval $ac_try) 2>&5
16997 ac_status=$?
16998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16999 (exit $ac_status); }; }; then
17000 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017001else
Martin v. Löwis11437992002-04-12 09:54:03 +000017002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017003sed 's/^/| /' conftest.$ac_ext >&5
17004
17005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017006/* confdefs.h. */
17007_ACEOF
17008cat confdefs.h >>conftest.$ac_ext
17009cat >>conftest.$ac_ext <<_ACEOF
17010/* end confdefs.h. */
17011$ac_includes_default
17012int
17013main ()
17014{
17015static struct stat ac_aggr;
17016if (sizeof ac_aggr.st_blocks)
17017return 0;
17018 ;
17019 return 0;
17020}
17021_ACEOF
17022rm -f conftest.$ac_objext
17023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017024 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017026 grep -v '^ *+' conftest.er1 >conftest.err
17027 rm -f conftest.er1
17028 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17030 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017031 { ac_try='test -z "$ac_c_werror_flag"
17032 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17034 (eval $ac_try) 2>&5
17035 ac_status=$?
17036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17037 (exit $ac_status); }; } &&
17038 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17040 (eval $ac_try) 2>&5
17041 ac_status=$?
17042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17043 (exit $ac_status); }; }; then
17044 ac_cv_member_struct_stat_st_blocks=yes
17045else
17046 echo "$as_me: failed program was:" >&5
17047sed 's/^/| /' conftest.$ac_ext >&5
17048
Martin v. Löwis11437992002-04-12 09:54:03 +000017049ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017050fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017051rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017052fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017053rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017055echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
17056echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
17057if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017058
Martin v. Löwis11437992002-04-12 09:54:03 +000017059cat >>confdefs.h <<_ACEOF
17060#define HAVE_STRUCT_STAT_ST_BLOCKS 1
17061_ACEOF
17062
17063
17064cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017065#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017066_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017067
17068else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017069 case $LIBOBJS in
17070 "fileblocks.$ac_objext" | \
17071 *" fileblocks.$ac_objext" | \
17072 "fileblocks.$ac_objext "* | \
17073 *" fileblocks.$ac_objext "* ) ;;
17074 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
17075esac
17076
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017077fi
17078
Michael W. Hudson54241132001-12-07 15:38:26 +000017079
Martin v. Löwis11437992002-04-12 09:54:03 +000017080
17081echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
17082echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
17083if test "${ac_cv_header_time_altzone+set}" = set; then
17084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017085else
Martin v. Löwis11437992002-04-12 09:54:03 +000017086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017087/* confdefs.h. */
17088_ACEOF
17089cat confdefs.h >>conftest.$ac_ext
17090cat >>conftest.$ac_ext <<_ACEOF
17091/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017092#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017093int
17094main ()
17095{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017096return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000017097 ;
17098 return 0;
17099}
17100_ACEOF
17101rm -f conftest.$ac_objext
17102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017103 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017105 grep -v '^ *+' conftest.er1 >conftest.err
17106 rm -f conftest.er1
17107 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17109 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017110 { ac_try='test -z "$ac_c_werror_flag"
17111 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17113 (eval $ac_try) 2>&5
17114 ac_status=$?
17115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17116 (exit $ac_status); }; } &&
17117 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17119 (eval $ac_try) 2>&5
17120 ac_status=$?
17121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17122 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017123 ac_cv_header_time_altzone=yes
17124else
Martin v. Löwis11437992002-04-12 09:54:03 +000017125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017126sed 's/^/| /' conftest.$ac_ext >&5
17127
Martin v. Löwis11437992002-04-12 09:54:03 +000017128ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000017129fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017130rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017131fi
17132
Martin v. Löwis11437992002-04-12 09:54:03 +000017133echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
17134echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017135if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017136
17137cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017138#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017139_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017140
17141fi
17142
Guido van Rossumda88dad1995-01-26 00:46:29 +000017143was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017144echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
17145echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
17146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017147/* confdefs.h. */
17148_ACEOF
17149cat confdefs.h >>conftest.$ac_ext
17150cat >>conftest.$ac_ext <<_ACEOF
17151/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017152
17153#include <sys/types.h>
17154#include <sys/select.h>
17155#include <sys/time.h>
17156
Martin v. Löwis11437992002-04-12 09:54:03 +000017157int
17158main ()
17159{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017160;
Martin v. Löwis11437992002-04-12 09:54:03 +000017161 ;
17162 return 0;
17163}
17164_ACEOF
17165rm -f conftest.$ac_objext
17166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017167 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017169 grep -v '^ *+' conftest.er1 >conftest.err
17170 rm -f conftest.er1
17171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17173 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017174 { ac_try='test -z "$ac_c_werror_flag"
17175 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17177 (eval $ac_try) 2>&5
17178 ac_status=$?
17179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17180 (exit $ac_status); }; } &&
17181 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17183 (eval $ac_try) 2>&5
17184 ac_status=$?
17185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17186 (exit $ac_status); }; }; then
17187
17188
17189cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017190#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017191_ACEOF
17192
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017193 was_it_defined=yes
17194
Guido van Rossumf78abae1997-01-21 22:02:36 +000017195else
Martin v. Löwis11437992002-04-12 09:54:03 +000017196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017197sed 's/^/| /' conftest.$ac_ext >&5
17198
Guido van Rossum7f43da71994-08-01 12:15:30 +000017199fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017200rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017201echo "$as_me:$LINENO: result: $was_it_defined" >&5
17202echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000017203
Martin v. Löwis11437992002-04-12 09:54:03 +000017204echo "$as_me:$LINENO: checking for addrinfo" >&5
17205echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
17206if test "${ac_cv_struct_addrinfo+set}" = set; then
17207 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017208else
Martin v. Löwis11437992002-04-12 09:54:03 +000017209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017210/* confdefs.h. */
17211_ACEOF
17212cat confdefs.h >>conftest.$ac_ext
17213cat >>conftest.$ac_ext <<_ACEOF
17214/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017215
17216# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017217int
17218main ()
17219{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017220struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 ;
17222 return 0;
17223}
17224_ACEOF
17225rm -f conftest.$ac_objext
17226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017227 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017229 grep -v '^ *+' conftest.er1 >conftest.err
17230 rm -f conftest.er1
17231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17233 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017234 { ac_try='test -z "$ac_c_werror_flag"
17235 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17237 (eval $ac_try) 2>&5
17238 ac_status=$?
17239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17240 (exit $ac_status); }; } &&
17241 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17243 (eval $ac_try) 2>&5
17244 ac_status=$?
17245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17246 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017247 ac_cv_struct_addrinfo=yes
17248else
Martin v. Löwis11437992002-04-12 09:54:03 +000017249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017250sed 's/^/| /' conftest.$ac_ext >&5
17251
Martin v. Löwis11437992002-04-12 09:54:03 +000017252ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017253fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017254rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017255fi
17256
Martin v. Löwis11437992002-04-12 09:54:03 +000017257echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
17258echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017259if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017260
17261cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017262#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017263_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017264
17265fi
17266
Martin v. Löwis11437992002-04-12 09:54:03 +000017267echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
17268echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
17269if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
17270 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017271else
Martin v. Löwis11437992002-04-12 09:54:03 +000017272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017273/* confdefs.h. */
17274_ACEOF
17275cat confdefs.h >>conftest.$ac_ext
17276cat >>conftest.$ac_ext <<_ACEOF
17277/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017278
17279# include <sys/types.h>
17280# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017281int
17282main ()
17283{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017284struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000017285 ;
17286 return 0;
17287}
17288_ACEOF
17289rm -f conftest.$ac_objext
17290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017291 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017293 grep -v '^ *+' conftest.er1 >conftest.err
17294 rm -f conftest.er1
17295 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17297 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017298 { ac_try='test -z "$ac_c_werror_flag"
17299 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17301 (eval $ac_try) 2>&5
17302 ac_status=$?
17303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17304 (exit $ac_status); }; } &&
17305 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17307 (eval $ac_try) 2>&5
17308 ac_status=$?
17309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17310 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017311 ac_cv_struct_sockaddr_storage=yes
17312else
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017314sed 's/^/| /' conftest.$ac_ext >&5
17315
Martin v. Löwis11437992002-04-12 09:54:03 +000017316ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017317fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017318rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017319fi
17320
Martin v. Löwis11437992002-04-12 09:54:03 +000017321echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
17322echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017323if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017324
17325cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017326#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017327_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017328
17329fi
17330
Guido van Rossum627b2d71993-12-24 10:39:16 +000017331# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000017332
Michael W. Hudson54241132001-12-07 15:38:26 +000017333
Martin v. Löwis11437992002-04-12 09:54:03 +000017334echo "$as_me:$LINENO: checking whether char is unsigned" >&5
17335echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
17336if test "${ac_cv_c_char_unsigned+set}" = set; then
17337 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000017338else
Martin v. Löwis11437992002-04-12 09:54:03 +000017339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017340/* confdefs.h. */
17341_ACEOF
17342cat confdefs.h >>conftest.$ac_ext
17343cat >>conftest.$ac_ext <<_ACEOF
17344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017345$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017346int
17347main ()
17348{
17349static int test_array [1 - 2 * !(((char) -1) < 0)];
17350test_array [0] = 0
17351
17352 ;
17353 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000017354}
Martin v. Löwis11437992002-04-12 09:54:03 +000017355_ACEOF
17356rm -f conftest.$ac_objext
17357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017358 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017360 grep -v '^ *+' conftest.er1 >conftest.err
17361 rm -f conftest.er1
17362 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17364 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017365 { ac_try='test -z "$ac_c_werror_flag"
17366 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17368 (eval $ac_try) 2>&5
17369 ac_status=$?
17370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17371 (exit $ac_status); }; } &&
17372 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17374 (eval $ac_try) 2>&5
17375 ac_status=$?
17376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17377 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017378 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017379else
17380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017381sed 's/^/| /' conftest.$ac_ext >&5
17382
Martin v. Löwis11437992002-04-12 09:54:03 +000017383ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017384fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017385rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017387echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
17388echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017389if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017390 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017391#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017392_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017393
17394fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000017395
Martin v. Löwis11437992002-04-12 09:54:03 +000017396echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
17397echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17398if test "${ac_cv_c_const+set}" = set; then
17399 echo $ECHO_N "(cached) $ECHO_C" >&6
17400else
17401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017402/* confdefs.h. */
17403_ACEOF
17404cat confdefs.h >>conftest.$ac_ext
17405cat >>conftest.$ac_ext <<_ACEOF
17406/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017407
Martin v. Löwis11437992002-04-12 09:54:03 +000017408int
17409main ()
17410{
17411/* FIXME: Include the comments suggested by Paul. */
17412#ifndef __cplusplus
17413 /* Ultrix mips cc rejects this. */
17414 typedef int charset[2];
17415 const charset x;
17416 /* SunOS 4.1.1 cc rejects this. */
17417 char const *const *ccp;
17418 char **p;
17419 /* NEC SVR4.0.2 mips cc rejects this. */
17420 struct point {int x, y;};
17421 static struct point const zero = {0,0};
17422 /* AIX XL C 1.02.0.0 rejects this.
17423 It does not let you subtract one const X* pointer from another in
17424 an arm of an if-expression whose if-part is not a constant
17425 expression */
17426 const char *g = "string";
17427 ccp = &g + (g ? g-g : 0);
17428 /* HPUX 7.0 cc rejects these. */
17429 ++ccp;
17430 p = (char**) ccp;
17431 ccp = (char const *const *) p;
17432 { /* SCO 3.2v4 cc rejects this. */
17433 char *t;
17434 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017435
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 *t++ = 0;
17437 }
17438 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17439 int x[] = {25, 17};
17440 const int *foo = &x[0];
17441 ++foo;
17442 }
17443 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17444 typedef const int *iptr;
17445 iptr p = 0;
17446 ++p;
17447 }
17448 { /* AIX XL C 1.02.0.0 rejects this saying
17449 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17450 struct s { int j; const int *ap[3]; };
17451 struct s *b; b->j = 5;
17452 }
17453 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17454 const int foo = 10;
17455 }
17456#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000017457
Martin v. Löwis11437992002-04-12 09:54:03 +000017458 ;
17459 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000017460}
Martin v. Löwis11437992002-04-12 09:54:03 +000017461_ACEOF
17462rm -f conftest.$ac_objext
17463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017464 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017466 grep -v '^ *+' conftest.er1 >conftest.err
17467 rm -f conftest.er1
17468 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17470 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017471 { ac_try='test -z "$ac_c_werror_flag"
17472 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17474 (eval $ac_try) 2>&5
17475 ac_status=$?
17476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17477 (exit $ac_status); }; } &&
17478 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17480 (eval $ac_try) 2>&5
17481 ac_status=$?
17482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17483 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017484 ac_cv_c_const=yes
17485else
Martin v. Löwis11437992002-04-12 09:54:03 +000017486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017487sed 's/^/| /' conftest.$ac_ext >&5
17488
Martin v. Löwis11437992002-04-12 09:54:03 +000017489ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017490fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017491rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017492fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017493echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
17494echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017495if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017496
17497cat >>confdefs.h <<\_ACEOF
17498#define const
17499_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017500
17501fi
17502
Michael W. Hudson54241132001-12-07 15:38:26 +000017503
Guido van Rossumda88dad1995-01-26 00:46:29 +000017504works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017505echo "$as_me:$LINENO: checking for working volatile" >&5
17506echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
17507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017508/* confdefs.h. */
17509_ACEOF
17510cat confdefs.h >>conftest.$ac_ext
17511cat >>conftest.$ac_ext <<_ACEOF
17512/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017513
Martin v. Löwis11437992002-04-12 09:54:03 +000017514int
17515main ()
17516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017517volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 ;
17519 return 0;
17520}
17521_ACEOF
17522rm -f conftest.$ac_objext
17523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017524 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017526 grep -v '^ *+' conftest.er1 >conftest.err
17527 rm -f conftest.er1
17528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17530 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017531 { ac_try='test -z "$ac_c_werror_flag"
17532 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17534 (eval $ac_try) 2>&5
17535 ac_status=$?
17536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17537 (exit $ac_status); }; } &&
17538 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17540 (eval $ac_try) 2>&5
17541 ac_status=$?
17542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17543 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017544 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017545else
Martin v. Löwis11437992002-04-12 09:54:03 +000017546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017547sed 's/^/| /' conftest.$ac_ext >&5
17548
Martin v. Löwis11437992002-04-12 09:54:03 +000017549
17550cat >>confdefs.h <<\_ACEOF
17551#define volatile
17552_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017553
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017554
Guido van Rossum627b2d71993-12-24 10:39:16 +000017555fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017556rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017557echo "$as_me:$LINENO: result: $works" >&5
17558echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017559
Guido van Rossumda88dad1995-01-26 00:46:29 +000017560works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017561echo "$as_me:$LINENO: checking for working signed char" >&5
17562echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
17563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017564/* confdefs.h. */
17565_ACEOF
17566cat confdefs.h >>conftest.$ac_ext
17567cat >>conftest.$ac_ext <<_ACEOF
17568/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017569
Martin v. Löwis11437992002-04-12 09:54:03 +000017570int
17571main ()
17572{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017573signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017574 ;
17575 return 0;
17576}
17577_ACEOF
17578rm -f conftest.$ac_objext
17579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017580 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017582 grep -v '^ *+' conftest.er1 >conftest.err
17583 rm -f conftest.er1
17584 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17586 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017587 { ac_try='test -z "$ac_c_werror_flag"
17588 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17590 (eval $ac_try) 2>&5
17591 ac_status=$?
17592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17593 (exit $ac_status); }; } &&
17594 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17596 (eval $ac_try) 2>&5
17597 ac_status=$?
17598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17599 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017600 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017601else
Martin v. Löwis11437992002-04-12 09:54:03 +000017602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017603sed 's/^/| /' conftest.$ac_ext >&5
17604
Martin v. Löwis11437992002-04-12 09:54:03 +000017605
17606cat >>confdefs.h <<\_ACEOF
17607#define signed
17608_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017609
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017610
Guido van Rossum7f43da71994-08-01 12:15:30 +000017611fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017612rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017613echo "$as_me:$LINENO: result: $works" >&5
17614echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017615
Guido van Rossumda88dad1995-01-26 00:46:29 +000017616have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017617echo "$as_me:$LINENO: checking for prototypes" >&5
17618echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
17619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017620/* confdefs.h. */
17621_ACEOF
17622cat confdefs.h >>conftest.$ac_ext
17623cat >>conftest.$ac_ext <<_ACEOF
17624/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017625int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017626int
17627main ()
17628{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017629return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000017630 ;
17631 return 0;
17632}
17633_ACEOF
17634rm -f conftest.$ac_objext
17635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017636 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017638 grep -v '^ *+' conftest.er1 >conftest.err
17639 rm -f conftest.er1
17640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17642 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017643 { ac_try='test -z "$ac_c_werror_flag"
17644 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17646 (eval $ac_try) 2>&5
17647 ac_status=$?
17648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17649 (exit $ac_status); }; } &&
17650 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17652 (eval $ac_try) 2>&5
17653 ac_status=$?
17654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17655 (exit $ac_status); }; }; then
17656
17657
17658cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017659#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017660_ACEOF
17661
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017662 have_prototypes=yes
17663
Guido van Rossumf78abae1997-01-21 22:02:36 +000017664else
Martin v. Löwis11437992002-04-12 09:54:03 +000017665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017666sed 's/^/| /' conftest.$ac_ext >&5
17667
Guido van Rossum7f43da71994-08-01 12:15:30 +000017668fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017669rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017670echo "$as_me:$LINENO: result: $have_prototypes" >&5
17671echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017672
Guido van Rossumda88dad1995-01-26 00:46:29 +000017673works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017674echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17675echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017677/* confdefs.h. */
17678_ACEOF
17679cat confdefs.h >>conftest.$ac_ext
17680cat >>conftest.$ac_ext <<_ACEOF
17681/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017682
17683#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017684int foo(int x, ...) {
17685 va_list va;
17686 va_start(va, x);
17687 va_arg(va, int);
17688 va_arg(va, char *);
17689 va_arg(va, double);
17690 return 0;
17691}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017692
Martin v. Löwis11437992002-04-12 09:54:03 +000017693int
17694main ()
17695{
Guido van Rossum90eea071996-08-30 20:58:57 +000017696return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017697 ;
17698 return 0;
17699}
17700_ACEOF
17701rm -f conftest.$ac_objext
17702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017703 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017705 grep -v '^ *+' conftest.er1 >conftest.err
17706 rm -f conftest.er1
17707 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17709 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017710 { ac_try='test -z "$ac_c_werror_flag"
17711 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17713 (eval $ac_try) 2>&5
17714 ac_status=$?
17715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17716 (exit $ac_status); }; } &&
17717 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17719 (eval $ac_try) 2>&5
17720 ac_status=$?
17721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17722 (exit $ac_status); }; }; then
17723
17724
17725cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017726#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017727_ACEOF
17728
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017729 works=yes
17730
Guido van Rossumf78abae1997-01-21 22:02:36 +000017731else
Martin v. Löwis11437992002-04-12 09:54:03 +000017732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017733sed 's/^/| /' conftest.$ac_ext >&5
17734
Guido van Rossum627b2d71993-12-24 10:39:16 +000017735fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017737echo "$as_me:$LINENO: result: $works" >&5
17738echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017739
Martin v. Löwisd6320502004-08-12 13:45:08 +000017740# check for socketpair
17741echo "$as_me:$LINENO: checking for socketpair" >&5
17742echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17743cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017744/* confdefs.h. */
17745_ACEOF
17746cat confdefs.h >>conftest.$ac_ext
17747cat >>conftest.$ac_ext <<_ACEOF
17748/* end confdefs.h. */
17749
17750#include <sys/types.h>
17751#include <sys/socket.h>
17752
17753int
17754main ()
17755{
17756void *x=socketpair
17757 ;
17758 return 0;
17759}
17760_ACEOF
17761rm -f conftest.$ac_objext
17762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017763 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017765 grep -v '^ *+' conftest.er1 >conftest.err
17766 rm -f conftest.er1
17767 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17769 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017770 { ac_try='test -z "$ac_c_werror_flag"
17771 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17773 (eval $ac_try) 2>&5
17774 ac_status=$?
17775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17776 (exit $ac_status); }; } &&
17777 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000017778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17779 (eval $ac_try) 2>&5
17780 ac_status=$?
17781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17782 (exit $ac_status); }; }; then
17783
17784cat >>confdefs.h <<\_ACEOF
17785#define HAVE_SOCKETPAIR 1
17786_ACEOF
17787
17788 echo "$as_me:$LINENO: result: yes" >&5
17789echo "${ECHO_T}yes" >&6
17790else
17791 echo "$as_me: failed program was:" >&5
17792sed 's/^/| /' conftest.$ac_ext >&5
17793
17794echo "$as_me:$LINENO: result: no" >&5
17795echo "${ECHO_T}no" >&6
17796
17797fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017798rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017799
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017800# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017801echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17802echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017804/* confdefs.h. */
17805_ACEOF
17806cat confdefs.h >>conftest.$ac_ext
17807cat >>conftest.$ac_ext <<_ACEOF
17808/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017809#include <sys/types.h>
17810#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017811int
17812main ()
17813{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017814struct sockaddr x;
17815x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 ;
17817 return 0;
17818}
17819_ACEOF
17820rm -f conftest.$ac_objext
17821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017822 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017824 grep -v '^ *+' conftest.er1 >conftest.err
17825 rm -f conftest.er1
17826 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17828 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017829 { ac_try='test -z "$ac_c_werror_flag"
17830 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17832 (eval $ac_try) 2>&5
17833 ac_status=$?
17834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17835 (exit $ac_status); }; } &&
17836 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17838 (eval $ac_try) 2>&5
17839 ac_status=$?
17840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17841 (exit $ac_status); }; }; then
17842 echo "$as_me:$LINENO: result: yes" >&5
17843echo "${ECHO_T}yes" >&6
17844
17845cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017846#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017847_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017848
17849else
Martin v. Löwis11437992002-04-12 09:54:03 +000017850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017851sed 's/^/| /' conftest.$ac_ext >&5
17852
Martin v. Löwis11437992002-04-12 09:54:03 +000017853echo "$as_me:$LINENO: result: no" >&5
17854echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017855fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017856rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017857
Guido van Rossumda88dad1995-01-26 00:46:29 +000017858va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017859echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17860echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017862/* confdefs.h. */
17863_ACEOF
17864cat confdefs.h >>conftest.$ac_ext
17865cat >>conftest.$ac_ext <<_ACEOF
17866/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017867
17868#ifdef HAVE_STDARG_PROTOTYPES
17869#include <stdarg.h>
17870#else
17871#include <varargs.h>
17872#endif
17873
Martin v. Löwis11437992002-04-12 09:54:03 +000017874int
17875main ()
17876{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017877va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 ;
17879 return 0;
17880}
17881_ACEOF
17882rm -f conftest.$ac_objext
17883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017884 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017886 grep -v '^ *+' conftest.er1 >conftest.err
17887 rm -f conftest.er1
17888 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17890 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017891 { ac_try='test -z "$ac_c_werror_flag"
17892 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17894 (eval $ac_try) 2>&5
17895 ac_status=$?
17896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17897 (exit $ac_status); }; } &&
17898 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17900 (eval $ac_try) 2>&5
17901 ac_status=$?
17902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17903 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017904 :
17905else
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017907sed 's/^/| /' conftest.$ac_ext >&5
17908
Martin v. Löwis11437992002-04-12 09:54:03 +000017909
17910
17911cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017912#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017913_ACEOF
17914
Guido van Rossumda88dad1995-01-26 00:46:29 +000017915 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017916
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017917fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017918rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017919echo "$as_me:$LINENO: result: $va_list_is_array" >&5
17920echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017921
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017922# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017923
17924
17925
17926echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17927echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17928if test "${ac_cv_func_gethostbyname_r+set}" = set; then
17929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017930else
Martin v. Löwis11437992002-04-12 09:54:03 +000017931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017932/* confdefs.h. */
17933_ACEOF
17934cat confdefs.h >>conftest.$ac_ext
17935cat >>conftest.$ac_ext <<_ACEOF
17936/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017937/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017938 which can conflict with char gethostbyname_r (); below.
17939 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017940 <limits.h> exists even on freestanding compilers. Under hpux,
17941 including <limits.h> includes <sys/time.h> and causes problems
17942 checking for functions defined therein. */
17943#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017944# include <limits.h>
17945#else
17946# include <assert.h>
17947#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017948/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017949#ifdef __cplusplus
17950extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017951{
Martin v. Löwis11437992002-04-12 09:54:03 +000017952#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017953/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017954 builtin and then its argument prototype would still apply. */
17955char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017956/* The GNU C library defines this for functions which it implements
17957 to always fail with ENOSYS. Some functions are actually named
17958 something starting with __ and the normal name is an alias. */
17959#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
17960choke me
17961#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017962char (*f) () = gethostbyname_r;
17963#endif
17964#ifdef __cplusplus
17965}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017966#endif
17967
Skip Montanaro6dead952003-09-25 14:50:04 +000017968int
17969main ()
17970{
17971return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 ;
17973 return 0;
17974}
17975_ACEOF
17976rm -f conftest.$ac_objext conftest$ac_exeext
17977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017978 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017980 grep -v '^ *+' conftest.er1 >conftest.err
17981 rm -f conftest.er1
17982 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17984 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017985 { ac_try='test -z "$ac_c_werror_flag"
17986 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17988 (eval $ac_try) 2>&5
17989 ac_status=$?
17990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17991 (exit $ac_status); }; } &&
17992 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17994 (eval $ac_try) 2>&5
17995 ac_status=$?
17996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17997 (exit $ac_status); }; }; then
17998 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017999else
Martin v. Löwis11437992002-04-12 09:54:03 +000018000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018001sed 's/^/| /' conftest.$ac_ext >&5
18002
Martin v. Löwis11437992002-04-12 09:54:03 +000018003ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018004fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018005rm -f conftest.err conftest.$ac_objext \
18006 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018008echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
18009echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
18010if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018011
Martin v. Löwis11437992002-04-12 09:54:03 +000018012 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018013#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018014_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018015
Martin v. Löwis11437992002-04-12 09:54:03 +000018016 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
18017echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018018 OLD_CFLAGS=$CFLAGS
18019 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018020 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018021/* confdefs.h. */
18022_ACEOF
18023cat confdefs.h >>conftest.$ac_ext
18024cat >>conftest.$ac_ext <<_ACEOF
18025/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018026
18027# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018028
Martin v. Löwis11437992002-04-12 09:54:03 +000018029int
18030main ()
18031{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018032
18033 char *name;
18034 struct hostent *he, *res;
18035 char buffer[2048];
18036 int buflen = 2048;
18037 int h_errnop;
18038
18039 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018040
18041 ;
18042 return 0;
18043}
18044_ACEOF
18045rm -f conftest.$ac_objext
18046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018047 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018049 grep -v '^ *+' conftest.er1 >conftest.err
18050 rm -f conftest.er1
18051 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18053 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018054 { ac_try='test -z "$ac_c_werror_flag"
18055 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18057 (eval $ac_try) 2>&5
18058 ac_status=$?
18059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18060 (exit $ac_status); }; } &&
18061 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18063 (eval $ac_try) 2>&5
18064 ac_status=$?
18065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18066 (exit $ac_status); }; }; then
18067
18068 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018069#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018070_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018071
Martin v. Löwis11437992002-04-12 09:54:03 +000018072
18073cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018074#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018075_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018076
Martin v. Löwis11437992002-04-12 09:54:03 +000018077 echo "$as_me:$LINENO: result: yes" >&5
18078echo "${ECHO_T}yes" >&6
18079
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018080else
Martin v. Löwis11437992002-04-12 09:54:03 +000018081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018082sed 's/^/| /' conftest.$ac_ext >&5
18083
Martin v. Löwis11437992002-04-12 09:54:03 +000018084
18085 echo "$as_me:$LINENO: result: no" >&5
18086echo "${ECHO_T}no" >&6
18087 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
18088echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
18089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018090/* confdefs.h. */
18091_ACEOF
18092cat confdefs.h >>conftest.$ac_ext
18093cat >>conftest.$ac_ext <<_ACEOF
18094/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018095
18096# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018097
Martin v. Löwis11437992002-04-12 09:54:03 +000018098int
18099main ()
18100{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018101
18102 char *name;
18103 struct hostent *he;
18104 char buffer[2048];
18105 int buflen = 2048;
18106 int h_errnop;
18107
18108 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018109
18110 ;
18111 return 0;
18112}
18113_ACEOF
18114rm -f conftest.$ac_objext
18115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018116 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018118 grep -v '^ *+' conftest.er1 >conftest.err
18119 rm -f conftest.er1
18120 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18122 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018123 { ac_try='test -z "$ac_c_werror_flag"
18124 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18126 (eval $ac_try) 2>&5
18127 ac_status=$?
18128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18129 (exit $ac_status); }; } &&
18130 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18132 (eval $ac_try) 2>&5
18133 ac_status=$?
18134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18135 (exit $ac_status); }; }; then
18136
18137 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018138#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018139_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018140
Martin v. Löwis11437992002-04-12 09:54:03 +000018141
18142cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018143#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018144_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018145
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 echo "$as_me:$LINENO: result: yes" >&5
18147echo "${ECHO_T}yes" >&6
18148
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018149else
Martin v. Löwis11437992002-04-12 09:54:03 +000018150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018151sed 's/^/| /' conftest.$ac_ext >&5
18152
Martin v. Löwis11437992002-04-12 09:54:03 +000018153
18154 echo "$as_me:$LINENO: result: no" >&5
18155echo "${ECHO_T}no" >&6
18156 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
18157echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
18158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018159/* confdefs.h. */
18160_ACEOF
18161cat confdefs.h >>conftest.$ac_ext
18162cat >>conftest.$ac_ext <<_ACEOF
18163/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018164
18165# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018166
Martin v. Löwis11437992002-04-12 09:54:03 +000018167int
18168main ()
18169{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018170
18171 char *name;
18172 struct hostent *he;
18173 struct hostent_data data;
18174
18175 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000018176
18177 ;
18178 return 0;
18179}
18180_ACEOF
18181rm -f conftest.$ac_objext
18182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018183 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018185 grep -v '^ *+' conftest.er1 >conftest.err
18186 rm -f conftest.er1
18187 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18189 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018190 { ac_try='test -z "$ac_c_werror_flag"
18191 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18193 (eval $ac_try) 2>&5
18194 ac_status=$?
18195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18196 (exit $ac_status); }; } &&
18197 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18199 (eval $ac_try) 2>&5
18200 ac_status=$?
18201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18202 (exit $ac_status); }; }; then
18203
18204 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018205#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018206_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018207
Martin v. Löwis11437992002-04-12 09:54:03 +000018208
18209cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018210#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018211_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018212
Martin v. Löwis11437992002-04-12 09:54:03 +000018213 echo "$as_me:$LINENO: result: yes" >&5
18214echo "${ECHO_T}yes" >&6
18215
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018216else
Martin v. Löwis11437992002-04-12 09:54:03 +000018217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018218sed 's/^/| /' conftest.$ac_ext >&5
18219
Martin v. Löwis11437992002-04-12 09:54:03 +000018220
18221 echo "$as_me:$LINENO: result: no" >&5
18222echo "${ECHO_T}no" >&6
18223
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018224fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018225rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018226
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018227fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018229
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018230fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018231rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018232 CFLAGS=$OLD_CFLAGS
18233
18234else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018235
Martin v. Löwis11437992002-04-12 09:54:03 +000018236
18237for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000018238do
Martin v. Löwis11437992002-04-12 09:54:03 +000018239as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18240echo "$as_me:$LINENO: checking for $ac_func" >&5
18241echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18242if eval "test \"\${$as_ac_var+set}\" = set"; then
18243 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018244else
Martin v. Löwis11437992002-04-12 09:54:03 +000018245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018246/* confdefs.h. */
18247_ACEOF
18248cat confdefs.h >>conftest.$ac_ext
18249cat >>conftest.$ac_ext <<_ACEOF
18250/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018251/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018252 which can conflict with char $ac_func (); below.
18253 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018254 <limits.h> exists even on freestanding compilers. Under hpux,
18255 including <limits.h> includes <sys/time.h> and causes problems
18256 checking for functions defined therein. */
18257#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018258# include <limits.h>
18259#else
18260# include <assert.h>
18261#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018262/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018263#ifdef __cplusplus
18264extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018265{
Martin v. Löwis11437992002-04-12 09:54:03 +000018266#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018267/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 builtin and then its argument prototype would still apply. */
18269char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018270/* The GNU C library defines this for functions which it implements
18271 to always fail with ENOSYS. Some functions are actually named
18272 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000018273#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018274choke me
18275#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018276char (*f) () = $ac_func;
18277#endif
18278#ifdef __cplusplus
18279}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018280#endif
18281
Skip Montanaro6dead952003-09-25 14:50:04 +000018282int
18283main ()
18284{
18285return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018286 ;
18287 return 0;
18288}
18289_ACEOF
18290rm -f conftest.$ac_objext conftest$ac_exeext
18291if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018292 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018294 grep -v '^ *+' conftest.er1 >conftest.err
18295 rm -f conftest.er1
18296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18298 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018299 { ac_try='test -z "$ac_c_werror_flag"
18300 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18302 (eval $ac_try) 2>&5
18303 ac_status=$?
18304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18305 (exit $ac_status); }; } &&
18306 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18308 (eval $ac_try) 2>&5
18309 ac_status=$?
18310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18311 (exit $ac_status); }; }; then
18312 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018313else
Martin v. Löwis11437992002-04-12 09:54:03 +000018314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018315sed 's/^/| /' conftest.$ac_ext >&5
18316
Martin v. Löwis11437992002-04-12 09:54:03 +000018317eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018318fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018319rm -f conftest.err conftest.$ac_objext \
18320 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018322echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18323echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18324if test `eval echo '${'$as_ac_var'}'` = yes; then
18325 cat >>confdefs.h <<_ACEOF
18326#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18327_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018328
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018329fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018330done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018331
Michael W. Hudson54241132001-12-07 15:38:26 +000018332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018333fi
18334
Michael W. Hudson54241132001-12-07 15:38:26 +000018335
18336
18337
18338
18339
18340
Guido van Rossum627b2d71993-12-24 10:39:16 +000018341# checks for system services
18342# (none yet)
18343
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018344# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000018345echo "$as_me:$LINENO: checking for __fpu_control" >&5
18346echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
18347if test "${ac_cv_func___fpu_control+set}" = set; then
18348 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018349else
Martin v. Löwis11437992002-04-12 09:54:03 +000018350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018351/* confdefs.h. */
18352_ACEOF
18353cat confdefs.h >>conftest.$ac_ext
18354cat >>conftest.$ac_ext <<_ACEOF
18355/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018356/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018357 which can conflict with char __fpu_control (); below.
18358 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018359 <limits.h> exists even on freestanding compilers. Under hpux,
18360 including <limits.h> includes <sys/time.h> and causes problems
18361 checking for functions defined therein. */
18362#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018363# include <limits.h>
18364#else
18365# include <assert.h>
18366#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018367/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018368#ifdef __cplusplus
18369extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018370{
Martin v. Löwis11437992002-04-12 09:54:03 +000018371#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018372/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018373 builtin and then its argument prototype would still apply. */
18374char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018375/* The GNU C library defines this for functions which it implements
18376 to always fail with ENOSYS. Some functions are actually named
18377 something starting with __ and the normal name is an alias. */
18378#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
18379choke me
18380#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018381char (*f) () = __fpu_control;
18382#endif
18383#ifdef __cplusplus
18384}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018385#endif
18386
Skip Montanaro6dead952003-09-25 14:50:04 +000018387int
18388main ()
18389{
18390return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000018391 ;
18392 return 0;
18393}
18394_ACEOF
18395rm -f conftest.$ac_objext conftest$ac_exeext
18396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018397 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018399 grep -v '^ *+' conftest.er1 >conftest.err
18400 rm -f conftest.er1
18401 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18403 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018404 { ac_try='test -z "$ac_c_werror_flag"
18405 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18407 (eval $ac_try) 2>&5
18408 ac_status=$?
18409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18410 (exit $ac_status); }; } &&
18411 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18413 (eval $ac_try) 2>&5
18414 ac_status=$?
18415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18416 (exit $ac_status); }; }; then
18417 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018418else
Martin v. Löwis11437992002-04-12 09:54:03 +000018419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018420sed 's/^/| /' conftest.$ac_ext >&5
18421
Martin v. Löwis11437992002-04-12 09:54:03 +000018422ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018423fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018424rm -f conftest.err conftest.$ac_objext \
18425 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018427echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
18428echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
18429if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018430 :
18431else
Martin v. Löwis11437992002-04-12 09:54:03 +000018432
18433echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
18434echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
18435if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
18436 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018437else
Martin v. Löwis11437992002-04-12 09:54:03 +000018438 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018439LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018441/* confdefs.h. */
18442_ACEOF
18443cat confdefs.h >>conftest.$ac_ext
18444cat >>conftest.$ac_ext <<_ACEOF
18445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018446
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018447/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018448#ifdef __cplusplus
18449extern "C"
18450#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018451/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018452 builtin and then its argument prototype would still apply. */
18453char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018454int
18455main ()
18456{
18457__fpu_control ();
18458 ;
18459 return 0;
18460}
18461_ACEOF
18462rm -f conftest.$ac_objext conftest$ac_exeext
18463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018464 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018466 grep -v '^ *+' conftest.er1 >conftest.err
18467 rm -f conftest.er1
18468 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18470 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018471 { ac_try='test -z "$ac_c_werror_flag"
18472 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18474 (eval $ac_try) 2>&5
18475 ac_status=$?
18476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18477 (exit $ac_status); }; } &&
18478 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18480 (eval $ac_try) 2>&5
18481 ac_status=$?
18482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18483 (exit $ac_status); }; }; then
18484 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018485else
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018487sed 's/^/| /' conftest.$ac_ext >&5
18488
Martin v. Löwis11437992002-04-12 09:54:03 +000018489ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018490fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018491rm -f conftest.err conftest.$ac_objext \
18492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018493LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018495echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
18496echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
18497if test $ac_cv_lib_ieee___fpu_control = yes; then
18498 cat >>confdefs.h <<_ACEOF
18499#define HAVE_LIBIEEE 1
18500_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018501
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018502 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018503
Guido van Rossum627b2d71993-12-24 10:39:16 +000018504fi
18505
Michael W. Hudson54241132001-12-07 15:38:26 +000018506
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018507fi
18508
Michael W. Hudson54241132001-12-07 15:38:26 +000018509
Guido van Rossum7f253911997-05-09 02:42:48 +000018510# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000018511echo "$as_me:$LINENO: checking for --with-fpectl" >&5
18512echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
18513
Guido van Rossum7f253911997-05-09 02:42:48 +000018514# Check whether --with-fpectl or --without-fpectl was given.
18515if test "${with_fpectl+set}" = set; then
18516 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000018517
Guido van Rossum7f253911997-05-09 02:42:48 +000018518if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018519then
18520
18521cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000018522#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018523_ACEOF
18524
18525 echo "$as_me:$LINENO: result: yes" >&5
18526echo "${ECHO_T}yes" >&6
18527else echo "$as_me:$LINENO: result: no" >&5
18528echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018529fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018530else
Martin v. Löwis11437992002-04-12 09:54:03 +000018531 echo "$as_me:$LINENO: result: no" >&5
18532echo "${ECHO_T}no" >&6
18533fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000018534
Guido van Rossum7f43da71994-08-01 12:15:30 +000018535# check for --with-libm=...
18536
Guido van Rossum563e7081996-09-10 18:20:48 +000018537case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000018538Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000018539BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000018540*) LIBM=-lm
18541esac
Martin v. Löwis11437992002-04-12 09:54:03 +000018542echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
18543echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
18544
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018545# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018546if test "${with_libm+set}" = set; then
18547 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000018548
Guido van Rossum7f253911997-05-09 02:42:48 +000018549if test "$withval" = no
18550then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000018551 echo "$as_me:$LINENO: result: force LIBM empty" >&5
18552echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018553elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018554then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018555 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
18556echo "${ECHO_T}set LIBM=\"$withval\"" >&6
18557else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
18558echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
18559 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018560fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018561else
Martin v. Löwis11437992002-04-12 09:54:03 +000018562 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
18563echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
18564fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018565
18566# check for --with-libc=...
18567
Martin v. Löwis11437992002-04-12 09:54:03 +000018568echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18569echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18570
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018571# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018572if test "${with_libc+set}" = set; then
18573 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018574
Guido van Rossum7f253911997-05-09 02:42:48 +000018575if test "$withval" = no
18576then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018577 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18578echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018579elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018580then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018581 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18582echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18583else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18584echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18585 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018586fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018587else
Martin v. Löwis11437992002-04-12 09:54:03 +000018588 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18589echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18590fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018591
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018592# check for hypot() in math library
18593LIBS_SAVE=$LIBS
18594LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018595
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018596for ac_func in hypot
18597do
Martin v. Löwis11437992002-04-12 09:54:03 +000018598as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18599echo "$as_me:$LINENO: checking for $ac_func" >&5
18600echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18601if eval "test \"\${$as_ac_var+set}\" = set"; then
18602 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018603else
Martin v. Löwis11437992002-04-12 09:54:03 +000018604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018605/* confdefs.h. */
18606_ACEOF
18607cat confdefs.h >>conftest.$ac_ext
18608cat >>conftest.$ac_ext <<_ACEOF
18609/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018610/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018611 which can conflict with char $ac_func (); below.
18612 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018613 <limits.h> exists even on freestanding compilers. Under hpux,
18614 including <limits.h> includes <sys/time.h> and causes problems
18615 checking for functions defined therein. */
18616#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018617# include <limits.h>
18618#else
18619# include <assert.h>
18620#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018621/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018622#ifdef __cplusplus
18623extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018624{
Martin v. Löwis11437992002-04-12 09:54:03 +000018625#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018626/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 builtin and then its argument prototype would still apply. */
18628char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018629/* The GNU C library defines this for functions which it implements
18630 to always fail with ENOSYS. Some functions are actually named
18631 something starting with __ and the normal name is an alias. */
18632#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18633choke me
18634#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018635char (*f) () = $ac_func;
18636#endif
18637#ifdef __cplusplus
18638}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018639#endif
18640
Skip Montanaro6dead952003-09-25 14:50:04 +000018641int
18642main ()
18643{
18644return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018645 ;
18646 return 0;
18647}
18648_ACEOF
18649rm -f conftest.$ac_objext conftest$ac_exeext
18650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018651 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018653 grep -v '^ *+' conftest.er1 >conftest.err
18654 rm -f conftest.er1
18655 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18657 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018658 { ac_try='test -z "$ac_c_werror_flag"
18659 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18661 (eval $ac_try) 2>&5
18662 ac_status=$?
18663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18664 (exit $ac_status); }; } &&
18665 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18667 (eval $ac_try) 2>&5
18668 ac_status=$?
18669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18670 (exit $ac_status); }; }; then
18671 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018672else
Martin v. Löwis11437992002-04-12 09:54:03 +000018673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018674sed 's/^/| /' conftest.$ac_ext >&5
18675
Martin v. Löwis11437992002-04-12 09:54:03 +000018676eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018677fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018678rm -f conftest.err conftest.$ac_objext \
18679 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018680fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018681echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18682echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18683if test `eval echo '${'$as_ac_var'}'` = yes; then
18684 cat >>confdefs.h <<_ACEOF
18685#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18686_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018687
Michael W. Hudson54241132001-12-07 15:38:26 +000018688else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018689 case $LIBOBJS in
18690 "$ac_func.$ac_objext" | \
18691 *" $ac_func.$ac_objext" | \
18692 "$ac_func.$ac_objext "* | \
18693 *" $ac_func.$ac_objext "* ) ;;
18694 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18695esac
18696
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018697fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018698done
18699
Michael W. Hudson54241132001-12-07 15:38:26 +000018700
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018701LIBS=$LIBS_SAVE
18702
Guido van Rossumef2255b2000-03-10 22:30:29 +000018703# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018704if test "${ac_cv_header_wchar_h+set}" = set; then
18705 echo "$as_me:$LINENO: checking for wchar.h" >&5
18706echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18707if test "${ac_cv_header_wchar_h+set}" = set; then
18708 echo $ECHO_N "(cached) $ECHO_C" >&6
18709fi
18710echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18711echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018712else
Martin v. Löwis11437992002-04-12 09:54:03 +000018713 # Is the header compilable?
18714echo "$as_me:$LINENO: checking wchar.h usability" >&5
18715echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018717/* confdefs.h. */
18718_ACEOF
18719cat confdefs.h >>conftest.$ac_ext
18720cat >>conftest.$ac_ext <<_ACEOF
18721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018722$ac_includes_default
18723#include <wchar.h>
18724_ACEOF
18725rm -f conftest.$ac_objext
18726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018727 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018729 grep -v '^ *+' conftest.er1 >conftest.err
18730 rm -f conftest.er1
18731 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18733 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018734 { ac_try='test -z "$ac_c_werror_flag"
18735 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18737 (eval $ac_try) 2>&5
18738 ac_status=$?
18739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18740 (exit $ac_status); }; } &&
18741 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18743 (eval $ac_try) 2>&5
18744 ac_status=$?
18745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18746 (exit $ac_status); }; }; then
18747 ac_header_compiler=yes
18748else
18749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018750sed 's/^/| /' conftest.$ac_ext >&5
18751
Martin v. Löwis11437992002-04-12 09:54:03 +000018752ac_header_compiler=no
18753fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018754rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018755echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18756echo "${ECHO_T}$ac_header_compiler" >&6
18757
18758# Is the header present?
18759echo "$as_me:$LINENO: checking wchar.h presence" >&5
18760echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18761cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018762/* confdefs.h. */
18763_ACEOF
18764cat confdefs.h >>conftest.$ac_ext
18765cat >>conftest.$ac_ext <<_ACEOF
18766/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018767#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018768_ACEOF
18769if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18770 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18771 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018772 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018773 rm -f conftest.er1
18774 cat conftest.err >&5
18775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18776 (exit $ac_status); } >/dev/null; then
18777 if test -s conftest.err; then
18778 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018779 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018780 else
18781 ac_cpp_err=
18782 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018783else
Martin v. Löwis11437992002-04-12 09:54:03 +000018784 ac_cpp_err=yes
18785fi
18786if test -z "$ac_cpp_err"; then
18787 ac_header_preproc=yes
18788else
18789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018790sed 's/^/| /' conftest.$ac_ext >&5
18791
Martin v. Löwis11437992002-04-12 09:54:03 +000018792 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018794rm -f conftest.err conftest.$ac_ext
18795echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18796echo "${ECHO_T}$ac_header_preproc" >&6
18797
18798# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018799case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18800 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018801 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18802echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018803 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18804echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18805 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018806 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018807 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018808 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18809echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018810 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18811echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18812 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18813echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18814 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18815echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018816 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18817echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018818 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18819echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018820 (
18821 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000018822## ------------------------------------------------ ##
18823## Report this to http://www.python.org/python-bugs ##
18824## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018825_ASBOX
18826 ) |
18827 sed "s/^/$as_me: WARNING: /" >&2
18828 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018829esac
18830echo "$as_me:$LINENO: checking for wchar.h" >&5
18831echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18832if test "${ac_cv_header_wchar_h+set}" = set; then
18833 echo $ECHO_N "(cached) $ECHO_C" >&6
18834else
18835 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018837echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18838echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18839
18840fi
18841if test $ac_cv_header_wchar_h = yes; then
18842
18843
18844cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018845#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018846_ACEOF
18847
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018848 wchar_h="yes"
18849
Guido van Rossumef2255b2000-03-10 22:30:29 +000018850else
Martin v. Löwis11437992002-04-12 09:54:03 +000018851 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018852
18853fi
18854
Michael W. Hudson54241132001-12-07 15:38:26 +000018855
Martin v. Löwis11437992002-04-12 09:54:03 +000018856
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018857# determine wchar_t size
18858if test "$wchar_h" = yes
18859then
Martin v. Löwis11437992002-04-12 09:54:03 +000018860 echo "$as_me:$LINENO: checking for wchar_t" >&5
18861echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18862if test "${ac_cv_type_wchar_t+set}" = set; then
18863 echo $ECHO_N "(cached) $ECHO_C" >&6
18864else
18865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018866/* confdefs.h. */
18867_ACEOF
18868cat confdefs.h >>conftest.$ac_ext
18869cat >>conftest.$ac_ext <<_ACEOF
18870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018871#include <wchar.h>
18872
Martin v. Löwis11437992002-04-12 09:54:03 +000018873int
18874main ()
18875{
18876if ((wchar_t *) 0)
18877 return 0;
18878if (sizeof (wchar_t))
18879 return 0;
18880 ;
18881 return 0;
18882}
18883_ACEOF
18884rm -f conftest.$ac_objext
18885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018886 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018888 grep -v '^ *+' conftest.er1 >conftest.err
18889 rm -f conftest.er1
18890 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18892 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018893 { ac_try='test -z "$ac_c_werror_flag"
18894 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18896 (eval $ac_try) 2>&5
18897 ac_status=$?
18898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18899 (exit $ac_status); }; } &&
18900 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18902 (eval $ac_try) 2>&5
18903 ac_status=$?
18904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18905 (exit $ac_status); }; }; then
18906 ac_cv_type_wchar_t=yes
18907else
18908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018909sed 's/^/| /' conftest.$ac_ext >&5
18910
Martin v. Löwis11437992002-04-12 09:54:03 +000018911ac_cv_type_wchar_t=no
18912fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018913rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018914fi
18915echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18916echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18917
18918echo "$as_me:$LINENO: checking size of wchar_t" >&5
18919echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18920if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18921 echo $ECHO_N "(cached) $ECHO_C" >&6
18922else
18923 if test "$ac_cv_type_wchar_t" = yes; then
18924 # The cast to unsigned long works around a bug in the HP C Compiler
18925 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18926 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18927 # This bug is HP SR number 8606223364.
18928 if test "$cross_compiling" = yes; then
18929 # Depending upon the size, compute the lo and hi bounds.
18930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018931/* confdefs.h. */
18932_ACEOF
18933cat confdefs.h >>conftest.$ac_ext
18934cat >>conftest.$ac_ext <<_ACEOF
18935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018936#include <wchar.h>
18937
Martin v. Löwis11437992002-04-12 09:54:03 +000018938int
18939main ()
18940{
18941static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
18942test_array [0] = 0
18943
18944 ;
18945 return 0;
18946}
18947_ACEOF
18948rm -f conftest.$ac_objext
18949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018950 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018952 grep -v '^ *+' conftest.er1 >conftest.err
18953 rm -f conftest.er1
18954 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18956 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018957 { ac_try='test -z "$ac_c_werror_flag"
18958 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18960 (eval $ac_try) 2>&5
18961 ac_status=$?
18962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18963 (exit $ac_status); }; } &&
18964 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18966 (eval $ac_try) 2>&5
18967 ac_status=$?
18968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18969 (exit $ac_status); }; }; then
18970 ac_lo=0 ac_mid=0
18971 while :; do
18972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018973/* confdefs.h. */
18974_ACEOF
18975cat confdefs.h >>conftest.$ac_ext
18976cat >>conftest.$ac_ext <<_ACEOF
18977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018978#include <wchar.h>
18979
Martin v. Löwis11437992002-04-12 09:54:03 +000018980int
18981main ()
18982{
18983static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18984test_array [0] = 0
18985
18986 ;
18987 return 0;
18988}
18989_ACEOF
18990rm -f conftest.$ac_objext
18991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018992 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018994 grep -v '^ *+' conftest.er1 >conftest.err
18995 rm -f conftest.er1
18996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18998 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018999 { ac_try='test -z "$ac_c_werror_flag"
19000 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19002 (eval $ac_try) 2>&5
19003 ac_status=$?
19004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19005 (exit $ac_status); }; } &&
19006 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19008 (eval $ac_try) 2>&5
19009 ac_status=$?
19010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19011 (exit $ac_status); }; }; then
19012 ac_hi=$ac_mid; break
19013else
19014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019015sed 's/^/| /' conftest.$ac_ext >&5
19016
Martin v. Löwis11437992002-04-12 09:54:03 +000019017ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019018 if test $ac_lo -le $ac_mid; then
19019 ac_lo= ac_hi=
19020 break
19021 fi
19022 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000019023fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019024rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019025 done
19026else
19027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019028sed 's/^/| /' conftest.$ac_ext >&5
19029
Martin v. Löwis11437992002-04-12 09:54:03 +000019030cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019031/* confdefs.h. */
19032_ACEOF
19033cat confdefs.h >>conftest.$ac_ext
19034cat >>conftest.$ac_ext <<_ACEOF
19035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019036#include <wchar.h>
19037
Martin v. Löwis11437992002-04-12 09:54:03 +000019038int
19039main ()
19040{
19041static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
19042test_array [0] = 0
19043
19044 ;
19045 return 0;
19046}
19047_ACEOF
19048rm -f conftest.$ac_objext
19049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019050 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019052 grep -v '^ *+' conftest.er1 >conftest.err
19053 rm -f conftest.er1
19054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19056 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019057 { ac_try='test -z "$ac_c_werror_flag"
19058 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19060 (eval $ac_try) 2>&5
19061 ac_status=$?
19062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19063 (exit $ac_status); }; } &&
19064 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19066 (eval $ac_try) 2>&5
19067 ac_status=$?
19068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19069 (exit $ac_status); }; }; then
19070 ac_hi=-1 ac_mid=-1
19071 while :; do
19072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019073/* confdefs.h. */
19074_ACEOF
19075cat confdefs.h >>conftest.$ac_ext
19076cat >>conftest.$ac_ext <<_ACEOF
19077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019078#include <wchar.h>
19079
Martin v. Löwis11437992002-04-12 09:54:03 +000019080int
19081main ()
19082{
19083static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
19084test_array [0] = 0
19085
19086 ;
19087 return 0;
19088}
19089_ACEOF
19090rm -f conftest.$ac_objext
19091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019092 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019094 grep -v '^ *+' conftest.er1 >conftest.err
19095 rm -f conftest.er1
19096 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19098 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019099 { ac_try='test -z "$ac_c_werror_flag"
19100 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19102 (eval $ac_try) 2>&5
19103 ac_status=$?
19104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19105 (exit $ac_status); }; } &&
19106 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19108 (eval $ac_try) 2>&5
19109 ac_status=$?
19110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19111 (exit $ac_status); }; }; then
19112 ac_lo=$ac_mid; break
19113else
19114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019115sed 's/^/| /' conftest.$ac_ext >&5
19116
Martin v. Löwis11437992002-04-12 09:54:03 +000019117ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019118 if test $ac_mid -le $ac_hi; then
19119 ac_lo= ac_hi=
19120 break
19121 fi
19122 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000019123fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019124rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019125 done
19126else
19127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019128sed 's/^/| /' conftest.$ac_ext >&5
19129
Martin v. Löwis11437992002-04-12 09:54:03 +000019130ac_lo= ac_hi=
19131fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019132rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019133fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019135# Binary search between lo and hi bounds.
19136while test "x$ac_lo" != "x$ac_hi"; do
19137 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19138 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019139/* confdefs.h. */
19140_ACEOF
19141cat confdefs.h >>conftest.$ac_ext
19142cat >>conftest.$ac_ext <<_ACEOF
19143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019144#include <wchar.h>
19145
Martin v. Löwis11437992002-04-12 09:54:03 +000019146int
19147main ()
19148{
19149static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19150test_array [0] = 0
19151
19152 ;
19153 return 0;
19154}
19155_ACEOF
19156rm -f conftest.$ac_objext
19157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019158 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019160 grep -v '^ *+' conftest.er1 >conftest.err
19161 rm -f conftest.er1
19162 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19164 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019165 { ac_try='test -z "$ac_c_werror_flag"
19166 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19168 (eval $ac_try) 2>&5
19169 ac_status=$?
19170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19171 (exit $ac_status); }; } &&
19172 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19174 (eval $ac_try) 2>&5
19175 ac_status=$?
19176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19177 (exit $ac_status); }; }; then
19178 ac_hi=$ac_mid
19179else
19180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019181sed 's/^/| /' conftest.$ac_ext >&5
19182
Martin v. Löwis11437992002-04-12 09:54:03 +000019183ac_lo=`expr '(' $ac_mid ')' + 1`
19184fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019186done
19187case $ac_lo in
19188?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019189'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19190See \`config.log' for more details." >&5
19191echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19192See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019193 { (exit 1); exit 1; }; } ;;
19194esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019195else
19196 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000019197 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19198See \`config.log' for more details." >&5
19199echo "$as_me: error: cannot run test program while cross compiling
19200See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019201 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000019202else
Martin v. Löwis11437992002-04-12 09:54:03 +000019203 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019209#include <wchar.h>
19210
19211long longval () { return (long) (sizeof (wchar_t)); }
19212unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000019213#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019214#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019215int
19216main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019217{
Martin v. Löwis11437992002-04-12 09:54:03 +000019218
19219 FILE *f = fopen ("conftest.val", "w");
19220 if (! f)
19221 exit (1);
19222 if (((long) (sizeof (wchar_t))) < 0)
19223 {
19224 long i = longval ();
19225 if (i != ((long) (sizeof (wchar_t))))
19226 exit (1);
19227 fprintf (f, "%ld\n", i);
19228 }
19229 else
19230 {
19231 unsigned long i = ulongval ();
19232 if (i != ((long) (sizeof (wchar_t))))
19233 exit (1);
19234 fprintf (f, "%lu\n", i);
19235 }
19236 exit (ferror (f) || fclose (f) != 0);
19237
19238 ;
19239 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000019240}
Martin v. Löwis11437992002-04-12 09:54:03 +000019241_ACEOF
19242rm -f conftest$ac_exeext
19243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19244 (eval $ac_link) 2>&5
19245 ac_status=$?
19246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19249 (eval $ac_try) 2>&5
19250 ac_status=$?
19251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19252 (exit $ac_status); }; }; then
19253 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000019254else
Martin v. Löwis11437992002-04-12 09:54:03 +000019255 echo "$as_me: program exited with status $ac_status" >&5
19256echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019257sed 's/^/| /' conftest.$ac_ext >&5
19258
Martin v. Löwis11437992002-04-12 09:54:03 +000019259( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000019260{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19261See \`config.log' for more details." >&5
19262echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19263See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019264 { (exit 1); exit 1; }; }
19265fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019266rm -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 +000019267fi
19268fi
19269rm -f conftest.val
19270else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019271 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000019272fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019274echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
19275echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
19276cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019277#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019278_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019279
Michael W. Hudson54241132001-12-07 15:38:26 +000019280
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019281fi
19282
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019283echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
19284echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
19285have_ucs4_tcl=no
19286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019287/* confdefs.h. */
19288_ACEOF
19289cat confdefs.h >>conftest.$ac_ext
19290cat >>conftest.$ac_ext <<_ACEOF
19291/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019292
19293#include <tcl.h>
19294#if TCL_UTF_MAX != 6
19295# error "NOT UCS4_TCL"
19296#endif
19297int
19298main ()
19299{
19300
19301 ;
19302 return 0;
19303}
19304_ACEOF
19305rm -f conftest.$ac_objext
19306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019307 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019309 grep -v '^ *+' conftest.er1 >conftest.err
19310 rm -f conftest.er1
19311 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19313 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019314 { ac_try='test -z "$ac_c_werror_flag"
19315 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19317 (eval $ac_try) 2>&5
19318 ac_status=$?
19319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19320 (exit $ac_status); }; } &&
19321 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19323 (eval $ac_try) 2>&5
19324 ac_status=$?
19325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19326 (exit $ac_status); }; }; then
19327
19328
19329cat >>confdefs.h <<\_ACEOF
19330#define HAVE_UCS4_TCL 1
19331_ACEOF
19332
19333 have_ucs4_tcl=yes
19334
19335else
19336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019337sed 's/^/| /' conftest.$ac_ext >&5
19338
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019339fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019340rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019341echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
19342echo "${ECHO_T}$have_ucs4_tcl" >&6
19343
Skip Montanaro6dead952003-09-25 14:50:04 +000019344# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019345if test "$wchar_h" = yes
19346then
19347 # check whether wchar_t is signed or not
19348 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
19349echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
19350 if test "${ac_cv_wchar_t_signed+set}" = set; then
19351 echo $ECHO_N "(cached) $ECHO_C" >&6
19352else
19353
19354 if test "$cross_compiling" = yes; then
19355 ac_cv_wchar_t_signed=yes
19356else
19357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019358/* confdefs.h. */
19359_ACEOF
19360cat confdefs.h >>conftest.$ac_ext
19361cat >>conftest.$ac_ext <<_ACEOF
19362/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019363
19364 #include <wchar.h>
19365 int main()
19366 {
19367 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
19368 }
19369
19370_ACEOF
19371rm -f conftest$ac_exeext
19372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19373 (eval $ac_link) 2>&5
19374 ac_status=$?
19375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19378 (eval $ac_try) 2>&5
19379 ac_status=$?
19380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19381 (exit $ac_status); }; }; then
19382 ac_cv_wchar_t_signed=yes
19383else
19384 echo "$as_me: program exited with status $ac_status" >&5
19385echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019386sed 's/^/| /' conftest.$ac_ext >&5
19387
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019388( exit $ac_status )
19389ac_cv_wchar_t_signed=no
19390fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019391rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019392fi
19393fi
19394
19395 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
19396echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
19397fi
19398
Martin v. Löwis11437992002-04-12 09:54:03 +000019399echo "$as_me:$LINENO: checking what type to use for unicode" >&5
19400echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019401# Check whether --enable-unicode or --disable-unicode was given.
19402if test "${enable_unicode+set}" = set; then
19403 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000019404
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019405else
19406 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000019407fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019408
19409if test $enable_unicode = yes
19410then
Martin v. Löwisfd917792001-06-27 20:22:04 +000019411 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019412 case "$have_ucs4_tcl" in
19413 yes) enable_unicode="ucs4"
19414 ;;
19415 *) enable_unicode="ucs2"
19416 ;;
19417 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019418fi
19419
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019420
19421
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019422case "$enable_unicode" in
19423ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000019424 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019425#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000019426_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019427
19428 ;;
19429ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000019430 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019431#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000019432_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019433
19434 ;;
19435esac
19436
Michael W. Hudson54241132001-12-07 15:38:26 +000019437
Martin v. Löwis11437992002-04-12 09:54:03 +000019438
19439
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019440
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019441if test "$enable_unicode" = "no"
19442then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019443 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000019444 echo "$as_me:$LINENO: result: not used" >&5
19445echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019446else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019447 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000019448
19449cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019450#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019451_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019452
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019453
19454 # wchar_t is only usable if it maps to an unsigned type
19455 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000019456 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019457 then
19458 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019459
Martin v. Löwis11437992002-04-12 09:54:03 +000019460cat >>confdefs.h <<\_ACEOF
19461#define HAVE_USABLE_WCHAR_T 1
19462_ACEOF
19463
19464 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019465#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019466_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019467
19468 elif test "$ac_cv_sizeof_short" = "$unicode_size"
19469 then
19470 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000019471 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019472#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000019473_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019474
19475 elif test "$ac_cv_sizeof_long" = "$unicode_size"
19476 then
19477 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000019478 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019479#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000019480_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019481
19482 else
19483 PY_UNICODE_TYPE="no type found"
19484 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019485 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
19486echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019487fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019488
19489# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019490echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
19491echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
19492if test "${ac_cv_c_bigendian+set}" = set; then
19493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019494else
Martin v. Löwis11437992002-04-12 09:54:03 +000019495 # See if sys/param.h defines the BYTE_ORDER macro.
19496cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019497/* confdefs.h. */
19498_ACEOF
19499cat confdefs.h >>conftest.$ac_ext
19500cat >>conftest.$ac_ext <<_ACEOF
19501/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019502#include <sys/types.h>
19503#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019504
Martin v. Löwis11437992002-04-12 09:54:03 +000019505int
19506main ()
19507{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019508#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
19509 bogus endian macros
19510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019511
19512 ;
19513 return 0;
19514}
19515_ACEOF
19516rm -f conftest.$ac_objext
19517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019518 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019520 grep -v '^ *+' conftest.er1 >conftest.err
19521 rm -f conftest.er1
19522 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19524 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019525 { ac_try='test -z "$ac_c_werror_flag"
19526 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19528 (eval $ac_try) 2>&5
19529 ac_status=$?
19530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19531 (exit $ac_status); }; } &&
19532 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19534 (eval $ac_try) 2>&5
19535 ac_status=$?
19536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19537 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019538 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000019539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019540/* confdefs.h. */
19541_ACEOF
19542cat confdefs.h >>conftest.$ac_ext
19543cat >>conftest.$ac_ext <<_ACEOF
19544/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019545#include <sys/types.h>
19546#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019547
Martin v. Löwis11437992002-04-12 09:54:03 +000019548int
19549main ()
19550{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019551#if BYTE_ORDER != BIG_ENDIAN
19552 not big endian
19553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019554
19555 ;
19556 return 0;
19557}
19558_ACEOF
19559rm -f conftest.$ac_objext
19560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019561 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019563 grep -v '^ *+' conftest.er1 >conftest.err
19564 rm -f conftest.er1
19565 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19567 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019568 { ac_try='test -z "$ac_c_werror_flag"
19569 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19571 (eval $ac_try) 2>&5
19572 ac_status=$?
19573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19574 (exit $ac_status); }; } &&
19575 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19577 (eval $ac_try) 2>&5
19578 ac_status=$?
19579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19580 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019581 ac_cv_c_bigendian=yes
19582else
Martin v. Löwis11437992002-04-12 09:54:03 +000019583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019584sed 's/^/| /' conftest.$ac_ext >&5
19585
Martin v. Löwis11437992002-04-12 09:54:03 +000019586ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019587fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019588rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019589else
Martin v. Löwis11437992002-04-12 09:54:03 +000019590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019591sed 's/^/| /' conftest.$ac_ext >&5
19592
Martin v. Löwis11437992002-04-12 09:54:03 +000019593# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019594if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019595 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019596 ac_cv_c_bigendian=unknown
19597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019598/* confdefs.h. */
19599_ACEOF
19600cat confdefs.h >>conftest.$ac_ext
19601cat >>conftest.$ac_ext <<_ACEOF
19602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019603short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19604short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19605void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19606short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19607short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19608void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019609int
19610main ()
19611{
19612 _ascii (); _ebcdic ();
19613 ;
19614 return 0;
19615}
19616_ACEOF
19617rm -f conftest.$ac_objext
19618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019619 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019621 grep -v '^ *+' conftest.er1 >conftest.err
19622 rm -f conftest.er1
19623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19625 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019626 { ac_try='test -z "$ac_c_werror_flag"
19627 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19629 (eval $ac_try) 2>&5
19630 ac_status=$?
19631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19632 (exit $ac_status); }; } &&
19633 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19635 (eval $ac_try) 2>&5
19636 ac_status=$?
19637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19638 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019639 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019640 ac_cv_c_bigendian=yes
19641fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019642if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019643 if test "$ac_cv_c_bigendian" = unknown; then
19644 ac_cv_c_bigendian=no
19645 else
19646 # finding both strings is unlikely to happen, but who knows?
19647 ac_cv_c_bigendian=unknown
19648 fi
19649fi
19650else
19651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019652sed 's/^/| /' conftest.$ac_ext >&5
19653
Martin v. Löwis11437992002-04-12 09:54:03 +000019654fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019656else
19657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019658/* confdefs.h. */
19659_ACEOF
19660cat confdefs.h >>conftest.$ac_ext
19661cat >>conftest.$ac_ext <<_ACEOF
19662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019663int
19664main ()
19665{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019666 /* Are we little or big endian? From Harbison&Steele. */
19667 union
19668 {
19669 long l;
19670 char c[sizeof (long)];
19671 } u;
19672 u.l = 1;
19673 exit (u.c[sizeof (long) - 1] == 1);
19674}
Martin v. Löwis11437992002-04-12 09:54:03 +000019675_ACEOF
19676rm -f conftest$ac_exeext
19677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19678 (eval $ac_link) 2>&5
19679 ac_status=$?
19680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19681 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19683 (eval $ac_try) 2>&5
19684 ac_status=$?
19685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19686 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019687 ac_cv_c_bigendian=no
19688else
Martin v. Löwis11437992002-04-12 09:54:03 +000019689 echo "$as_me: program exited with status $ac_status" >&5
19690echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019691sed 's/^/| /' conftest.$ac_ext >&5
19692
Martin v. Löwis11437992002-04-12 09:54:03 +000019693( exit $ac_status )
19694ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019695fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019696rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019697fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019698fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019700fi
19701echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19702echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19703case $ac_cv_c_bigendian in
19704 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019705
Martin v. Löwis11437992002-04-12 09:54:03 +000019706cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019707#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019708_ACEOF
19709 ;;
19710 no)
19711 ;;
19712 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019713 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019714presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019715echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019716presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19717 { (exit 1); exit 1; }; } ;;
19718esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019719
Michael W. Hudson54241132001-12-07 15:38:26 +000019720
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019721# Check whether right shifting a negative integer extends the sign bit
19722# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019723echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19724echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19725if test "${ac_cv_rshift_extends_sign+set}" = set; then
19726 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019727else
Martin v. Löwis11437992002-04-12 09:54:03 +000019728
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019729if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019730 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019731else
Martin v. Löwis11437992002-04-12 09:54:03 +000019732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019733/* confdefs.h. */
19734_ACEOF
19735cat confdefs.h >>conftest.$ac_ext
19736cat >>conftest.$ac_ext <<_ACEOF
19737/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019738
19739int main()
19740{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019741 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019742}
19743
Martin v. Löwis11437992002-04-12 09:54:03 +000019744_ACEOF
19745rm -f conftest$ac_exeext
19746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19747 (eval $ac_link) 2>&5
19748 ac_status=$?
19749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19750 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19752 (eval $ac_try) 2>&5
19753 ac_status=$?
19754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19755 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000019756 ac_cv_rshift_extends_sign=yes
19757else
Martin v. Löwis11437992002-04-12 09:54:03 +000019758 echo "$as_me: program exited with status $ac_status" >&5
19759echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019760sed 's/^/| /' conftest.$ac_ext >&5
19761
Martin v. Löwis11437992002-04-12 09:54:03 +000019762( exit $ac_status )
19763ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019764fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019765rm -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 +000019766fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019767fi
19768
Martin v. Löwis11437992002-04-12 09:54:03 +000019769echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19770echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019771if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019772then
Martin v. Löwis11437992002-04-12 09:54:03 +000019773
19774cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019775#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019776_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019777
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019778fi
19779
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019780# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019781echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19782echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19783if test "${ac_cv_have_getc_unlocked+set}" = set; then
19784 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019785else
Martin v. Löwis11437992002-04-12 09:54:03 +000019786
19787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019788/* confdefs.h. */
19789_ACEOF
19790cat confdefs.h >>conftest.$ac_ext
19791cat >>conftest.$ac_ext <<_ACEOF
19792/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019793#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019794int
19795main ()
19796{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019797
19798 FILE *f = fopen("/dev/null", "r");
19799 flockfile(f);
19800 getc_unlocked(f);
19801 funlockfile(f);
19802
Martin v. Löwis11437992002-04-12 09:54:03 +000019803 ;
19804 return 0;
19805}
19806_ACEOF
19807rm -f conftest.$ac_objext conftest$ac_exeext
19808if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019809 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019811 grep -v '^ *+' conftest.er1 >conftest.err
19812 rm -f conftest.er1
19813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19815 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019816 { ac_try='test -z "$ac_c_werror_flag"
19817 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19819 (eval $ac_try) 2>&5
19820 ac_status=$?
19821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19822 (exit $ac_status); }; } &&
19823 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19825 (eval $ac_try) 2>&5
19826 ac_status=$?
19827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19828 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019829 ac_cv_have_getc_unlocked=yes
19830else
Martin v. Löwis11437992002-04-12 09:54:03 +000019831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019832sed 's/^/| /' conftest.$ac_ext >&5
19833
Martin v. Löwis11437992002-04-12 09:54:03 +000019834ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019835fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019836rm -f conftest.err conftest.$ac_objext \
19837 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019838fi
19839
Martin v. Löwis11437992002-04-12 09:54:03 +000019840echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19841echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019842if test "$ac_cv_have_getc_unlocked" = yes
19843then
Martin v. Löwis11437992002-04-12 09:54:03 +000019844
19845cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019846#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019847_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019848
19849fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019850
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000019851# check where readline lives
19852
19853echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
19854echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
19855if test "${ac_cv_lib_readline_readline+set}" = set; then
19856 echo $ECHO_N "(cached) $ECHO_C" >&6
19857else
19858 ac_check_lib_save_LIBS=$LIBS
19859LIBS="-lreadline $LIBS"
19860cat >conftest.$ac_ext <<_ACEOF
19861/* confdefs.h. */
19862_ACEOF
19863cat confdefs.h >>conftest.$ac_ext
19864cat >>conftest.$ac_ext <<_ACEOF
19865/* end confdefs.h. */
19866
19867/* Override any gcc2 internal prototype to avoid an error. */
19868#ifdef __cplusplus
19869extern "C"
19870#endif
19871/* We use char because int might match the return type of a gcc2
19872 builtin and then its argument prototype would still apply. */
19873char readline ();
19874int
19875main ()
19876{
19877readline ();
19878 ;
19879 return 0;
19880}
19881_ACEOF
19882rm -f conftest.$ac_objext conftest$ac_exeext
19883if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19884 (eval $ac_link) 2>conftest.er1
19885 ac_status=$?
19886 grep -v '^ *+' conftest.er1 >conftest.err
19887 rm -f conftest.er1
19888 cat conftest.err >&5
19889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19890 (exit $ac_status); } &&
19891 { ac_try='test -z "$ac_c_werror_flag"
19892 || test ! -s conftest.err'
19893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19894 (eval $ac_try) 2>&5
19895 ac_status=$?
19896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19897 (exit $ac_status); }; } &&
19898 { ac_try='test -s conftest$ac_exeext'
19899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19900 (eval $ac_try) 2>&5
19901 ac_status=$?
19902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19903 (exit $ac_status); }; }; then
19904 ac_cv_lib_readline_readline=yes
19905else
19906 echo "$as_me: failed program was:" >&5
19907sed 's/^/| /' conftest.$ac_ext >&5
19908
19909ac_cv_lib_readline_readline=no
19910fi
19911rm -f conftest.err conftest.$ac_objext \
19912 conftest$ac_exeext conftest.$ac_ext
19913LIBS=$ac_check_lib_save_LIBS
19914fi
19915echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
19916echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
19917if test $ac_cv_lib_readline_readline = yes; then
19918 cat >>confdefs.h <<_ACEOF
19919#define HAVE_LIBREADLINE 1
19920_ACEOF
19921
19922 LIBS="-lreadline $LIBS"
19923
19924fi
19925
19926if test "$ac_cv_have_readline_readline" = no
19927then
19928
19929echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
19930echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
19931if test "${ac_cv_lib_termcap_readline+set}" = set; then
19932 echo $ECHO_N "(cached) $ECHO_C" >&6
19933else
19934 ac_check_lib_save_LIBS=$LIBS
19935LIBS="-ltermcap $LIBS"
19936cat >conftest.$ac_ext <<_ACEOF
19937/* confdefs.h. */
19938_ACEOF
19939cat confdefs.h >>conftest.$ac_ext
19940cat >>conftest.$ac_ext <<_ACEOF
19941/* end confdefs.h. */
19942
19943/* Override any gcc2 internal prototype to avoid an error. */
19944#ifdef __cplusplus
19945extern "C"
19946#endif
19947/* We use char because int might match the return type of a gcc2
19948 builtin and then its argument prototype would still apply. */
19949char readline ();
19950int
19951main ()
19952{
19953readline ();
19954 ;
19955 return 0;
19956}
19957_ACEOF
19958rm -f conftest.$ac_objext conftest$ac_exeext
19959if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19960 (eval $ac_link) 2>conftest.er1
19961 ac_status=$?
19962 grep -v '^ *+' conftest.er1 >conftest.err
19963 rm -f conftest.er1
19964 cat conftest.err >&5
19965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19966 (exit $ac_status); } &&
19967 { ac_try='test -z "$ac_c_werror_flag"
19968 || test ! -s conftest.err'
19969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19970 (eval $ac_try) 2>&5
19971 ac_status=$?
19972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19973 (exit $ac_status); }; } &&
19974 { ac_try='test -s conftest$ac_exeext'
19975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19976 (eval $ac_try) 2>&5
19977 ac_status=$?
19978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19979 (exit $ac_status); }; }; then
19980 ac_cv_lib_termcap_readline=yes
19981else
19982 echo "$as_me: failed program was:" >&5
19983sed 's/^/| /' conftest.$ac_ext >&5
19984
19985ac_cv_lib_termcap_readline=no
19986fi
19987rm -f conftest.err conftest.$ac_objext \
19988 conftest$ac_exeext conftest.$ac_ext
19989LIBS=$ac_check_lib_save_LIBS
19990fi
19991echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
19992echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
19993if test $ac_cv_lib_termcap_readline = yes; then
19994 cat >>confdefs.h <<_ACEOF
19995#define HAVE_LIBTERMCAP 1
19996_ACEOF
19997
19998 LIBS="-ltermcap $LIBS"
19999
20000fi
20001
20002fi
20003
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020004# check for readline 2.1
20005echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
20006echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
20007if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
20008 echo $ECHO_N "(cached) $ECHO_C" >&6
20009else
20010 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020011LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020012cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020013/* confdefs.h. */
20014_ACEOF
20015cat confdefs.h >>conftest.$ac_ext
20016cat >>conftest.$ac_ext <<_ACEOF
20017/* end confdefs.h. */
20018
20019/* Override any gcc2 internal prototype to avoid an error. */
20020#ifdef __cplusplus
20021extern "C"
20022#endif
20023/* We use char because int might match the return type of a gcc2
20024 builtin and then its argument prototype would still apply. */
20025char rl_callback_handler_install ();
20026int
20027main ()
20028{
20029rl_callback_handler_install ();
20030 ;
20031 return 0;
20032}
20033_ACEOF
20034rm -f conftest.$ac_objext conftest$ac_exeext
20035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020036 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020038 grep -v '^ *+' conftest.er1 >conftest.err
20039 rm -f conftest.er1
20040 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20042 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020043 { ac_try='test -z "$ac_c_werror_flag"
20044 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20046 (eval $ac_try) 2>&5
20047 ac_status=$?
20048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20049 (exit $ac_status); }; } &&
20050 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20052 (eval $ac_try) 2>&5
20053 ac_status=$?
20054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20055 (exit $ac_status); }; }; then
20056 ac_cv_lib_readline_rl_callback_handler_install=yes
20057else
20058 echo "$as_me: failed program was:" >&5
20059sed 's/^/| /' conftest.$ac_ext >&5
20060
20061ac_cv_lib_readline_rl_callback_handler_install=no
20062fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020063rm -f conftest.err conftest.$ac_objext \
20064 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020065LIBS=$ac_check_lib_save_LIBS
20066fi
20067echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
20068echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
20069if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
20070
20071cat >>confdefs.h <<\_ACEOF
20072#define HAVE_RL_CALLBACK 1
20073_ACEOF
20074
20075fi
20076
20077
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020078# check for readline 2.2
20079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020080/* confdefs.h. */
20081_ACEOF
20082cat confdefs.h >>conftest.$ac_ext
20083cat >>conftest.$ac_ext <<_ACEOF
20084/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020085#include <readline/readline.h>
20086_ACEOF
20087if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20088 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20089 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020090 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020091 rm -f conftest.er1
20092 cat conftest.err >&5
20093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20094 (exit $ac_status); } >/dev/null; then
20095 if test -s conftest.err; then
20096 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020097 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020098 else
20099 ac_cpp_err=
20100 fi
20101else
20102 ac_cpp_err=yes
20103fi
20104if test -z "$ac_cpp_err"; then
20105 have_readline=yes
20106else
20107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020108sed 's/^/| /' conftest.$ac_ext >&5
20109
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020110 have_readline=no
20111fi
20112rm -f conftest.err conftest.$ac_ext
20113if test $have_readline = yes
20114then
20115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020116/* confdefs.h. */
20117_ACEOF
20118cat confdefs.h >>conftest.$ac_ext
20119cat >>conftest.$ac_ext <<_ACEOF
20120/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020121#include <readline/readline.h>
20122
20123_ACEOF
20124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000020125 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020126
20127cat >>confdefs.h <<\_ACEOF
20128#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
20129_ACEOF
20130
20131fi
20132rm -f conftest*
20133
20134fi
20135
Martin v. Löwis0daad592001-09-30 21:09:59 +000020136# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000020137echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
20138echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
20139if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
20140 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000020141else
Martin v. Löwis11437992002-04-12 09:54:03 +000020142 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020143LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020145/* confdefs.h. */
20146_ACEOF
20147cat confdefs.h >>conftest.$ac_ext
20148cat >>conftest.$ac_ext <<_ACEOF
20149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020150
Guido van Rossum353ae582001-07-10 16:45:32 +000020151/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020152#ifdef __cplusplus
20153extern "C"
20154#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000020155/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020156 builtin and then its argument prototype would still apply. */
20157char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020158int
20159main ()
20160{
20161rl_pre_input_hook ();
20162 ;
20163 return 0;
20164}
20165_ACEOF
20166rm -f conftest.$ac_objext conftest$ac_exeext
20167if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020168 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020170 grep -v '^ *+' conftest.er1 >conftest.err
20171 rm -f conftest.er1
20172 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20174 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020175 { ac_try='test -z "$ac_c_werror_flag"
20176 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20178 (eval $ac_try) 2>&5
20179 ac_status=$?
20180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20181 (exit $ac_status); }; } &&
20182 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20184 (eval $ac_try) 2>&5
20185 ac_status=$?
20186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20187 (exit $ac_status); }; }; then
20188 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000020189else
Martin v. Löwis11437992002-04-12 09:54:03 +000020190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020191sed 's/^/| /' conftest.$ac_ext >&5
20192
Martin v. Löwis11437992002-04-12 09:54:03 +000020193ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000020194fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020195rm -f conftest.err conftest.$ac_objext \
20196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020197LIBS=$ac_check_lib_save_LIBS
20198fi
20199echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
20200echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
20201if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020202
Martin v. Löwis11437992002-04-12 09:54:03 +000020203cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020204#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020205_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020206
Martin v. Löwis0daad592001-09-30 21:09:59 +000020207fi
20208
Michael W. Hudson54241132001-12-07 15:38:26 +000020209
Martin v. Löwis0daad592001-09-30 21:09:59 +000020210# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000020211echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
20212echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
20213if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
20214 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000020215else
Martin v. Löwis11437992002-04-12 09:54:03 +000020216 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020217LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020219/* confdefs.h. */
20220_ACEOF
20221cat confdefs.h >>conftest.$ac_ext
20222cat >>conftest.$ac_ext <<_ACEOF
20223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020224
Martin v. Löwis0daad592001-09-30 21:09:59 +000020225/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020226#ifdef __cplusplus
20227extern "C"
20228#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000020229/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020230 builtin and then its argument prototype would still apply. */
20231char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020232int
20233main ()
20234{
20235rl_completion_matches ();
20236 ;
20237 return 0;
20238}
20239_ACEOF
20240rm -f conftest.$ac_objext conftest$ac_exeext
20241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020242 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020244 grep -v '^ *+' conftest.er1 >conftest.err
20245 rm -f conftest.er1
20246 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20248 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020249 { ac_try='test -z "$ac_c_werror_flag"
20250 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20252 (eval $ac_try) 2>&5
20253 ac_status=$?
20254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20255 (exit $ac_status); }; } &&
20256 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20258 (eval $ac_try) 2>&5
20259 ac_status=$?
20260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20261 (exit $ac_status); }; }; then
20262 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000020263else
Martin v. Löwis11437992002-04-12 09:54:03 +000020264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020265sed 's/^/| /' conftest.$ac_ext >&5
20266
Martin v. Löwis11437992002-04-12 09:54:03 +000020267ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000020268fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020269rm -f conftest.err conftest.$ac_objext \
20270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020271LIBS=$ac_check_lib_save_LIBS
20272fi
20273echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
20274echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
20275if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020276
Martin v. Löwis11437992002-04-12 09:54:03 +000020277cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020278#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020279_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020280
Guido van Rossum353ae582001-07-10 16:45:32 +000020281fi
20282
Jack Jansendd19cf82001-12-06 22:36:17 +000020283
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020284# also in readline 4.2
20285cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020286/* confdefs.h. */
20287_ACEOF
20288cat confdefs.h >>conftest.$ac_ext
20289cat >>conftest.$ac_ext <<_ACEOF
20290/* end confdefs.h. */
20291#include <readline/readline.h>
20292_ACEOF
20293if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20294 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20295 ac_status=$?
20296 grep -v '^ *+' conftest.er1 >conftest.err
20297 rm -f conftest.er1
20298 cat conftest.err >&5
20299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20300 (exit $ac_status); } >/dev/null; then
20301 if test -s conftest.err; then
20302 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020303 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020304 else
20305 ac_cpp_err=
20306 fi
20307else
20308 ac_cpp_err=yes
20309fi
20310if test -z "$ac_cpp_err"; then
20311 have_readline=yes
20312else
20313 echo "$as_me: failed program was:" >&5
20314sed 's/^/| /' conftest.$ac_ext >&5
20315
20316 have_readline=no
20317fi
20318rm -f conftest.err conftest.$ac_ext
20319if test $have_readline = yes
20320then
20321 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020322/* confdefs.h. */
20323_ACEOF
20324cat confdefs.h >>conftest.$ac_ext
20325cat >>conftest.$ac_ext <<_ACEOF
20326/* end confdefs.h. */
20327#include <readline/readline.h>
20328
20329_ACEOF
20330if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20331 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
20332
20333cat >>confdefs.h <<\_ACEOF
20334#define HAVE_RL_CATCH_SIGNAL 1
20335_ACEOF
20336
20337fi
20338rm -f conftest*
20339
20340fi
20341
Martin v. Löwis11437992002-04-12 09:54:03 +000020342echo "$as_me:$LINENO: checking for broken nice()" >&5
20343echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
20344if test "${ac_cv_broken_nice+set}" = set; then
20345 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020346else
Martin v. Löwis11437992002-04-12 09:54:03 +000020347
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020348if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020349 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020350else
Martin v. Löwis11437992002-04-12 09:54:03 +000020351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020352/* confdefs.h. */
20353_ACEOF
20354cat confdefs.h >>conftest.$ac_ext
20355cat >>conftest.$ac_ext <<_ACEOF
20356/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020357
20358int main()
20359{
20360 int val1 = nice(1);
20361 if (val1 != -1 && val1 == nice(2))
20362 exit(0);
20363 exit(1);
20364}
20365
Martin v. Löwis11437992002-04-12 09:54:03 +000020366_ACEOF
20367rm -f conftest$ac_exeext
20368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20369 (eval $ac_link) 2>&5
20370 ac_status=$?
20371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20372 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20374 (eval $ac_try) 2>&5
20375 ac_status=$?
20376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20377 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020378 ac_cv_broken_nice=yes
20379else
Martin v. Löwis11437992002-04-12 09:54:03 +000020380 echo "$as_me: program exited with status $ac_status" >&5
20381echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020382sed 's/^/| /' conftest.$ac_ext >&5
20383
Martin v. Löwis11437992002-04-12 09:54:03 +000020384( exit $ac_status )
20385ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020386fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020387rm -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 +000020388fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020389fi
20390
Martin v. Löwis11437992002-04-12 09:54:03 +000020391echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
20392echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020393if test "$ac_cv_broken_nice" = yes
20394then
Martin v. Löwis11437992002-04-12 09:54:03 +000020395
20396cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020397#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020398_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020399
20400fi
20401
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020402echo "$as_me:$LINENO: checking for broken poll()" >&5
20403echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
20404if test "$cross_compiling" = yes; then
20405 ac_cv_broken_poll=no
20406else
20407 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020408/* confdefs.h. */
20409_ACEOF
20410cat confdefs.h >>conftest.$ac_ext
20411cat >>conftest.$ac_ext <<_ACEOF
20412/* end confdefs.h. */
20413
20414#include <poll.h>
20415
20416int main (void)
20417 {
20418 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
20419
20420 close (42);
20421
20422 int poll_test = poll (&poll_struct, 1, 0);
20423
20424 if (poll_test < 0)
20425 {
20426 exit(0);
20427 }
20428 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
20429 {
20430 exit(0);
20431 }
20432 else
20433 {
20434 exit(1);
20435 }
20436 }
20437
20438_ACEOF
20439rm -f conftest$ac_exeext
20440if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20441 (eval $ac_link) 2>&5
20442 ac_status=$?
20443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20444 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20446 (eval $ac_try) 2>&5
20447 ac_status=$?
20448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20449 (exit $ac_status); }; }; then
20450 ac_cv_broken_poll=yes
20451else
20452 echo "$as_me: program exited with status $ac_status" >&5
20453echo "$as_me: failed program was:" >&5
20454sed 's/^/| /' conftest.$ac_ext >&5
20455
20456( exit $ac_status )
20457ac_cv_broken_poll=no
20458fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020459rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020460fi
20461echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
20462echo "${ECHO_T}$ac_cv_broken_poll" >&6
20463if test "$ac_cv_broken_poll" = yes
20464then
20465
20466cat >>confdefs.h <<\_ACEOF
20467#define HAVE_BROKEN_POLL 1
20468_ACEOF
20469
20470fi
20471
Brett Cannon43802422005-02-10 20:48:03 +000020472# 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 +000020473# (which is not required by ISO C or UNIX spec) and/or if we support
20474# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000020475echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20476echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20477if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20478 echo $ECHO_N "(cached) $ECHO_C" >&6
20479else
20480 cat >conftest.$ac_ext <<_ACEOF
20481/* confdefs.h. */
20482_ACEOF
20483cat confdefs.h >>conftest.$ac_ext
20484cat >>conftest.$ac_ext <<_ACEOF
20485/* end confdefs.h. */
20486#include <sys/types.h>
20487#include <$ac_cv_struct_tm>
20488
20489
20490int
20491main ()
20492{
20493static struct tm ac_aggr;
20494if (ac_aggr.tm_zone)
20495return 0;
20496 ;
20497 return 0;
20498}
20499_ACEOF
20500rm -f conftest.$ac_objext
20501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20502 (eval $ac_compile) 2>conftest.er1
20503 ac_status=$?
20504 grep -v '^ *+' conftest.er1 >conftest.err
20505 rm -f conftest.er1
20506 cat conftest.err >&5
20507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20508 (exit $ac_status); } &&
20509 { ac_try='test -z "$ac_c_werror_flag"
20510 || test ! -s conftest.err'
20511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20512 (eval $ac_try) 2>&5
20513 ac_status=$?
20514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20515 (exit $ac_status); }; } &&
20516 { ac_try='test -s conftest.$ac_objext'
20517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20518 (eval $ac_try) 2>&5
20519 ac_status=$?
20520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20521 (exit $ac_status); }; }; then
20522 ac_cv_member_struct_tm_tm_zone=yes
20523else
20524 echo "$as_me: failed program was:" >&5
20525sed 's/^/| /' conftest.$ac_ext >&5
20526
20527cat >conftest.$ac_ext <<_ACEOF
20528/* confdefs.h. */
20529_ACEOF
20530cat confdefs.h >>conftest.$ac_ext
20531cat >>conftest.$ac_ext <<_ACEOF
20532/* end confdefs.h. */
20533#include <sys/types.h>
20534#include <$ac_cv_struct_tm>
20535
20536
20537int
20538main ()
20539{
20540static struct tm ac_aggr;
20541if (sizeof ac_aggr.tm_zone)
20542return 0;
20543 ;
20544 return 0;
20545}
20546_ACEOF
20547rm -f conftest.$ac_objext
20548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20549 (eval $ac_compile) 2>conftest.er1
20550 ac_status=$?
20551 grep -v '^ *+' conftest.er1 >conftest.err
20552 rm -f conftest.er1
20553 cat conftest.err >&5
20554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20555 (exit $ac_status); } &&
20556 { ac_try='test -z "$ac_c_werror_flag"
20557 || test ! -s conftest.err'
20558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20559 (eval $ac_try) 2>&5
20560 ac_status=$?
20561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20562 (exit $ac_status); }; } &&
20563 { ac_try='test -s conftest.$ac_objext'
20564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20565 (eval $ac_try) 2>&5
20566 ac_status=$?
20567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20568 (exit $ac_status); }; }; then
20569 ac_cv_member_struct_tm_tm_zone=yes
20570else
20571 echo "$as_me: failed program was:" >&5
20572sed 's/^/| /' conftest.$ac_ext >&5
20573
20574ac_cv_member_struct_tm_tm_zone=no
20575fi
20576rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20577fi
20578rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20579fi
20580echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20581echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20582if test $ac_cv_member_struct_tm_tm_zone = yes; then
20583
20584cat >>confdefs.h <<_ACEOF
20585#define HAVE_STRUCT_TM_TM_ZONE 1
20586_ACEOF
20587
20588
20589fi
20590
20591if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20592
20593cat >>confdefs.h <<\_ACEOF
20594#define HAVE_TM_ZONE 1
20595_ACEOF
20596
20597else
20598 echo "$as_me:$LINENO: checking for tzname" >&5
20599echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20600if test "${ac_cv_var_tzname+set}" = set; then
20601 echo $ECHO_N "(cached) $ECHO_C" >&6
20602else
20603 cat >conftest.$ac_ext <<_ACEOF
20604/* confdefs.h. */
20605_ACEOF
20606cat confdefs.h >>conftest.$ac_ext
20607cat >>conftest.$ac_ext <<_ACEOF
20608/* end confdefs.h. */
20609#include <time.h>
20610#ifndef tzname /* For SGI. */
20611extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20612#endif
20613
20614int
20615main ()
20616{
20617atoi(*tzname);
20618 ;
20619 return 0;
20620}
20621_ACEOF
20622rm -f conftest.$ac_objext conftest$ac_exeext
20623if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20624 (eval $ac_link) 2>conftest.er1
20625 ac_status=$?
20626 grep -v '^ *+' conftest.er1 >conftest.err
20627 rm -f conftest.er1
20628 cat conftest.err >&5
20629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20630 (exit $ac_status); } &&
20631 { ac_try='test -z "$ac_c_werror_flag"
20632 || test ! -s conftest.err'
20633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20634 (eval $ac_try) 2>&5
20635 ac_status=$?
20636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20637 (exit $ac_status); }; } &&
20638 { ac_try='test -s conftest$ac_exeext'
20639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20640 (eval $ac_try) 2>&5
20641 ac_status=$?
20642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20643 (exit $ac_status); }; }; then
20644 ac_cv_var_tzname=yes
20645else
20646 echo "$as_me: failed program was:" >&5
20647sed 's/^/| /' conftest.$ac_ext >&5
20648
20649ac_cv_var_tzname=no
20650fi
20651rm -f conftest.err conftest.$ac_objext \
20652 conftest$ac_exeext conftest.$ac_ext
20653fi
20654echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20655echo "${ECHO_T}$ac_cv_var_tzname" >&6
20656 if test $ac_cv_var_tzname = yes; then
20657
20658cat >>confdefs.h <<\_ACEOF
20659#define HAVE_TZNAME 1
20660_ACEOF
20661
20662 fi
20663fi
20664
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020665
Martin v. Löwis1d459062005-03-14 21:23:33 +000020666# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020667echo "$as_me:$LINENO: checking for working tzset()" >&5
20668echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
20669if test "${ac_cv_working_tzset+set}" = set; then
20670 echo $ECHO_N "(cached) $ECHO_C" >&6
20671else
20672
20673if test "$cross_compiling" = yes; then
20674 ac_cv_working_tzset=no
20675else
20676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020677/* confdefs.h. */
20678_ACEOF
20679cat confdefs.h >>conftest.$ac_ext
20680cat >>conftest.$ac_ext <<_ACEOF
20681/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020682
20683#include <stdlib.h>
20684#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000020685#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000020686
20687#if HAVE_TZNAME
20688extern char *tzname[];
20689#endif
20690
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020691int main()
20692{
Brett Cannon18367812003-09-19 00:59:16 +000020693 /* Note that we need to ensure that not only does tzset(3)
20694 do 'something' with localtime, but it works as documented
20695 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000020696 This includes making sure that tzname is set properly if
20697 tm->tm_zone does not exist since it is the alternative way
20698 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000020699
20700 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000020701 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000020702 */
20703
Martin v. Löwis1d459062005-03-14 21:23:33 +000020704 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000020705 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
20706
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020707 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020708 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020709 if (localtime(&groundhogday)->tm_hour != 0)
20710 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020711#if HAVE_TZNAME
20712 /* For UTC, tzname[1] is sometimes "", sometimes " " */
20713 if (strcmp(tzname[0], "UTC") ||
20714 (tzname[1][0] != 0 && tzname[1][0] != ' '))
20715 exit(1);
20716#endif
Brett Cannon18367812003-09-19 00:59:16 +000020717
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020718 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020719 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020720 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020721 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020722#if HAVE_TZNAME
20723 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
20724 exit(1);
20725#endif
Brett Cannon18367812003-09-19 00:59:16 +000020726
20727 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
20728 tzset();
20729 if (localtime(&groundhogday)->tm_hour != 11)
20730 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020731#if HAVE_TZNAME
20732 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
20733 exit(1);
20734#endif
20735
20736#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000020737 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
20738 exit(1);
20739 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
20740 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020741#endif
Brett Cannon18367812003-09-19 00:59:16 +000020742
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020743 exit(0);
20744}
20745
20746_ACEOF
20747rm -f conftest$ac_exeext
20748if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20749 (eval $ac_link) 2>&5
20750 ac_status=$?
20751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20752 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20754 (eval $ac_try) 2>&5
20755 ac_status=$?
20756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20757 (exit $ac_status); }; }; then
20758 ac_cv_working_tzset=yes
20759else
20760 echo "$as_me: program exited with status $ac_status" >&5
20761echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020762sed 's/^/| /' conftest.$ac_ext >&5
20763
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020764( exit $ac_status )
20765ac_cv_working_tzset=no
20766fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020767rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020768fi
20769fi
20770
20771echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
20772echo "${ECHO_T}$ac_cv_working_tzset" >&6
20773if test "$ac_cv_working_tzset" = yes
20774then
20775
20776cat >>confdefs.h <<\_ACEOF
20777#define HAVE_WORKING_TZSET 1
20778_ACEOF
20779
20780fi
20781
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020782# Look for subsecond timestamps in struct stat
20783echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
20784echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
20785if test "${ac_cv_stat_tv_nsec+set}" = set; then
20786 echo $ECHO_N "(cached) $ECHO_C" >&6
20787else
20788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020789/* confdefs.h. */
20790_ACEOF
20791cat confdefs.h >>conftest.$ac_ext
20792cat >>conftest.$ac_ext <<_ACEOF
20793/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020794#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020795int
20796main ()
20797{
20798
20799struct stat st;
20800st.st_mtim.tv_nsec = 1;
20801
20802 ;
20803 return 0;
20804}
20805_ACEOF
20806rm -f conftest.$ac_objext
20807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020808 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020810 grep -v '^ *+' conftest.er1 >conftest.err
20811 rm -f conftest.er1
20812 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20814 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020815 { ac_try='test -z "$ac_c_werror_flag"
20816 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20818 (eval $ac_try) 2>&5
20819 ac_status=$?
20820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20821 (exit $ac_status); }; } &&
20822 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20824 (eval $ac_try) 2>&5
20825 ac_status=$?
20826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20827 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000020828 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020829else
20830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020831sed 's/^/| /' conftest.$ac_ext >&5
20832
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020833ac_cv_stat_tv_nsec=no
20834fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020836fi
20837
20838echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
20839echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
20840if test "$ac_cv_stat_tv_nsec" = yes
20841then
20842
20843cat >>confdefs.h <<\_ACEOF
20844#define HAVE_STAT_TV_NSEC 1
20845_ACEOF
20846
20847fi
20848
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020849# Look for BSD style subsecond timestamps in struct stat
20850echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
20851echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
20852if test "${ac_cv_stat_tv_nsec2+set}" = set; then
20853 echo $ECHO_N "(cached) $ECHO_C" >&6
20854else
20855 cat >conftest.$ac_ext <<_ACEOF
20856/* confdefs.h. */
20857_ACEOF
20858cat confdefs.h >>conftest.$ac_ext
20859cat >>conftest.$ac_ext <<_ACEOF
20860/* end confdefs.h. */
20861#include <sys/stat.h>
20862int
20863main ()
20864{
20865
20866struct stat st;
20867st.st_mtimespec.tv_nsec = 1;
20868
20869 ;
20870 return 0;
20871}
20872_ACEOF
20873rm -f conftest.$ac_objext
20874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20875 (eval $ac_compile) 2>conftest.er1
20876 ac_status=$?
20877 grep -v '^ *+' conftest.er1 >conftest.err
20878 rm -f conftest.er1
20879 cat conftest.err >&5
20880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20881 (exit $ac_status); } &&
20882 { ac_try='test -z "$ac_c_werror_flag"
20883 || test ! -s conftest.err'
20884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20885 (eval $ac_try) 2>&5
20886 ac_status=$?
20887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20888 (exit $ac_status); }; } &&
20889 { ac_try='test -s conftest.$ac_objext'
20890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20891 (eval $ac_try) 2>&5
20892 ac_status=$?
20893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20894 (exit $ac_status); }; }; then
20895 ac_cv_stat_tv_nsec2=yes
20896else
20897 echo "$as_me: failed program was:" >&5
20898sed 's/^/| /' conftest.$ac_ext >&5
20899
20900ac_cv_stat_tv_nsec2=no
20901fi
20902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20903fi
20904
20905echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
20906echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
20907if test "$ac_cv_stat_tv_nsec2" = yes
20908then
20909
20910cat >>confdefs.h <<\_ACEOF
20911#define HAVE_STAT_TV_NSEC2 1
20912_ACEOF
20913
20914fi
20915
Jack Jansen666b1e72001-10-31 12:11:48 +000020916# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000020917echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
20918echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
20919if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
20920 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020921else
Martin v. Löwis11437992002-04-12 09:54:03 +000020922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020923/* confdefs.h. */
20924_ACEOF
20925cat confdefs.h >>conftest.$ac_ext
20926cat >>conftest.$ac_ext <<_ACEOF
20927/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020928#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020929int
20930main ()
20931{
Jack Jansen666b1e72001-10-31 12:11:48 +000020932
20933 int rtn;
20934 rtn = mvwdelch(0,0,0);
20935
Martin v. Löwis11437992002-04-12 09:54:03 +000020936 ;
20937 return 0;
20938}
20939_ACEOF
20940rm -f conftest.$ac_objext
20941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020942 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020944 grep -v '^ *+' conftest.er1 >conftest.err
20945 rm -f conftest.er1
20946 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20948 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020949 { ac_try='test -z "$ac_c_werror_flag"
20950 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20952 (eval $ac_try) 2>&5
20953 ac_status=$?
20954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20955 (exit $ac_status); }; } &&
20956 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20958 (eval $ac_try) 2>&5
20959 ac_status=$?
20960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20961 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020962 ac_cv_mvwdelch_is_expression=yes
20963else
Martin v. Löwis11437992002-04-12 09:54:03 +000020964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020965sed 's/^/| /' conftest.$ac_ext >&5
20966
Martin v. Löwis11437992002-04-12 09:54:03 +000020967ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020968fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020970fi
20971
Martin v. Löwis11437992002-04-12 09:54:03 +000020972echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
20973echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020974
20975if test "$ac_cv_mvwdelch_is_expression" = yes
20976then
Martin v. Löwis11437992002-04-12 09:54:03 +000020977
20978cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020979#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020980_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020981
20982fi
20983
Martin v. Löwis11437992002-04-12 09:54:03 +000020984echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
20985echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
20986if test "${ac_cv_window_has_flags+set}" = set; then
20987 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020988else
Martin v. Löwis11437992002-04-12 09:54:03 +000020989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020990/* confdefs.h. */
20991_ACEOF
20992cat confdefs.h >>conftest.$ac_ext
20993cat >>conftest.$ac_ext <<_ACEOF
20994/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020995#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020996int
20997main ()
20998{
Jack Jansen666b1e72001-10-31 12:11:48 +000020999
21000 WINDOW *w;
21001 w->_flags = 0;
21002
Martin v. Löwis11437992002-04-12 09:54:03 +000021003 ;
21004 return 0;
21005}
21006_ACEOF
21007rm -f conftest.$ac_objext
21008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021009 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021011 grep -v '^ *+' conftest.er1 >conftest.err
21012 rm -f conftest.er1
21013 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21015 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021016 { ac_try='test -z "$ac_c_werror_flag"
21017 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21019 (eval $ac_try) 2>&5
21020 ac_status=$?
21021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21022 (exit $ac_status); }; } &&
21023 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21025 (eval $ac_try) 2>&5
21026 ac_status=$?
21027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21028 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021029 ac_cv_window_has_flags=yes
21030else
Martin v. Löwis11437992002-04-12 09:54:03 +000021031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021032sed 's/^/| /' conftest.$ac_ext >&5
21033
Martin v. Löwis11437992002-04-12 09:54:03 +000021034ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021035fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021036rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021037fi
21038
Martin v. Löwis11437992002-04-12 09:54:03 +000021039echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
21040echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021041
Jack Jansen666b1e72001-10-31 12:11:48 +000021042
21043if test "$ac_cv_window_has_flags" = yes
21044then
Martin v. Löwis11437992002-04-12 09:54:03 +000021045
21046cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021047#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021048_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021049
21050fi
21051
Martin v. Löwis24a880b2002-12-31 12:55:15 +000021052echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
21053echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
21054
21055if test -e /dev/ptmx
21056then
21057 echo "$as_me:$LINENO: result: yes" >&5
21058echo "${ECHO_T}yes" >&6
21059
21060cat >>confdefs.h <<\_ACEOF
21061#define HAVE_DEV_PTMX 1
21062_ACEOF
21063
21064else
21065 echo "$as_me:$LINENO: result: no" >&5
21066echo "${ECHO_T}no" >&6
21067fi
21068
Neal Norwitz865400f2003-03-21 01:42:58 +000021069echo "$as_me:$LINENO: checking for /dev/ptc" >&5
21070echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
21071
21072if test -e /dev/ptc
21073then
21074 echo "$as_me:$LINENO: result: yes" >&5
21075echo "${ECHO_T}yes" >&6
21076
21077cat >>confdefs.h <<\_ACEOF
21078#define HAVE_DEV_PTC 1
21079_ACEOF
21080
21081else
21082 echo "$as_me:$LINENO: result: no" >&5
21083echo "${ECHO_T}no" >&6
21084fi
21085
Martin v. Löwis11437992002-04-12 09:54:03 +000021086echo "$as_me:$LINENO: checking for socklen_t" >&5
21087echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
21088if test "${ac_cv_type_socklen_t+set}" = set; then
21089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000021090else
Martin v. Löwis11437992002-04-12 09:54:03 +000021091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021092/* confdefs.h. */
21093_ACEOF
21094cat confdefs.h >>conftest.$ac_ext
21095cat >>conftest.$ac_ext <<_ACEOF
21096/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000021097
21098#ifdef HAVE_SYS_TYPES_H
21099#include <sys/types.h>
21100#endif
21101#ifdef HAVE_SYS_SOCKET_H
21102#include <sys/socket.h>
21103#endif
21104
21105
Martin v. Löwis11437992002-04-12 09:54:03 +000021106int
21107main ()
21108{
21109if ((socklen_t *) 0)
21110 return 0;
21111if (sizeof (socklen_t))
21112 return 0;
21113 ;
21114 return 0;
21115}
21116_ACEOF
21117rm -f conftest.$ac_objext
21118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021119 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021121 grep -v '^ *+' conftest.er1 >conftest.err
21122 rm -f conftest.er1
21123 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21125 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021126 { ac_try='test -z "$ac_c_werror_flag"
21127 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21129 (eval $ac_try) 2>&5
21130 ac_status=$?
21131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21132 (exit $ac_status); }; } &&
21133 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21135 (eval $ac_try) 2>&5
21136 ac_status=$?
21137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21138 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000021139 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000021140else
Martin v. Löwis11437992002-04-12 09:54:03 +000021141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021142sed 's/^/| /' conftest.$ac_ext >&5
21143
Martin v. Löwis11437992002-04-12 09:54:03 +000021144ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000021145fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021146rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021147fi
21148echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
21149echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
21150if test $ac_cv_type_socklen_t = yes; then
21151 :
21152else
Guido van Rossum95713eb2000-05-18 20:53:31 +000021153
Martin v. Löwis01c04012002-11-11 14:58:44 +000021154cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021155#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000021156_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021157
21158fi
21159
Michael W. Hudson54241132001-12-07 15:38:26 +000021160
Michael W. Hudson54241132001-12-07 15:38:26 +000021161
21162
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000021163for h in `(cd $srcdir;echo Python/thread_*.h)`
21164do
21165 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
21166done
21167
Michael W. Hudson54241132001-12-07 15:38:26 +000021168
Neal Norwitzd24499d2005-12-18 21:36:39 +000021169SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwis11437992002-04-12 09:54:03 +000021170echo "$as_me:$LINENO: checking for build directories" >&5
21171echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021172for dir in $SRCDIRS; do
21173 if test ! -d $dir; then
21174 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000021175 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021176done
Martin v. Löwis11437992002-04-12 09:54:03 +000021177echo "$as_me:$LINENO: result: done" >&5
21178echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000021179
Guido van Rossum627b2d71993-12-24 10:39:16 +000021180# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000021181 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000021182
Martin v. Löwis11437992002-04-12 09:54:03 +000021183cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021184# This file is a shell script that caches the results of configure
21185# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000021186# scripts and configure runs, see configure's option --config-cache.
21187# It is not useful on other systems. If it contains results you don't
21188# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021189#
Martin v. Löwis11437992002-04-12 09:54:03 +000021190# config.status only pays attention to the cache file if you give it
21191# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021192#
Skip Montanaro6dead952003-09-25 14:50:04 +000021193# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000021194# loading this file, other *unset* `ac_cv_foo' will be assigned the
21195# following values.
21196
21197_ACEOF
21198
Guido van Rossumf78abae1997-01-21 22:02:36 +000021199# The following way of writing the cache mishandles newlines in values,
21200# but we know of no workaround that is simple, portable, and efficient.
21201# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021202# Ultrix sh set writes to stderr and can't be redirected directly,
21203# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000021204{
21205 (set) 2>&1 |
21206 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21207 *ac_space=\ *)
21208 # `set' does not quote correctly, so add quotes (double-quote
21209 # substitution turns \\\\ into \\, and sed turns \\ into \).
21210 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021211 "s/'/'\\\\''/g;
21212 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021213 ;;
21214 *)
21215 # `set' quotes correctly as required by POSIX, so do not add quotes.
21216 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021217 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021218 ;;
21219 esac;
21220} |
21221 sed '
21222 t clear
21223 : clear
21224 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21225 t end
21226 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21227 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000021228if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021229 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21231 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021232 else
21233 echo "not updating unwritable cache $cache_file"
21234 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021235fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021236rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000021237
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021238test "x$prefix" = xNONE && prefix=$ac_default_prefix
21239# Let make expand exec_prefix.
21240test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000021241
Martin v. Löwis11437992002-04-12 09:54:03 +000021242# VPATH may cause trouble with some makes, so we remove $(srcdir),
21243# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21244# trailing colons and then remove the whole line if VPATH becomes empty
21245# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000021246if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021247 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000021248s/:*\$(srcdir):*/:/;
21249s/:*\${srcdir}:*/:/;
21250s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021251s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000021252s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021253s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000021254}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021255fi
21256
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021257DEFS=-DHAVE_CONFIG_H
21258
Skip Montanaro6dead952003-09-25 14:50:04 +000021259ac_libobjs=
21260ac_ltlibobjs=
21261for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21262 # 1. Remove the extension, and $U if already installed.
21263 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021264 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021265 # 2. Add them.
21266 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21267 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21268done
21269LIBOBJS=$ac_libobjs
21270
21271LTLIBOBJS=$ac_ltlibobjs
21272
21273
Martin v. Löwis11437992002-04-12 09:54:03 +000021274
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021275: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000021276ac_clean_files_save=$ac_clean_files
21277ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21278{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21279echo "$as_me: creating $CONFIG_STATUS" >&6;}
21280cat >$CONFIG_STATUS <<_ACEOF
21281#! $SHELL
21282# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021283# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021284# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000021285# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021286
Martin v. Löwis11437992002-04-12 09:54:03 +000021287debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000021288ac_cs_recheck=false
21289ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021290SHELL=\${CONFIG_SHELL-$SHELL}
21291_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000021292
Martin v. Löwis11437992002-04-12 09:54:03 +000021293cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021294## --------------------- ##
21295## M4sh Initialization. ##
21296## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000021297
Martin v. Löwis11437992002-04-12 09:54:03 +000021298# Be Bourne compatible
21299if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21300 emulate sh
21301 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021302 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21303 # is contrary to our usage. Disable this feature.
21304 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021305elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21306 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000021307fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021308DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000021309
Martin v. Löwis11437992002-04-12 09:54:03 +000021310# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021311if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 as_unset=unset
21313else
21314 as_unset=false
21315fi
Michael W. Hudson54241132001-12-07 15:38:26 +000021316
Skip Montanaro6dead952003-09-25 14:50:04 +000021317
21318# Work around bugs in pre-3.0 UWIN ksh.
21319$as_unset ENV MAIL MAILPATH
21320PS1='$ '
21321PS2='> '
21322PS4='+ '
21323
21324# NLS nuisances.
21325for as_var in \
21326 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21327 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21328 LC_TELEPHONE LC_TIME
21329do
Skip Montanarof0d5f792004-08-15 14:08:23 +000021330 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000021331 eval $as_var=C; export $as_var
21332 else
21333 $as_unset $as_var
21334 fi
21335done
21336
21337# Required to use basename.
21338if expr a : '\(a\)' >/dev/null 2>&1; then
21339 as_expr=expr
21340else
21341 as_expr=false
21342fi
21343
21344if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
21345 as_basename=basename
21346else
21347 as_basename=false
21348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021349
21350
21351# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000021352as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021353$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21354 X"$0" : 'X\(//\)$' \| \
21355 X"$0" : 'X\(/\)$' \| \
21356 . : '\(.\)' 2>/dev/null ||
21357echo X/"$0" |
21358 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21359 /^X\/\(\/\/\)$/{ s//\1/; q; }
21360 /^X\/\(\/\).*/{ s//\1/; q; }
21361 s/.*/./; q'`
21362
Skip Montanaro6dead952003-09-25 14:50:04 +000021363
Martin v. Löwis11437992002-04-12 09:54:03 +000021364# PATH needs CR, and LINENO needs CR and PATH.
21365# Avoid depending upon Character Ranges.
21366as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21367as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21368as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21369as_cr_digits='0123456789'
21370as_cr_alnum=$as_cr_Letters$as_cr_digits
21371
21372# The user is always right.
21373if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021374 echo "#! /bin/sh" >conf$$.sh
21375 echo "exit 0" >>conf$$.sh
21376 chmod +x conf$$.sh
21377 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021378 PATH_SEPARATOR=';'
21379 else
21380 PATH_SEPARATOR=:
21381 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021382 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000021383fi
21384
21385
21386 as_lineno_1=$LINENO
21387 as_lineno_2=$LINENO
21388 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21389 test "x$as_lineno_1" != "x$as_lineno_2" &&
21390 test "x$as_lineno_3" = "x$as_lineno_2" || {
21391 # Find who we are. Look in the path if we contain no path at all
21392 # relative or not.
21393 case $0 in
21394 *[\\/]* ) as_myself=$0 ;;
21395 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21396for as_dir in $PATH
21397do
21398 IFS=$as_save_IFS
21399 test -z "$as_dir" && as_dir=.
21400 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21401done
21402
21403 ;;
21404 esac
21405 # We did not find ourselves, most probably we were run as `sh COMMAND'
21406 # in which case we are not to be found in the path.
21407 if test "x$as_myself" = x; then
21408 as_myself=$0
21409 fi
21410 if test ! -f "$as_myself"; then
21411 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21412echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21413 { (exit 1); exit 1; }; }
21414 fi
21415 case $CONFIG_SHELL in
21416 '')
21417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21418for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21419do
21420 IFS=$as_save_IFS
21421 test -z "$as_dir" && as_dir=.
21422 for as_base in sh bash ksh sh5; do
21423 case $as_dir in
21424 /*)
21425 if ("$as_dir/$as_base" -c '
21426 as_lineno_1=$LINENO
21427 as_lineno_2=$LINENO
21428 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21429 test "x$as_lineno_1" != "x$as_lineno_2" &&
21430 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021431 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21432 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021433 CONFIG_SHELL=$as_dir/$as_base
21434 export CONFIG_SHELL
21435 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21436 fi;;
21437 esac
21438 done
21439done
21440;;
Jack Jansendd19cf82001-12-06 22:36:17 +000021441 esac
21442
Martin v. Löwis11437992002-04-12 09:54:03 +000021443 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21444 # uniformly replaced by the line number. The first 'sed' inserts a
21445 # line-number line before each line; the second 'sed' does the real
21446 # work. The second script uses 'N' to pair each line-number line
21447 # with the numbered line, and appends trailing '-' during
21448 # substitution so that $LINENO is not a special case at line end.
21449 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21450 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21451 sed '=' <$as_myself |
21452 sed '
21453 N
21454 s,$,-,
21455 : loop
21456 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
21457 t loop
21458 s,-$,,
21459 s,^['$as_cr_digits']*\n,,
21460 ' >$as_me.lineno &&
21461 chmod +x $as_me.lineno ||
21462 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21463echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
21464 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021465
Martin v. Löwis11437992002-04-12 09:54:03 +000021466 # Don't try to exec as it changes $[0], causing all sort of problems
21467 # (the dirname of $[0] is not the place where we might find the
21468 # original and so on. Autoconf is especially sensible to this).
21469 . ./$as_me.lineno
21470 # Exit status is that of the last command.
21471 exit
21472}
21473
21474
21475case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21476 *c*,-n*) ECHO_N= ECHO_C='
21477' ECHO_T=' ' ;;
21478 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21479 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
21480esac
21481
21482if expr a : '\(a\)' >/dev/null 2>&1; then
21483 as_expr=expr
21484else
21485 as_expr=false
21486fi
21487
21488rm -f conf$$ conf$$.exe conf$$.file
21489echo >conf$$.file
21490if ln -s conf$$.file conf$$ 2>/dev/null; then
21491 # We could just check for DJGPP; but this test a) works b) is more generic
21492 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21493 if test -f conf$$.exe; then
21494 # Don't use ln at all; we don't have any links
21495 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021496 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021497 as_ln_s='ln -s'
21498 fi
21499elif ln conf$$.file conf$$ 2>/dev/null; then
21500 as_ln_s=ln
21501else
21502 as_ln_s='cp -p'
21503fi
21504rm -f conf$$ conf$$.exe conf$$.file
21505
Skip Montanaro6dead952003-09-25 14:50:04 +000021506if mkdir -p . 2>/dev/null; then
21507 as_mkdir_p=:
21508else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021509 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000021510 as_mkdir_p=false
21511fi
21512
Martin v. Löwis11437992002-04-12 09:54:03 +000021513as_executable_p="test -f"
21514
21515# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021516as_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 +000021517
21518# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021519as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000021520
21521
21522# IFS
21523# We need space, tab and new line, in precisely that order.
21524as_nl='
21525'
21526IFS=" $as_nl"
21527
21528# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000021529$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000021530
21531exec 6>&1
21532
21533# Open the log real soon, to keep \$[0] and so on meaningful, and to
21534# report actual input values of CONFIG_FILES etc. instead of their
21535# values after options handling. Logging --version etc. is OK.
21536exec 5>>config.log
21537{
21538 echo
21539 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21540## Running $as_me. ##
21541_ASBOX
21542} >&5
21543cat >&5 <<_CSEOF
21544
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000021545This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000021546generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000021547
21548 CONFIG_FILES = $CONFIG_FILES
21549 CONFIG_HEADERS = $CONFIG_HEADERS
21550 CONFIG_LINKS = $CONFIG_LINKS
21551 CONFIG_COMMANDS = $CONFIG_COMMANDS
21552 $ $0 $@
21553
21554_CSEOF
21555echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21556echo >&5
21557_ACEOF
21558
21559# Files that config.status was made for.
21560if test -n "$ac_config_files"; then
21561 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21562fi
21563
21564if test -n "$ac_config_headers"; then
21565 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21566fi
21567
21568if test -n "$ac_config_links"; then
21569 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21570fi
21571
21572if test -n "$ac_config_commands"; then
21573 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21574fi
21575
21576cat >>$CONFIG_STATUS <<\_ACEOF
21577
21578ac_cs_usage="\
21579\`$as_me' instantiates files from templates according to the
21580current configuration.
21581
21582Usage: $0 [OPTIONS] [FILE]...
21583
21584 -h, --help print this help, then exit
21585 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000021586 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000021587 -d, --debug don't remove temporary files
21588 --recheck update $as_me by reconfiguring in the same conditions
21589 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021590 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021591 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021592 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021593
21594Configuration files:
21595$config_files
21596
21597Configuration headers:
21598$config_headers
21599
21600Report bugs to <bug-autoconf@gnu.org>."
21601_ACEOF
21602
21603cat >>$CONFIG_STATUS <<_ACEOF
21604ac_cs_version="\\
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000021605python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021606configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000021607 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21608
Skip Montanarof0d5f792004-08-15 14:08:23 +000021609Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000021610This config.status script is free software; the Free Software Foundation
21611gives unlimited permission to copy, distribute and modify it."
21612srcdir=$srcdir
21613INSTALL="$INSTALL"
21614_ACEOF
21615
21616cat >>$CONFIG_STATUS <<\_ACEOF
21617# If no file are specified by the user, then we need to provide default
21618# value. By we need to know if files were specified by the user.
21619ac_need_defaults=:
21620while test $# != 0
21621do
21622 case $1 in
21623 --*=*)
21624 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21625 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021626 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000021627 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021628 -*)
21629 ac_option=$1
21630 ac_optarg=$2
21631 ac_shift=shift
21632 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021633 *) # This is not an option, so the user has probably given explicit
21634 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000021635 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000021636 ac_need_defaults=false;;
21637 esac
21638
Skip Montanaro6dead952003-09-25 14:50:04 +000021639 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000021640 # Handling of the options.
21641_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021642cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021643 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21644 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021645 --version | --vers* | -V )
21646 echo "$ac_cs_version"; exit 0 ;;
21647 --he | --h)
21648 # Conflict between --help and --header
21649 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21650Try \`$0 --help' for more information." >&5
21651echo "$as_me: error: ambiguous option: $1
21652Try \`$0 --help' for more information." >&2;}
21653 { (exit 1); exit 1; }; };;
21654 --help | --hel | -h )
21655 echo "$ac_cs_usage"; exit 0 ;;
21656 --debug | --d* | -d )
21657 debug=: ;;
21658 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000021659 $ac_shift
21660 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 ac_need_defaults=false;;
21662 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000021663 $ac_shift
21664 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021665 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021666 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21667 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21668 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021669
21670 # This is an error.
21671 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21672Try \`$0 --help' for more information." >&5
21673echo "$as_me: error: unrecognized option: $1
21674Try \`$0 --help' for more information." >&2;}
21675 { (exit 1); exit 1; }; } ;;
21676
21677 *) ac_config_targets="$ac_config_targets $1" ;;
21678
21679 esac
21680 shift
21681done
21682
Skip Montanaro6dead952003-09-25 14:50:04 +000021683ac_configure_extra_args=
21684
21685if $ac_cs_silent; then
21686 exec 6>/dev/null
21687 ac_configure_extra_args="$ac_configure_extra_args --silent"
21688fi
21689
21690_ACEOF
21691cat >>$CONFIG_STATUS <<_ACEOF
21692if \$ac_cs_recheck; then
21693 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21694 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21695fi
21696
Martin v. Löwis11437992002-04-12 09:54:03 +000021697_ACEOF
21698
21699
21700
21701
21702
21703cat >>$CONFIG_STATUS <<\_ACEOF
21704for ac_config_target in $ac_config_targets
21705do
21706 case "$ac_config_target" in
21707 # Handling of arguments.
21708 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
21709 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
21710 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
21711 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21712echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21713 { (exit 1); exit 1; }; };;
21714 esac
21715done
21716
21717# If the user did not use the arguments to specify the items to instantiate,
21718# then the envvar interface is used. Set only those that are not.
21719# We use the long form for the default assignment because of an extremely
21720# bizarre bug on SunOS 4.1.3.
21721if $ac_need_defaults; then
21722 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21723 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21724fi
21725
Skip Montanaro6dead952003-09-25 14:50:04 +000021726# Have a temporary directory for convenience. Make it in the build tree
21727# simply because there is no reason to put it here, and in addition,
21728# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000021729# Create a temporary directory, and hook for its removal unless debugging.
21730$debug ||
21731{
21732 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21733 trap '{ (exit 1); exit 1; }' 1 2 13 15
21734}
21735
21736# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000021737
Martin v. Löwis11437992002-04-12 09:54:03 +000021738{
Skip Montanaro6dead952003-09-25 14:50:04 +000021739 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000021740 test -n "$tmp" && test -d "$tmp"
21741} ||
21742{
Skip Montanaro6dead952003-09-25 14:50:04 +000021743 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000021744 (umask 077 && mkdir $tmp)
21745} ||
21746{
Skip Montanaro6dead952003-09-25 14:50:04 +000021747 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000021748 { (exit 1); exit 1; }
21749}
21750
21751_ACEOF
21752
21753cat >>$CONFIG_STATUS <<_ACEOF
21754
21755#
21756# CONFIG_FILES section.
21757#
21758
21759# No need to generate the scripts if there are no CONFIG_FILES.
21760# This happens for instance when ./config.status config.h
21761if test -n "\$CONFIG_FILES"; then
21762 # Protect against being on the right side of a sed subst in config.status.
21763 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21764 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21765s,@SHELL@,$SHELL,;t t
21766s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21767s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21768s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21769s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21770s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21771s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21772s,@exec_prefix@,$exec_prefix,;t t
21773s,@prefix@,$prefix,;t t
21774s,@program_transform_name@,$program_transform_name,;t t
21775s,@bindir@,$bindir,;t t
21776s,@sbindir@,$sbindir,;t t
21777s,@libexecdir@,$libexecdir,;t t
21778s,@datadir@,$datadir,;t t
21779s,@sysconfdir@,$sysconfdir,;t t
21780s,@sharedstatedir@,$sharedstatedir,;t t
21781s,@localstatedir@,$localstatedir,;t t
21782s,@libdir@,$libdir,;t t
21783s,@includedir@,$includedir,;t t
21784s,@oldincludedir@,$oldincludedir,;t t
21785s,@infodir@,$infodir,;t t
21786s,@mandir@,$mandir,;t t
21787s,@build_alias@,$build_alias,;t t
21788s,@host_alias@,$host_alias,;t t
21789s,@target_alias@,$target_alias,;t t
21790s,@DEFS@,$DEFS,;t t
21791s,@ECHO_C@,$ECHO_C,;t t
21792s,@ECHO_N@,$ECHO_N,;t t
21793s,@ECHO_T@,$ECHO_T,;t t
21794s,@LIBS@,$LIBS,;t t
21795s,@VERSION@,$VERSION,;t t
21796s,@SOVERSION@,$SOVERSION,;t t
21797s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
21798s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
21799s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
21800s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
21801s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
21802s,@MACHDEP@,$MACHDEP,;t t
21803s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000021804s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000021805s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000021806s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021807s,@CXX@,$CXX,;t t
21808s,@MAINOBJ@,$MAINOBJ,;t t
21809s,@EXEEXT@,$EXEEXT,;t t
21810s,@CC@,$CC,;t t
21811s,@CFLAGS@,$CFLAGS,;t t
21812s,@LDFLAGS@,$LDFLAGS,;t t
21813s,@CPPFLAGS@,$CPPFLAGS,;t t
21814s,@ac_ct_CC@,$ac_ct_CC,;t t
21815s,@OBJEXT@,$OBJEXT,;t t
21816s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021817s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021818s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
21819s,@LIBRARY@,$LIBRARY,;t t
21820s,@LDLIBRARY@,$LDLIBRARY,;t t
21821s,@DLLLIBRARY@,$DLLLIBRARY,;t t
21822s,@BLDLIBRARY@,$BLDLIBRARY,;t t
21823s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
21824s,@INSTSONAME@,$INSTSONAME,;t t
21825s,@RUNSHARED@,$RUNSHARED,;t t
21826s,@LINKCC@,$LINKCC,;t t
21827s,@RANLIB@,$RANLIB,;t t
21828s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21829s,@AR@,$AR,;t t
Martin v. Löwisdea59e52006-01-05 10:00:36 +000021830s,@SVNVERSION@,$SVNVERSION,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021831s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21832s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21833s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21834s,@LN@,$LN,;t t
21835s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000021836s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000021837s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021838s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
21839s,@SO@,$SO,;t t
21840s,@LDSHARED@,$LDSHARED,;t t
21841s,@BLDSHARED@,$BLDSHARED,;t t
21842s,@CCSHARED@,$CCSHARED,;t t
21843s,@LINKFORSHARED@,$LINKFORSHARED,;t t
21844s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000021845s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021846s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
21847s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
21848s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
21849s,@LDLAST@,$LDLAST,;t t
21850s,@THREADOBJ@,$THREADOBJ,;t t
21851s,@DLINCLDIR@,$DLINCLDIR,;t t
21852s,@DYNLOADFILE@,$DYNLOADFILE,;t t
21853s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000021854s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021855s,@LIBOBJS@,$LIBOBJS,;t t
21856s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
21857s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
21858s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
21859s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
21860s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
21861s,@LIBM@,$LIBM,;t t
21862s,@LIBC@,$LIBC,;t t
21863s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
21864s,@THREADHEADERS@,$THREADHEADERS,;t t
21865s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021866s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021867CEOF
21868
21869_ACEOF
21870
21871 cat >>$CONFIG_STATUS <<\_ACEOF
21872 # Split the substitutions into bite-sized pieces for seds with
21873 # small command number limits, like on Digital OSF/1 and HP-UX.
21874 ac_max_sed_lines=48
21875 ac_sed_frag=1 # Number of current file.
21876 ac_beg=1 # First line for current file.
21877 ac_end=$ac_max_sed_lines # Line after last line for current file.
21878 ac_more_lines=:
21879 ac_sed_cmds=
21880 while $ac_more_lines; do
21881 if test $ac_beg -gt 1; then
21882 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21883 else
21884 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21885 fi
21886 if test ! -s $tmp/subs.frag; then
21887 ac_more_lines=false
21888 else
21889 # The purpose of the label and of the branching condition is to
21890 # speed up the sed processing (if there are no `@' at all, there
21891 # is no need to browse any of the substitutions).
21892 # These are the two extra sed commands mentioned above.
21893 (echo ':t
21894 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21895 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021896 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021897 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021898 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021899 fi
21900 ac_sed_frag=`expr $ac_sed_frag + 1`
21901 ac_beg=$ac_end
21902 ac_end=`expr $ac_end + $ac_max_sed_lines`
21903 fi
21904 done
21905 if test -z "$ac_sed_cmds"; then
21906 ac_sed_cmds=cat
21907 fi
21908fi # test -n "$CONFIG_FILES"
21909
21910_ACEOF
21911cat >>$CONFIG_STATUS <<\_ACEOF
21912for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21913 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21914 case $ac_file in
21915 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021916 cat >$tmp/stdin
21917 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21918 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021919 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021920 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021921 * ) ac_file_in=$ac_file.in ;;
21922 esac
21923
21924 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21925 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21926$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021927 X"$ac_file" : 'X\(//\)[^/]' \| \
21928 X"$ac_file" : 'X\(//\)$' \| \
21929 X"$ac_file" : 'X\(/\)' \| \
21930 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021931echo X"$ac_file" |
21932 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21933 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21934 /^X\(\/\/\)$/{ s//\1/; q; }
21935 /^X\(\/\).*/{ s//\1/; q; }
21936 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021937 { if $as_mkdir_p; then
21938 mkdir -p "$ac_dir"
21939 else
21940 as_dir="$ac_dir"
21941 as_dirs=
21942 while test ! -d "$as_dir"; do
21943 as_dirs="$as_dir $as_dirs"
21944 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21945$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021946 X"$as_dir" : 'X\(//\)[^/]' \| \
21947 X"$as_dir" : 'X\(//\)$' \| \
21948 X"$as_dir" : 'X\(/\)' \| \
21949 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021950echo X"$as_dir" |
21951 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21952 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21953 /^X\(\/\/\)$/{ s//\1/; q; }
21954 /^X\(\/\).*/{ s//\1/; q; }
21955 s/.*/./; q'`
21956 done
21957 test ! -n "$as_dirs" || mkdir $as_dirs
21958 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21959echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21960 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021961
21962 ac_builddir=.
21963
21964if test "$ac_dir" != .; then
21965 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21966 # A "../" for each directory in $ac_dir_suffix.
21967 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21968else
21969 ac_dir_suffix= ac_top_builddir=
21970fi
21971
21972case $srcdir in
21973 .) # No --srcdir option. We are building in place.
21974 ac_srcdir=.
21975 if test -z "$ac_top_builddir"; then
21976 ac_top_srcdir=.
21977 else
21978 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21979 fi ;;
21980 [\\/]* | ?:[\\/]* ) # Absolute path.
21981 ac_srcdir=$srcdir$ac_dir_suffix;
21982 ac_top_srcdir=$srcdir ;;
21983 *) # Relative path.
21984 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21985 ac_top_srcdir=$ac_top_builddir$srcdir ;;
21986esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000021987
21988# Do not use `cd foo && pwd` to compute absolute paths, because
21989# the directories may not exist.
21990case `pwd` in
21991.) ac_abs_builddir="$ac_dir";;
21992*)
21993 case "$ac_dir" in
21994 .) ac_abs_builddir=`pwd`;;
21995 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21996 *) ac_abs_builddir=`pwd`/"$ac_dir";;
21997 esac;;
21998esac
21999case $ac_abs_builddir in
22000.) ac_abs_top_builddir=${ac_top_builddir}.;;
22001*)
22002 case ${ac_top_builddir}. in
22003 .) ac_abs_top_builddir=$ac_abs_builddir;;
22004 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22005 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22006 esac;;
22007esac
22008case $ac_abs_builddir in
22009.) ac_abs_srcdir=$ac_srcdir;;
22010*)
22011 case $ac_srcdir in
22012 .) ac_abs_srcdir=$ac_abs_builddir;;
22013 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22014 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22015 esac;;
22016esac
22017case $ac_abs_builddir in
22018.) ac_abs_top_srcdir=$ac_top_srcdir;;
22019*)
22020 case $ac_top_srcdir in
22021 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22022 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22023 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22024 esac;;
22025esac
Martin v. Löwis11437992002-04-12 09:54:03 +000022026
22027
22028 case $INSTALL in
22029 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22030 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
22031 esac
22032
Brett Cannon43802422005-02-10 20:48:03 +000022033 if test x"$ac_file" != x-; then
22034 { echo "$as_me:$LINENO: creating $ac_file" >&5
22035echo "$as_me: creating $ac_file" >&6;}
22036 rm -f "$ac_file"
22037 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022038 # Let's still pretend it is `configure' which instantiates (i.e., don't
22039 # use $as_me), people would be surprised to read:
22040 # /* config.h. Generated by config.status. */
22041 if test x"$ac_file" = x-; then
22042 configure_input=
22043 else
22044 configure_input="$ac_file. "
22045 fi
22046 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000022047 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000022048
22049 # First look for the input files in the build tree, otherwise in the
22050 # src tree.
22051 ac_file_inputs=`IFS=:
22052 for f in $ac_file_in; do
22053 case $f in
22054 -) echo $tmp/stdin ;;
22055 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022056 # Absolute (can't be DOS-style, as IFS=:)
22057 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022058echo "$as_me: error: cannot find input file: $f" >&2;}
22059 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022060 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022061 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022062 if test -f "$f"; then
22063 # Build tree
22064 echo "$f"
22065 elif test -f "$srcdir/$f"; then
22066 # Source tree
22067 echo "$srcdir/$f"
22068 else
22069 # /dev/null tree
22070 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022071echo "$as_me: error: cannot find input file: $f" >&2;}
22072 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022073 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022074 esac
22075 done` || { (exit 1); exit 1; }
22076_ACEOF
22077cat >>$CONFIG_STATUS <<_ACEOF
22078 sed "$ac_vpsub
22079$extrasub
22080_ACEOF
22081cat >>$CONFIG_STATUS <<\_ACEOF
22082:t
22083/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22084s,@configure_input@,$configure_input,;t t
22085s,@srcdir@,$ac_srcdir,;t t
22086s,@abs_srcdir@,$ac_abs_srcdir,;t t
22087s,@top_srcdir@,$ac_top_srcdir,;t t
22088s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22089s,@builddir@,$ac_builddir,;t t
22090s,@abs_builddir@,$ac_abs_builddir,;t t
22091s,@top_builddir@,$ac_top_builddir,;t t
22092s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22093s,@INSTALL@,$ac_INSTALL,;t t
22094" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22095 rm -f $tmp/stdin
22096 if test x"$ac_file" != x-; then
22097 mv $tmp/out $ac_file
22098 else
22099 cat $tmp/out
22100 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022101 fi
22102
Martin v. Löwis11437992002-04-12 09:54:03 +000022103done
22104_ACEOF
22105cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022106
Martin v. Löwis11437992002-04-12 09:54:03 +000022107#
22108# CONFIG_HEADER section.
22109#
Guido van Rossum627b2d71993-12-24 10:39:16 +000022110
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022111# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22112# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000022113#
22114# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022115ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22116ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000022117ac_dC=' '
22118ac_dD=',;t'
22119# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000022120ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000022121ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022122ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000022123ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022124
Martin v. Löwis11437992002-04-12 09:54:03 +000022125for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000022126 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000022127 case $ac_file in
22128 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022129 cat >$tmp/stdin
22130 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22131 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022132 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022133 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022134 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022135 esac
22136
Martin v. Löwis11437992002-04-12 09:54:03 +000022137 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22138echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022139
Martin v. Löwis11437992002-04-12 09:54:03 +000022140 # First look for the input files in the build tree, otherwise in the
22141 # src tree.
22142 ac_file_inputs=`IFS=:
22143 for f in $ac_file_in; do
22144 case $f in
22145 -) echo $tmp/stdin ;;
22146 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022147 # Absolute (can't be DOS-style, as IFS=:)
22148 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022149echo "$as_me: error: cannot find input file: $f" >&2;}
22150 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022151 # Do quote $f, to prevent DOS paths from being IFS'd.
22152 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022153 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022154 if test -f "$f"; then
22155 # Build tree
22156 echo "$f"
22157 elif test -f "$srcdir/$f"; then
22158 # Source tree
22159 echo "$srcdir/$f"
22160 else
22161 # /dev/null tree
22162 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022163echo "$as_me: error: cannot find input file: $f" >&2;}
22164 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022165 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022166 esac
22167 done` || { (exit 1); exit 1; }
22168 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022169 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022170
Martin v. Löwis11437992002-04-12 09:54:03 +000022171_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022172
Martin v. Löwis11437992002-04-12 09:54:03 +000022173# Transform confdefs.h into two sed scripts, `conftest.defines' and
22174# `conftest.undefs', that substitutes the proper values into
22175# config.h.in to produce config.h. The first handles `#define'
22176# templates, and the second `#undef' templates.
22177# And first: Protect against being on the right side of a sed subst in
22178# config.status. Protect against being in an unquoted here document
22179# in config.status.
22180rm -f conftest.defines conftest.undefs
22181# Using a here document instead of a string reduces the quoting nightmare.
22182# Putting comments in sed scripts is not portable.
22183#
22184# `end' is used to avoid that the second main sed command (meant for
22185# 0-ary CPP macros) applies to n-ary macro definitions.
22186# See the Autoconf documentation for `clear'.
22187cat >confdef2sed.sed <<\_ACEOF
22188s/[\\&,]/\\&/g
22189s,[\\$`],\\&,g
22190t clear
22191: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000022192s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022193t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000022194s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022195: end
22196_ACEOF
22197# If some macros were called several times there might be several times
22198# the same #defines, which is useless. Nevertheless, we may not want to
22199# sort them, since we want the *last* AC-DEFINE to be honored.
22200uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22201sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22202rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022203
22204# This sed command replaces #undef with comments. This is necessary, for
22205# example, in the case of _POSIX_SOURCE, which is predefined and required
22206# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000022207cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000022208s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000022209_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022210
Martin v. Löwis11437992002-04-12 09:54:03 +000022211# Break up conftest.defines because some shells have a limit on the size
22212# of here documents, and old seds have small limits too (100 cmds).
22213echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000022214echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022215echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22216echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022217rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000022218while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000022219do
Martin v. Löwis11437992002-04-12 09:54:03 +000022220 # Write a limited-size here document to $tmp/defines.sed.
22221 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22222 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022223 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022224 # Work around the forget-to-reset-the-flag bug.
22225 echo 't clr' >>$CONFIG_STATUS
22226 echo ': clr' >>$CONFIG_STATUS
22227 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022228 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022229 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22230 rm -f $tmp/in
22231 mv $tmp/out $tmp/in
22232' >>$CONFIG_STATUS
22233 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22234 rm -f conftest.defines
22235 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000022236done
Martin v. Löwis11437992002-04-12 09:54:03 +000022237rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000022238echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022239echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022240
Martin v. Löwis11437992002-04-12 09:54:03 +000022241# Break up conftest.undefs because some shells have a limit on the size
22242# of here documents, and old seds have small limits too (100 cmds).
22243echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22244rm -f conftest.tail
22245while grep . conftest.undefs >/dev/null
22246do
22247 # Write a limited-size here document to $tmp/undefs.sed.
22248 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22249 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000022250 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022251 # Work around the forget-to-reset-the-flag bug.
22252 echo 't clr' >>$CONFIG_STATUS
22253 echo ': clr' >>$CONFIG_STATUS
22254 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22255 echo 'CEOF
22256 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22257 rm -f $tmp/in
22258 mv $tmp/out $tmp/in
22259' >>$CONFIG_STATUS
22260 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22261 rm -f conftest.undefs
22262 mv conftest.tail conftest.undefs
22263done
22264rm -f conftest.undefs
22265
22266cat >>$CONFIG_STATUS <<\_ACEOF
22267 # Let's still pretend it is `configure' which instantiates (i.e., don't
22268 # use $as_me), people would be surprised to read:
22269 # /* config.h. Generated by config.status. */
22270 if test x"$ac_file" = x-; then
22271 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000022272 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022273 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000022274 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022275 cat $tmp/in >>$tmp/config.h
22276 rm -f $tmp/in
22277 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022278 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022279 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22280echo "$as_me: $ac_file is unchanged" >&6;}
22281 else
22282 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22283$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022284 X"$ac_file" : 'X\(//\)[^/]' \| \
22285 X"$ac_file" : 'X\(//\)$' \| \
22286 X"$ac_file" : 'X\(/\)' \| \
22287 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022288echo X"$ac_file" |
22289 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22290 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22291 /^X\(\/\/\)$/{ s//\1/; q; }
22292 /^X\(\/\).*/{ s//\1/; q; }
22293 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022294 { if $as_mkdir_p; then
22295 mkdir -p "$ac_dir"
22296 else
22297 as_dir="$ac_dir"
22298 as_dirs=
22299 while test ! -d "$as_dir"; do
22300 as_dirs="$as_dir $as_dirs"
22301 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22302$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022303 X"$as_dir" : 'X\(//\)[^/]' \| \
22304 X"$as_dir" : 'X\(//\)$' \| \
22305 X"$as_dir" : 'X\(/\)' \| \
22306 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022307echo X"$as_dir" |
22308 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22309 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22310 /^X\(\/\/\)$/{ s//\1/; q; }
22311 /^X\(\/\).*/{ s//\1/; q; }
22312 s/.*/./; q'`
22313 done
22314 test ! -n "$as_dirs" || mkdir $as_dirs
22315 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22316echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22317 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022318
Martin v. Löwis11437992002-04-12 09:54:03 +000022319 rm -f $ac_file
22320 mv $tmp/config.h $ac_file
22321 fi
22322 else
22323 cat $tmp/config.h
22324 rm -f $tmp/config.h
22325 fi
22326done
22327_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022328
Martin v. Löwis11437992002-04-12 09:54:03 +000022329cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022330
Martin v. Löwis11437992002-04-12 09:54:03 +000022331{ (exit 0); exit 0; }
22332_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022333chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022334ac_clean_files=$ac_clean_files_save
22335
22336
22337# configure is writing to config.log, and then calls config.status.
22338# config.status does its own redirection, appending to config.log.
22339# Unfortunately, on DOS this fails, as config.log is still kept open
22340# by configure, so config.status won't be able to write to it; its
22341# output is simply discarded. So we exec the FD to /dev/null,
22342# effectively closing config.log, so it can be properly (re)opened and
22343# appended to by config.status. When coming back to configure, we
22344# need to make the FD available again.
22345if test "$no_create" != yes; then
22346 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000022347 ac_config_status_args=
22348 test "$silent" = yes &&
22349 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000022350 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000022351 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000022352 exec 5>>config.log
22353 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22354 # would make configure fail if this is the last instruction.
22355 $ac_cs_success || { (exit 1); exit 1; }
22356fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000022357
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000022358
22359echo "creating Setup"
22360if test ! -f Modules/Setup
22361then
22362 cp $srcdir/Modules/Setup.dist Modules/Setup
22363fi
22364
22365echo "creating Setup.local"
22366if test ! -f Modules/Setup.local
22367then
22368 echo "# Edit this file for local setup changes" >Modules/Setup.local
22369fi
22370
22371echo "creating Makefile"
22372$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
22373 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000022374 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000022375mv config.c Modules