blob: 0250d9ef5a195bb35b1cb5fc977aa72d54437600 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002# From configure.in Revision: 43459 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum0c4eb622006-03-30 16:19:24 +00004# Generated by GNU Autoconf 2.59 for python 3.0.
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'
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000273PACKAGE_VERSION='3.0'
274PACKAGE_STRING='python 3.0'
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
Thomas Wouters49fd7fa2006-04-21 10:40:58 +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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX MAINCC 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
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000784\`configure' configures python 3.0 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
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000841 short | recursive ) echo "Configuration of python 3.0:";;
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
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000862 --with-cxx-main=<compiler>
863 compile main() and link python executable with C++
864 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000865 --with-suffix=.exe set executable suffix
866 --with-pydebug build with Py_DEBUG defined
867 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000868 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000869 --with-signal-module disable/enable signal module
870 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
871 --with(out)-threads[=DIRECTORY]
872 disable/enable thread support
873 --with(out)-thread[=DIRECTORY]
874 deprecated; use --with(out)-threads
875 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000876 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000877 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000878 --with(out)-pymalloc disable/enable specialized mallocs
879 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000880 --with-fpectl enable SIGFPE catching
881 --with-libm=STRING math library
882 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884Some influential environment variables:
885 CC C compiler command
886 CFLAGS C compiler flags
887 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
888 nonstandard directory <lib dir>
889 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
890 headers in a nonstandard directory <include dir>
891 CPP C preprocessor
892
893Use these variables to override the choices made by `configure' or to help
894it to find libraries and programs with nonstandard names/locations.
895
Martin v. Löwis1d459062005-03-14 21:23:33 +0000896Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +0000897_ACEOF
898fi
899
900if test "$ac_init_help" = "recursive"; then
901 # If there are subdirs, report their specific --help.
902 ac_popdir=`pwd`
903 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
904 test -d $ac_dir || continue
905 ac_builddir=.
906
907if test "$ac_dir" != .; then
908 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
909 # A "../" for each directory in $ac_dir_suffix.
910 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
911else
912 ac_dir_suffix= ac_top_builddir=
913fi
914
915case $srcdir in
916 .) # No --srcdir option. We are building in place.
917 ac_srcdir=.
918 if test -z "$ac_top_builddir"; then
919 ac_top_srcdir=.
920 else
921 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
922 fi ;;
923 [\\/]* | ?:[\\/]* ) # Absolute path.
924 ac_srcdir=$srcdir$ac_dir_suffix;
925 ac_top_srcdir=$srcdir ;;
926 *) # Relative path.
927 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
928 ac_top_srcdir=$ac_top_builddir$srcdir ;;
929esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000930
931# Do not use `cd foo && pwd` to compute absolute paths, because
932# the directories may not exist.
933case `pwd` in
934.) ac_abs_builddir="$ac_dir";;
935*)
936 case "$ac_dir" in
937 .) ac_abs_builddir=`pwd`;;
938 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
939 *) ac_abs_builddir=`pwd`/"$ac_dir";;
940 esac;;
941esac
942case $ac_abs_builddir in
943.) ac_abs_top_builddir=${ac_top_builddir}.;;
944*)
945 case ${ac_top_builddir}. in
946 .) ac_abs_top_builddir=$ac_abs_builddir;;
947 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
948 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
949 esac;;
950esac
951case $ac_abs_builddir in
952.) ac_abs_srcdir=$ac_srcdir;;
953*)
954 case $ac_srcdir in
955 .) ac_abs_srcdir=$ac_abs_builddir;;
956 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
957 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
958 esac;;
959esac
960case $ac_abs_builddir in
961.) ac_abs_top_srcdir=$ac_top_srcdir;;
962*)
963 case $ac_top_srcdir in
964 .) ac_abs_top_srcdir=$ac_abs_builddir;;
965 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
966 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
967 esac;;
968esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000969
970 cd $ac_dir
971 # Check for guested configure; otherwise get Cygnus style configure.
972 if test -f $ac_srcdir/configure.gnu; then
973 echo
974 $SHELL $ac_srcdir/configure.gnu --help=recursive
975 elif test -f $ac_srcdir/configure; then
976 echo
977 $SHELL $ac_srcdir/configure --help=recursive
978 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000979 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 echo
981 $ac_configure --help
982 else
983 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
984 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000985 cd "$ac_popdir"
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 done
987fi
988
989test -n "$ac_init_help" && exit 0
990if $ac_init_version; then
991 cat <<\_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000992python configure 3.0
Skip Montanarof0d5f792004-08-15 14:08:23 +0000993generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000994
Skip Montanarof0d5f792004-08-15 14:08:23 +0000995Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000996This configure script is free software; the Free Software Foundation
997gives unlimited permission to copy, distribute and modify it.
998_ACEOF
999 exit 0
1000fi
1001exec 5>config.log
1002cat >&5 <<_ACEOF
1003This file contains any messages produced by compilers while
1004running configure, to aid debugging if configure makes a mistake.
1005
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001006It was created by python $as_me 3.0, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001007generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001008
1009 $ $0 $@
1010
1011_ACEOF
1012{
1013cat <<_ASUNAME
1014## --------- ##
1015## Platform. ##
1016## --------- ##
1017
1018hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1019uname -m = `(uname -m) 2>/dev/null || echo unknown`
1020uname -r = `(uname -r) 2>/dev/null || echo unknown`
1021uname -s = `(uname -s) 2>/dev/null || echo unknown`
1022uname -v = `(uname -v) 2>/dev/null || echo unknown`
1023
1024/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1025/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1026
1027/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1028/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1029/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1030hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1031/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1032/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1033/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1034
1035_ASUNAME
1036
1037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1038for as_dir in $PATH
1039do
1040 IFS=$as_save_IFS
1041 test -z "$as_dir" && as_dir=.
1042 echo "PATH: $as_dir"
1043done
1044
1045} >&5
1046
1047cat >&5 <<_ACEOF
1048
1049
1050## ----------- ##
1051## Core tests. ##
1052## ----------- ##
1053
1054_ACEOF
1055
1056
1057# Keep a trace of the command line.
1058# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001059# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001060# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001061# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001062ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001063ac_configure_args0=
1064ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001065ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001066ac_must_keep_next=false
1067for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001068do
Skip Montanaro6dead952003-09-25 14:50:04 +00001069 for ac_arg
1070 do
1071 case $ac_arg in
1072 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1073 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1074 | -silent | --silent | --silen | --sile | --sil)
1075 continue ;;
1076 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1077 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1078 esac
1079 case $ac_pass in
1080 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1081 2)
1082 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1083 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001084 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001085 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001086 case $ac_arg in
1087 *=* | --config-cache | -C | -disable-* | --disable-* \
1088 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1089 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1090 | -with-* | --with-* | -without-* | --without-* | --x)
1091 case "$ac_configure_args0 " in
1092 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1093 esac
1094 ;;
1095 -* ) ac_must_keep_next=true ;;
1096 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001097 fi
1098 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1099 # Get rid of the leading space.
1100 ac_sep=" "
1101 ;;
1102 esac
1103 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001104done
Skip Montanaro6dead952003-09-25 14:50:04 +00001105$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1106$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 +00001107
1108# When interrupted or exit'd, cleanup temporary files, and complete
1109# config.log. We remove comments because anyway the quotes in there
1110# would cause problems or look ugly.
1111# WARNING: Be sure not to use single quotes in there, as some shells,
1112# such as our DU 5.0 friend, will then `close' the trap.
1113trap 'exit_status=$?
1114 # Save into config.log some information that might help in debugging.
1115 {
1116 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001117
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 cat <<\_ASBOX
1119## ---------------- ##
1120## Cache variables. ##
1121## ---------------- ##
1122_ASBOX
1123 echo
1124 # The following way of writing the cache mishandles newlines in values,
1125{
1126 (set) 2>&1 |
1127 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1128 *ac_space=\ *)
1129 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001130 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1131 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 ;;
1133 *)
1134 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001135 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 ;;
1137 esac;
1138}
1139 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001140
1141 cat <<\_ASBOX
1142## ----------------- ##
1143## Output variables. ##
1144## ----------------- ##
1145_ASBOX
1146 echo
1147 for ac_var in $ac_subst_vars
1148 do
1149 eval ac_val=$`echo $ac_var`
1150 echo "$ac_var='"'"'$ac_val'"'"'"
1151 done | sort
1152 echo
1153
1154 if test -n "$ac_subst_files"; then
1155 cat <<\_ASBOX
1156## ------------- ##
1157## Output files. ##
1158## ------------- ##
1159_ASBOX
1160 echo
1161 for ac_var in $ac_subst_files
1162 do
1163 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001164 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001165 done | sort
1166 echo
1167 fi
1168
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 if test -s confdefs.h; then
1170 cat <<\_ASBOX
1171## ----------- ##
1172## confdefs.h. ##
1173## ----------- ##
1174_ASBOX
1175 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001176 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 echo
1178 fi
1179 test "$ac_signal" != 0 &&
1180 echo "$as_me: caught signal $ac_signal"
1181 echo "$as_me: exit $exit_status"
1182 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001183 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1185 exit $exit_status
1186 ' 0
1187for ac_signal in 1 2 13 15; do
1188 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1189done
1190ac_signal=0
1191
1192# confdefs.h avoids OS command line length limits that DEFS can exceed.
1193rm -rf conftest* confdefs.h
1194# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1195echo >confdefs.h
1196
1197# Predefined preprocessor variables.
1198
1199cat >>confdefs.h <<_ACEOF
1200#define PACKAGE_NAME "$PACKAGE_NAME"
1201_ACEOF
1202
1203
1204cat >>confdefs.h <<_ACEOF
1205#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1206_ACEOF
1207
1208
1209cat >>confdefs.h <<_ACEOF
1210#define PACKAGE_VERSION "$PACKAGE_VERSION"
1211_ACEOF
1212
1213
1214cat >>confdefs.h <<_ACEOF
1215#define PACKAGE_STRING "$PACKAGE_STRING"
1216_ACEOF
1217
1218
1219cat >>confdefs.h <<_ACEOF
1220#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1221_ACEOF
1222
1223
1224# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225# Prefer explicitly selected file to automatically selected ones.
1226if test -z "$CONFIG_SITE"; then
1227 if test "x$prefix" != xNONE; then
1228 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1229 else
1230 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1231 fi
1232fi
1233for ac_site_file in $CONFIG_SITE; do
1234 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1236echo "$as_me: loading site script $ac_site_file" >&6;}
1237 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 . "$ac_site_file"
1239 fi
1240done
1241
1242if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 # Some versions of bash will fail to source /dev/null (special
1244 # files actually), so we avoid doing that.
1245 if test -f "$cache_file"; then
1246 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1247echo "$as_me: loading cache $cache_file" >&6;}
1248 case $cache_file in
1249 [\\/]* | ?:[\\/]* ) . $cache_file;;
1250 *) . ./$cache_file;;
1251 esac
1252 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001253else
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1255echo "$as_me: creating cache $cache_file" >&6;}
1256 >$cache_file
1257fi
1258
1259# Check that the precious variables saved in the cache have kept the same
1260# value.
1261ac_cache_corrupted=false
1262for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001263 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1265 eval ac_new_set=\$ac_env_${ac_var}_set
1266 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1267 eval ac_new_val="\$ac_env_${ac_var}_value"
1268 case $ac_old_set,$ac_new_set in
1269 set,)
1270 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1271echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1272 ac_cache_corrupted=: ;;
1273 ,set)
1274 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1275echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1276 ac_cache_corrupted=: ;;
1277 ,);;
1278 *)
1279 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001280 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001281echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001282 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001283echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001284 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001285echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001286 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 fi;;
1288 esac
1289 # Pass precious variables to config.status.
1290 if test "$ac_new_set" = set; then
1291 case $ac_new_val in
1292 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1293 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1294 *) ac_arg=$ac_var=$ac_new_val ;;
1295 esac
1296 case " $ac_configure_args " in
1297 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1298 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1299 esac
1300 fi
1301done
1302if $ac_cache_corrupted; then
1303 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1304echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1305 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1306echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1307 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308fi
1309
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001311ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1314ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Michael W. Hudson54241132001-12-07 15:38:26 +00001317
1318
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
Martin v. Löwis88afe662002-10-26 13:47:44 +00001333
1334
1335
1336
1337
1338
1339
1340
1341
Skip Montanaro6dead952003-09-25 14:50:04 +00001342
1343 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001344
1345
Martin v. Löwis11437992002-04-12 09:54:03 +00001346
1347
1348
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001349
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001350
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001351# We don't use PACKAGE_ variables, and they cause conflicts
1352# with other autoconf-based packages that include Python.h
1353grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1354rm confdefs.h
1355mv confdefs.h.new confdefs.h
1356
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001357
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001358VERSION=3.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001359
Martin v. Löwis1142de32002-03-29 16:28:31 +00001360
1361SOVERSION=1.0
1362
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001363# The later defininition of _XOPEN_SOURCE disables certain features
1364# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1365
1366cat >>confdefs.h <<\_ACEOF
1367#define _GNU_SOURCE 1
1368_ACEOF
1369
1370
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001371# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1372# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1373# them.
1374
1375cat >>confdefs.h <<\_ACEOF
1376#define _NETBSD_SOURCE 1
1377_ACEOF
1378
1379
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001380# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1381# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1382# them.
1383
1384cat >>confdefs.h <<\_ACEOF
1385#define __BSD_VISIBLE 1
1386_ACEOF
1387
1388
Martin v. Löwisd6320502004-08-12 13:45:08 +00001389# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1390# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1391
1392cat >>confdefs.h <<\_ACEOF
1393#define _BSD_TYPES 1
1394_ACEOF
1395
1396
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001397define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001398
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001399# Arguments passed to configure.
1400
1401CONFIG_ARGS="$ac_configure_args"
1402
Jack Jansene578a632001-08-15 01:27:14 +00001403# Check whether --enable-framework or --disable-framework was given.
1404if test "${enable_framework+set}" = set; then
1405 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
Jack Jansene578a632001-08-15 01:27:14 +00001407 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001409 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001410 esac
1411 case $enableval in
1412 no)
1413 PYTHONFRAMEWORK=
1414 PYTHONFRAMEWORKDIR=no-framework
1415 PYTHONFRAMEWORKPREFIX=
1416 PYTHONFRAMEWORKINSTALLDIR=
1417 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001418 ;;
1419 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001420 PYTHONFRAMEWORK=Python
1421 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001422 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001423 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1424 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001425 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
Guido van Rossum563e7081996-09-10 18:20:48 +00001427else
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
Jack Jansene578a632001-08-15 01:27:14 +00001429 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001430 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001431 PYTHONFRAMEWORKPREFIX=
1432 PYTHONFRAMEWORKINSTALLDIR=
1433 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001434
Martin v. Löwis11437992002-04-12 09:54:03 +00001435fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001436
1437
1438
1439
Jack Jansene578a632001-08-15 01:27:14 +00001440
1441##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442## AC_HELP_STRING(--with-dyld,
1443## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001444##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001445# Set name for machine-dependent library files
1446
Martin v. Löwis11437992002-04-12 09:54:03 +00001447echo "$as_me:$LINENO: checking MACHDEP" >&5
1448echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001449if test -z "$MACHDEP"
1450then
Guido van Rossum563e7081996-09-10 18:20:48 +00001451 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001452 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1453 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001454 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001455 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001456 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001457 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001458 ac_md_system=`echo $ac_sys_system |
1459 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1460 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001461 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001462 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001463
Guido van Rossum07397971997-04-29 21:49:50 +00001464 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001465 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001466 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001467 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001468 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001469 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001470 esac
1471fi
Guido van Rossum91922671997-10-09 20:24:13 +00001472
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001473# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1474# disable features if it is defined, without any means to access these
1475# features as extensions. For these systems, we skip the definition of
1476# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1477# some feature, make sure there is no alternative way to access this
1478# feature. Also, when using wildcards, make sure you have verified the
1479# need for not defining _XOPEN_SOURCE on all systems matching the
1480# wildcard, and that the wildcard does not include future systems
1481# (which may remove their limitations).
1482case $ac_sys_system/$ac_sys_release in
1483 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1484 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001485 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz671b9e32006-01-09 07:07:12 +00001486 OpenBSD/2.* | OpenBSD/3.[012345678])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001487 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001488 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1489 # of union __?sigval. Reported by Stuart Bishop.
1490 SunOS/5.6)
1491 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001492 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1493 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001494 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001495 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001496 define_xopen_source=no;;
1497 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001498 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001499 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001500 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001501 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1502 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1503 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1504 # This should hopefully be fixed in FreeBSD 4.9
1505 FreeBSD/4.8* | Darwin/6* )
1506 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001507 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1508 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1509 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001510 AIX/4)
1511 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001512 AIX/5)
1513 if test `uname -r` -eq 1; then
1514 define_xopen_source=no
1515 fi
1516 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001517 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1518 # disables platform specific features beyond repair.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001519 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1520 # has no effect, don't bother defineing them
1521 Darwin/[78].*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001522 define_xopen_source=no
1523 ;;
1524
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001525esac
1526
1527if test $define_xopen_source = yes
1528then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1530 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00001531 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
1532 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00001533 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00001534 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00001535
1536cat >>confdefs.h <<\_ACEOF
1537#define _XOPEN_SOURCE 500
1538_ACEOF
1539
1540 ;;
1541 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001542
1543cat >>confdefs.h <<\_ACEOF
1544#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001545_ACEOF
1546
Skip Montanarof0d5f792004-08-15 14:08:23 +00001547 ;;
1548 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001549
1550 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1551 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1552 # several APIs are not declared. Since this is also needed in some
1553 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00001554 # except for Solaris 10, where it must not be defined,
1555 # as it implies XPG4.2
1556 case $ac_sys_system/$ac_sys_release in
1557 SunOS/5.10)
1558 ;;
1559 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001560
1561cat >>confdefs.h <<\_ACEOF
1562#define _XOPEN_SOURCE_EXTENDED 1
1563_ACEOF
1564
Martin v. Löwis7dece662005-11-26 11:38:24 +00001565 ;;
1566 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001567
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001568
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001569cat >>confdefs.h <<\_ACEOF
1570#define _POSIX_C_SOURCE 200112L
1571_ACEOF
1572
1573
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001574fi
1575
Guido van Rossum91922671997-10-09 20:24:13 +00001576#
1577# SGI compilers allow the specification of the both the ABI and the
1578# ISA on the command line. Depending on the values of these switches,
1579# different and often incompatable code will be generated.
1580#
1581# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1582# thus supply support for various ABI/ISA combinations. The MACHDEP
1583# variable is also adjusted.
1584#
1585
1586if test ! -z "$SGI_ABI"
1587then
1588 CC="cc $SGI_ABI"
1589 LDFLAGS="$SGI_ABI $LDFLAGS"
1590 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001592echo "$as_me:$LINENO: result: $MACHDEP" >&5
1593echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001594
Jack Jansen83f898c2002-12-30 22:23:40 +00001595# And add extra plat-mac for darwin
1596
Jack Jansen7b59b422003-03-17 15:44:10 +00001597
Jack Jansen83f898c2002-12-30 22:23:40 +00001598echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1599echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1600if test -z "$EXTRAPLATDIR"
1601then
1602 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001603 darwin)
1604 EXTRAPLATDIR="\$(PLATMACDIRS)"
1605 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1606 ;;
1607 *)
1608 EXTRAPLATDIR=""
1609 EXTRAMACHDEPPATH=""
1610 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001611 esac
1612fi
1613echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1614echo "${ECHO_T}$EXTRAPLATDIR" >&6
1615
Jack Jansen6b08a402004-06-03 12:41:45 +00001616# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1617# it may influence the way we can build extensions, so distutils
1618# needs to check it
1619
1620CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1621
Guido van Rossum627b2d71993-12-24 10:39:16 +00001622# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001623
1624# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1625# for debug/optimization stuff. BASECFLAGS is for flags that are required
1626# just to get things to compile and link. Users are free to override OPT
1627# when running configure or make. The build should not break if they do.
1628# BASECFLAGS should generally not be messed with, however.
1629
1630# XXX shouldn't some/most/all of this code be merged with the stuff later
1631# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001632echo "$as_me:$LINENO: checking for --without-gcc" >&5
1633echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1634
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001635# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001636if test "${with_gcc+set}" = set; then
1637 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001638
Guido van Rossum7f43da71994-08-01 12:15:30 +00001639 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001640 no) CC=cc
1641 without_gcc=yes;;
1642 yes) CC=gcc
1643 without_gcc=no;;
1644 *) CC=$withval
1645 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001646 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001647else
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001649 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001650 AIX*) CC=cc_r
1651 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001652 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001653 case $BE_HOST_CPU in
1654 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001655 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001656 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001657 BASECFLAGS="$BASECFLAGS -export pragma"
1658 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001659 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001660 ;;
1661 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001662 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001663 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001664 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001665 ;;
1666 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001667 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1668echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1669 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001670 ;;
1671 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001672 AR="\$(srcdir)/Modules/ar_beos"
1673 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001674 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001675 Monterey*)
1676 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001677 without_gcc=;;
1678 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001679 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001680fi;
1681echo "$as_me:$LINENO: result: $without_gcc" >&5
1682echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001683
Guido van Rossum8b131c51995-03-09 14:10:13 +00001684# If the user switches compilers, we can't believe the cache
1685if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1686then
Martin v. Löwis11437992002-04-12 09:54:03 +00001687 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1688(it is also a good idea to do 'make clean' before compiling)" >&5
1689echo "$as_me: error: cached CC is different -- throw away $cache_file
1690(it is also a good idea to do 'make clean' before compiling)" >&2;}
1691 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001692fi
1693
Martin v. Löwis11437992002-04-12 09:54:03 +00001694ac_ext=c
1695ac_cpp='$CPP $CPPFLAGS'
1696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1698ac_compiler_gnu=$ac_cv_c_compiler_gnu
1699if test -n "$ac_tool_prefix"; then
1700 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1701set dummy ${ac_tool_prefix}gcc; ac_word=$2
1702echo "$as_me:$LINENO: checking for $ac_word" >&5
1703echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1704if test "${ac_cv_prog_CC+set}" = set; then
1705 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001706else
1707 if test -n "$CC"; then
1708 ac_cv_prog_CC="$CC" # Let the user override the test.
1709else
Martin v. Löwis11437992002-04-12 09:54:03 +00001710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1711for as_dir in $PATH
1712do
1713 IFS=$as_save_IFS
1714 test -z "$as_dir" && as_dir=.
1715 for ac_exec_ext in '' $ac_executable_extensions; do
1716 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1717 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1718 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1719 break 2
1720 fi
1721done
1722done
1723
Jack Jansendd19cf82001-12-06 22:36:17 +00001724fi
1725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001726CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001727if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 echo "$as_me:$LINENO: result: $CC" >&5
1729echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001730else
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 echo "$as_me:$LINENO: result: no" >&5
1732echo "${ECHO_T}no" >&6
1733fi
1734
1735fi
1736if test -z "$ac_cv_prog_CC"; then
1737 ac_ct_CC=$CC
1738 # Extract the first word of "gcc", so it can be a program name with args.
1739set dummy gcc; ac_word=$2
1740echo "$as_me:$LINENO: checking for $ac_word" >&5
1741echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1742if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1743 echo $ECHO_N "(cached) $ECHO_C" >&6
1744else
1745 if test -n "$ac_ct_CC"; then
1746 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1747else
1748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1749for as_dir in $PATH
1750do
1751 IFS=$as_save_IFS
1752 test -z "$as_dir" && as_dir=.
1753 for ac_exec_ext in '' $ac_executable_extensions; do
1754 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1755 ac_cv_prog_ac_ct_CC="gcc"
1756 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1757 break 2
1758 fi
1759done
1760done
1761
1762fi
1763fi
1764ac_ct_CC=$ac_cv_prog_ac_ct_CC
1765if test -n "$ac_ct_CC"; then
1766 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1767echo "${ECHO_T}$ac_ct_CC" >&6
1768else
1769 echo "$as_me:$LINENO: result: no" >&5
1770echo "${ECHO_T}no" >&6
1771fi
1772
1773 CC=$ac_ct_CC
1774else
1775 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001776fi
1777
Jack Jansendd19cf82001-12-06 22:36:17 +00001778if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 if test -n "$ac_tool_prefix"; then
1780 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1781set dummy ${ac_tool_prefix}cc; ac_word=$2
1782echo "$as_me:$LINENO: checking for $ac_word" >&5
1783echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1784if test "${ac_cv_prog_CC+set}" = set; then
1785 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001786else
1787 if test -n "$CC"; then
1788 ac_cv_prog_CC="$CC" # Let the user override the test.
1789else
Martin v. Löwis11437992002-04-12 09:54:03 +00001790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1791for as_dir in $PATH
1792do
1793 IFS=$as_save_IFS
1794 test -z "$as_dir" && as_dir=.
1795 for ac_exec_ext in '' $ac_executable_extensions; do
1796 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1797 ac_cv_prog_CC="${ac_tool_prefix}cc"
1798 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1799 break 2
1800 fi
1801done
1802done
1803
1804fi
1805fi
1806CC=$ac_cv_prog_CC
1807if test -n "$CC"; then
1808 echo "$as_me:$LINENO: result: $CC" >&5
1809echo "${ECHO_T}$CC" >&6
1810else
1811 echo "$as_me:$LINENO: result: no" >&5
1812echo "${ECHO_T}no" >&6
1813fi
1814
1815fi
1816if test -z "$ac_cv_prog_CC"; then
1817 ac_ct_CC=$CC
1818 # Extract the first word of "cc", so it can be a program name with args.
1819set dummy cc; ac_word=$2
1820echo "$as_me:$LINENO: checking for $ac_word" >&5
1821echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1822if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1823 echo $ECHO_N "(cached) $ECHO_C" >&6
1824else
1825 if test -n "$ac_ct_CC"; then
1826 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1827else
1828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1829for as_dir in $PATH
1830do
1831 IFS=$as_save_IFS
1832 test -z "$as_dir" && as_dir=.
1833 for ac_exec_ext in '' $ac_executable_extensions; do
1834 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1835 ac_cv_prog_ac_ct_CC="cc"
1836 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1837 break 2
1838 fi
1839done
1840done
1841
1842fi
1843fi
1844ac_ct_CC=$ac_cv_prog_ac_ct_CC
1845if test -n "$ac_ct_CC"; then
1846 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1847echo "${ECHO_T}$ac_ct_CC" >&6
1848else
1849 echo "$as_me:$LINENO: result: no" >&5
1850echo "${ECHO_T}no" >&6
1851fi
1852
1853 CC=$ac_ct_CC
1854else
1855 CC="$ac_cv_prog_CC"
1856fi
1857
1858fi
1859if test -z "$CC"; then
1860 # Extract the first word of "cc", so it can be a program name with args.
1861set dummy cc; ac_word=$2
1862echo "$as_me:$LINENO: checking for $ac_word" >&5
1863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1864if test "${ac_cv_prog_CC+set}" = set; then
1865 echo $ECHO_N "(cached) $ECHO_C" >&6
1866else
1867 if test -n "$CC"; then
1868 ac_cv_prog_CC="$CC" # Let the user override the test.
1869else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001870 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1872for as_dir in $PATH
1873do
1874 IFS=$as_save_IFS
1875 test -z "$as_dir" && as_dir=.
1876 for ac_exec_ext in '' $ac_executable_extensions; do
1877 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1878 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1879 ac_prog_rejected=yes
1880 continue
1881 fi
1882 ac_cv_prog_CC="cc"
1883 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1884 break 2
1885 fi
1886done
1887done
1888
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001889if test $ac_prog_rejected = yes; then
1890 # We found a bogon in the path, so make sure we never use it.
1891 set dummy $ac_cv_prog_CC
1892 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001893 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001894 # We chose a different compiler from the bogus one.
1895 # However, it has the same basename, so the bogon will be chosen
1896 # first if we set CC to just the basename; use the full file name.
1897 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00001898 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001899 fi
1900fi
1901fi
1902fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001903CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001904if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001905 echo "$as_me:$LINENO: result: $CC" >&5
1906echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001907else
Martin v. Löwis11437992002-04-12 09:54:03 +00001908 echo "$as_me:$LINENO: result: no" >&5
1909echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001910fi
1911
Martin v. Löwis11437992002-04-12 09:54:03 +00001912fi
1913if test -z "$CC"; then
1914 if test -n "$ac_tool_prefix"; then
1915 for ac_prog in cl
1916 do
1917 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1918set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1919echo "$as_me:$LINENO: checking for $ac_word" >&5
1920echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1921if test "${ac_cv_prog_CC+set}" = set; then
1922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001923else
1924 if test -n "$CC"; then
1925 ac_cv_prog_CC="$CC" # Let the user override the test.
1926else
Martin v. Löwis11437992002-04-12 09:54:03 +00001927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1928for as_dir in $PATH
1929do
1930 IFS=$as_save_IFS
1931 test -z "$as_dir" && as_dir=.
1932 for ac_exec_ext in '' $ac_executable_extensions; do
1933 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1934 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1935 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1936 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001937 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001938done
1939done
1940
1941fi
1942fi
1943CC=$ac_cv_prog_CC
1944if test -n "$CC"; then
1945 echo "$as_me:$LINENO: result: $CC" >&5
1946echo "${ECHO_T}$CC" >&6
1947else
1948 echo "$as_me:$LINENO: result: no" >&5
1949echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001950fi
1951
Martin v. Löwis11437992002-04-12 09:54:03 +00001952 test -n "$CC" && break
1953 done
1954fi
1955if test -z "$CC"; then
1956 ac_ct_CC=$CC
1957 for ac_prog in cl
1958do
1959 # Extract the first word of "$ac_prog", so it can be a program name with args.
1960set dummy $ac_prog; ac_word=$2
1961echo "$as_me:$LINENO: checking for $ac_word" >&5
1962echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1963if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1964 echo $ECHO_N "(cached) $ECHO_C" >&6
1965else
1966 if test -n "$ac_ct_CC"; then
1967 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1968else
1969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1970for as_dir in $PATH
1971do
1972 IFS=$as_save_IFS
1973 test -z "$as_dir" && as_dir=.
1974 for ac_exec_ext in '' $ac_executable_extensions; do
1975 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1976 ac_cv_prog_ac_ct_CC="$ac_prog"
1977 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1978 break 2
1979 fi
1980done
1981done
Jack Jansendd19cf82001-12-06 22:36:17 +00001982
Martin v. Löwis11437992002-04-12 09:54:03 +00001983fi
1984fi
1985ac_ct_CC=$ac_cv_prog_ac_ct_CC
1986if test -n "$ac_ct_CC"; then
1987 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1988echo "${ECHO_T}$ac_ct_CC" >&6
1989else
1990 echo "$as_me:$LINENO: result: no" >&5
1991echo "${ECHO_T}no" >&6
1992fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001993
Martin v. Löwis11437992002-04-12 09:54:03 +00001994 test -n "$ac_ct_CC" && break
1995done
Michael W. Hudson54241132001-12-07 15:38:26 +00001996
Martin v. Löwis11437992002-04-12 09:54:03 +00001997 CC=$ac_ct_CC
1998fi
1999
2000fi
2001
2002
Skip Montanaro6dead952003-09-25 14:50:04 +00002003test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2004See \`config.log' for more details." >&5
2005echo "$as_me: error: no acceptable C compiler found in \$PATH
2006See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002007 { (exit 1); exit 1; }; }
2008
2009# Provide some information about the compiler.
2010echo "$as_me:$LINENO:" \
2011 "checking for C compiler version" >&5
2012ac_compiler=`set X $ac_compile; echo $2`
2013{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2014 (eval $ac_compiler --version </dev/null >&5) 2>&5
2015 ac_status=$?
2016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2017 (exit $ac_status); }
2018{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2019 (eval $ac_compiler -v </dev/null >&5) 2>&5
2020 ac_status=$?
2021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2022 (exit $ac_status); }
2023{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2024 (eval $ac_compiler -V </dev/null >&5) 2>&5
2025 ac_status=$?
2026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2027 (exit $ac_status); }
2028
2029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002030/* confdefs.h. */
2031_ACEOF
2032cat confdefs.h >>conftest.$ac_ext
2033cat >>conftest.$ac_ext <<_ACEOF
2034/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002035
Martin v. Löwis11437992002-04-12 09:54:03 +00002036int
2037main ()
2038{
2039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002045ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002046# Try to create an executable without -o first, disregard a.out.
2047# It will help us diagnose broken compilers, and finding out an intuition
2048# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002049echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2050echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002051ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2052if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2053 (eval $ac_link_default) 2>&5
2054 ac_status=$?
2055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2056 (exit $ac_status); }; then
2057 # Find the output, starting from the most likely. This scheme is
2058# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2059# resort.
2060
2061# Be careful to initialize this variable, since it used to be cached.
2062# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2063ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002064# b.out is created by i960 compilers.
2065for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2066do
2067 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002068 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002069 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002070 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002071 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002072 # This is the source file.
2073 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002074 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002075 # We found the default executable, but exeext='' is most
2076 # certainly right.
2077 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002078 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002079 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2080 # FIXME: I believe we export ac_cv_exeext for Libtool,
2081 # but it would be cool to find out if it's true. Does anybody
2082 # maintain Libtool? --akim.
2083 export ac_cv_exeext
2084 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002085 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002086 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002087 esac
2088done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002089else
Martin v. Löwis11437992002-04-12 09:54:03 +00002090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002091sed 's/^/| /' conftest.$ac_ext >&5
2092
2093{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2094See \`config.log' for more details." >&5
2095echo "$as_me: error: C compiler cannot create executables
2096See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002097 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002098fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002099
Martin v. Löwis11437992002-04-12 09:54:03 +00002100ac_exeext=$ac_cv_exeext
2101echo "$as_me:$LINENO: result: $ac_file" >&5
2102echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002103
Martin v. Löwis11437992002-04-12 09:54:03 +00002104# Check the compiler produces executables we can run. If not, either
2105# the compiler is broken, or we cross compile.
2106echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2107echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2108# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2109# If not cross compiling, check that we can run a simple program.
2110if test "$cross_compiling" != yes; then
2111 if { ac_try='./$ac_file'
2112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2113 (eval $ac_try) 2>&5
2114 ac_status=$?
2115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2116 (exit $ac_status); }; }; then
2117 cross_compiling=no
2118 else
2119 if test "$cross_compiling" = maybe; then
2120 cross_compiling=yes
2121 else
2122 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002123If you meant to cross compile, use \`--host'.
2124See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002125echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002126If you meant to cross compile, use \`--host'.
2127See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002128 { (exit 1); exit 1; }; }
2129 fi
2130 fi
2131fi
2132echo "$as_me:$LINENO: result: yes" >&5
2133echo "${ECHO_T}yes" >&6
2134
Skip Montanaro6dead952003-09-25 14:50:04 +00002135rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002136ac_clean_files=$ac_clean_files_save
2137# Check the compiler produces executables we can run. If not, either
2138# the compiler is broken, or we cross compile.
2139echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2140echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2141echo "$as_me:$LINENO: result: $cross_compiling" >&5
2142echo "${ECHO_T}$cross_compiling" >&6
2143
2144echo "$as_me:$LINENO: checking for suffix of executables" >&5
2145echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2147 (eval $ac_link) 2>&5
2148 ac_status=$?
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); }; then
2151 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2152# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2153# work properly (i.e., refer to `conftest.exe'), while it won't with
2154# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002155for ac_file in conftest.exe conftest conftest.*; do
2156 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002157 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002158 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002159 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002160 export ac_cv_exeext
2161 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002162 * ) break;;
2163 esac
2164done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002165else
Skip Montanaro6dead952003-09-25 14:50:04 +00002166 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2167See \`config.log' for more details." >&5
2168echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2169See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002170 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002171fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002172
Martin v. Löwis11437992002-04-12 09:54:03 +00002173rm -f conftest$ac_cv_exeext
2174echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2175echo "${ECHO_T}$ac_cv_exeext" >&6
2176
2177rm -f conftest.$ac_ext
2178EXEEXT=$ac_cv_exeext
2179ac_exeext=$EXEEXT
2180echo "$as_me:$LINENO: checking for suffix of object files" >&5
2181echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2182if test "${ac_cv_objext+set}" = set; then
2183 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002184else
Martin v. Löwis11437992002-04-12 09:54:03 +00002185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002186/* confdefs.h. */
2187_ACEOF
2188cat confdefs.h >>conftest.$ac_ext
2189cat >>conftest.$ac_ext <<_ACEOF
2190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002191
Martin v. Löwis11437992002-04-12 09:54:03 +00002192int
2193main ()
2194{
2195
2196 ;
2197 return 0;
2198}
2199_ACEOF
2200rm -f conftest.o conftest.obj
2201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2202 (eval $ac_compile) 2>&5
2203 ac_status=$?
2204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2205 (exit $ac_status); }; then
2206 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2207 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002208 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002209 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2210 break;;
2211 esac
2212done
2213else
2214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002215sed 's/^/| /' conftest.$ac_ext >&5
2216
2217{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2218See \`config.log' for more details." >&5
2219echo "$as_me: error: cannot compute suffix of object files: cannot compile
2220See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002221 { (exit 1); exit 1; }; }
2222fi
2223
2224rm -f conftest.$ac_cv_objext conftest.$ac_ext
2225fi
2226echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2227echo "${ECHO_T}$ac_cv_objext" >&6
2228OBJEXT=$ac_cv_objext
2229ac_objext=$OBJEXT
2230echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2231echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2232if test "${ac_cv_c_compiler_gnu+set}" = set; then
2233 echo $ECHO_N "(cached) $ECHO_C" >&6
2234else
2235 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002236/* confdefs.h. */
2237_ACEOF
2238cat confdefs.h >>conftest.$ac_ext
2239cat >>conftest.$ac_ext <<_ACEOF
2240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002241
Martin v. Löwis11437992002-04-12 09:54:03 +00002242int
2243main ()
2244{
2245#ifndef __GNUC__
2246 choke me
2247#endif
2248
2249 ;
2250 return 0;
2251}
2252_ACEOF
2253rm -f conftest.$ac_objext
2254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002255 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002257 grep -v '^ *+' conftest.er1 >conftest.err
2258 rm -f conftest.er1
2259 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2261 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002262 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2264 (eval $ac_try) 2>&5
2265 ac_status=$?
2266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2267 (exit $ac_status); }; } &&
2268 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2270 (eval $ac_try) 2>&5
2271 ac_status=$?
2272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273 (exit $ac_status); }; }; then
2274 ac_compiler_gnu=yes
2275else
2276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002277sed 's/^/| /' conftest.$ac_ext >&5
2278
Martin v. Löwis11437992002-04-12 09:54:03 +00002279ac_compiler_gnu=no
2280fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002281rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002282ac_cv_c_compiler_gnu=$ac_compiler_gnu
2283
2284fi
2285echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2286echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2287GCC=`test $ac_compiler_gnu = yes && echo yes`
2288ac_test_CFLAGS=${CFLAGS+set}
2289ac_save_CFLAGS=$CFLAGS
2290CFLAGS="-g"
2291echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2292echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2293if test "${ac_cv_prog_cc_g+set}" = set; then
2294 echo $ECHO_N "(cached) $ECHO_C" >&6
2295else
2296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002297/* confdefs.h. */
2298_ACEOF
2299cat confdefs.h >>conftest.$ac_ext
2300cat >>conftest.$ac_ext <<_ACEOF
2301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002302
Martin v. Löwis11437992002-04-12 09:54:03 +00002303int
2304main ()
2305{
2306
2307 ;
2308 return 0;
2309}
2310_ACEOF
2311rm -f conftest.$ac_objext
2312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002313 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002315 grep -v '^ *+' conftest.er1 >conftest.err
2316 rm -f conftest.er1
2317 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2319 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002320 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2322 (eval $ac_try) 2>&5
2323 ac_status=$?
2324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2325 (exit $ac_status); }; } &&
2326 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2328 (eval $ac_try) 2>&5
2329 ac_status=$?
2330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2331 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002332 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002333else
Martin v. Löwis11437992002-04-12 09:54:03 +00002334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002335sed 's/^/| /' conftest.$ac_ext >&5
2336
Martin v. Löwis11437992002-04-12 09:54:03 +00002337ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002338fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002339rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002340fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002341echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2342echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002343if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002344 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002345elif test $ac_cv_prog_cc_g = yes; then
2346 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002347 CFLAGS="-g -O2"
2348 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002349 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002350 fi
2351else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002352 if test "$GCC" = yes; then
2353 CFLAGS="-O2"
2354 else
2355 CFLAGS=
2356 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002357fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002358echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2359echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2360if test "${ac_cv_prog_cc_stdc+set}" = set; then
2361 echo $ECHO_N "(cached) $ECHO_C" >&6
2362else
2363 ac_cv_prog_cc_stdc=no
2364ac_save_CC=$CC
2365cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002366/* confdefs.h. */
2367_ACEOF
2368cat confdefs.h >>conftest.$ac_ext
2369cat >>conftest.$ac_ext <<_ACEOF
2370/* end confdefs.h. */
2371#include <stdarg.h>
2372#include <stdio.h>
2373#include <sys/types.h>
2374#include <sys/stat.h>
2375/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2376struct buf { int x; };
2377FILE * (*rcsopen) (struct buf *, struct stat *, int);
2378static char *e (p, i)
2379 char **p;
2380 int i;
2381{
2382 return p[i];
2383}
2384static char *f (char * (*g) (char **, int), char **p, ...)
2385{
2386 char *s;
2387 va_list v;
2388 va_start (v,p);
2389 s = g (p, va_arg (v,int));
2390 va_end (v);
2391 return s;
2392}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002393
2394/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2395 function prototypes and stuff, but not '\xHH' hex character constants.
2396 These don't provoke an error unfortunately, instead are silently treated
2397 as 'x'. The following induces an error, until -std1 is added to get
2398 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2399 array size at least. It's necessary to write '\x00'==0 to get something
2400 that's true only with -std1. */
2401int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2402
Skip Montanaro6dead952003-09-25 14:50:04 +00002403int test (int i, double x);
2404struct s1 {int (*f) (int a);};
2405struct s2 {int (*f) (double a);};
2406int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2407int argc;
2408char **argv;
2409int
2410main ()
2411{
2412return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417# Don't try gcc -ansi; that turns off useful extensions and
2418# breaks some systems' header files.
2419# AIX -qlanglvl=ansi
2420# Ultrix and OSF/1 -std1
2421# HP-UX 10.20 and later -Ae
2422# HP-UX older versions -Aa -D_HPUX_SOURCE
2423# SVR4 -Xc -D__EXTENSIONS__
2424for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2425do
2426 CC="$ac_save_CC $ac_arg"
2427 rm -f conftest.$ac_objext
2428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002429 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 grep -v '^ *+' conftest.er1 >conftest.err
2432 rm -f conftest.er1
2433 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2435 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002436 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2438 (eval $ac_try) 2>&5
2439 ac_status=$?
2440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2441 (exit $ac_status); }; } &&
2442 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2444 (eval $ac_try) 2>&5
2445 ac_status=$?
2446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2447 (exit $ac_status); }; }; then
2448 ac_cv_prog_cc_stdc=$ac_arg
2449break
2450else
2451 echo "$as_me: failed program was:" >&5
2452sed 's/^/| /' conftest.$ac_ext >&5
2453
2454fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002455rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002456done
2457rm -f conftest.$ac_ext conftest.$ac_objext
2458CC=$ac_save_CC
2459
2460fi
2461
2462case "x$ac_cv_prog_cc_stdc" in
2463 x|xno)
2464 echo "$as_me:$LINENO: result: none needed" >&5
2465echo "${ECHO_T}none needed" >&6 ;;
2466 *)
2467 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2468echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2469 CC="$CC $ac_cv_prog_cc_stdc" ;;
2470esac
2471
Martin v. Löwis11437992002-04-12 09:54:03 +00002472# Some people use a C++ compiler to compile C. Since we use `exit',
2473# in C++ we need to declare it. In case someone uses the same compiler
2474# for both compiling C and C++ we need to have the C++ compiler decide
2475# the declaration of exit, since it's the most demanding environment.
2476cat >conftest.$ac_ext <<_ACEOF
2477#ifndef __cplusplus
2478 choke me
2479#endif
2480_ACEOF
2481rm -f conftest.$ac_objext
2482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002483 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002485 grep -v '^ *+' conftest.er1 >conftest.err
2486 rm -f conftest.er1
2487 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002490 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2492 (eval $ac_try) 2>&5
2493 ac_status=$?
2494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2495 (exit $ac_status); }; } &&
2496 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2498 (eval $ac_try) 2>&5
2499 ac_status=$?
2500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2501 (exit $ac_status); }; }; then
2502 for ac_declaration in \
Skip Montanarof0d5f792004-08-15 14:08:23 +00002503 '' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 'extern "C" void std::exit (int) throw (); using std::exit;' \
2505 'extern "C" void std::exit (int); using std::exit;' \
2506 'extern "C" void exit (int) throw ();' \
2507 'extern "C" void exit (int);' \
2508 'void exit (int);'
2509do
2510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002511/* confdefs.h. */
2512_ACEOF
2513cat confdefs.h >>conftest.$ac_ext
2514cat >>conftest.$ac_ext <<_ACEOF
2515/* end confdefs.h. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002516$ac_declaration
Skip Montanarof0d5f792004-08-15 14:08:23 +00002517#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002518int
2519main ()
2520{
2521exit (42);
2522 ;
2523 return 0;
2524}
2525_ACEOF
2526rm -f conftest.$ac_objext
2527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002528 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002530 grep -v '^ *+' conftest.er1 >conftest.err
2531 rm -f conftest.er1
2532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2534 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002535 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2537 (eval $ac_try) 2>&5
2538 ac_status=$?
2539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2540 (exit $ac_status); }; } &&
2541 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2543 (eval $ac_try) 2>&5
2544 ac_status=$?
2545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2546 (exit $ac_status); }; }; then
2547 :
2548else
2549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002550sed 's/^/| /' conftest.$ac_ext >&5
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552continue
2553fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002554rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002556/* confdefs.h. */
2557_ACEOF
2558cat confdefs.h >>conftest.$ac_ext
2559cat >>conftest.$ac_ext <<_ACEOF
2560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002561$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002562int
2563main ()
2564{
2565exit (42);
2566 ;
2567 return 0;
2568}
2569_ACEOF
2570rm -f conftest.$ac_objext
2571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002572 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002574 grep -v '^ *+' conftest.er1 >conftest.err
2575 rm -f conftest.er1
2576 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2578 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002579 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2581 (eval $ac_try) 2>&5
2582 ac_status=$?
2583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2584 (exit $ac_status); }; } &&
2585 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2587 (eval $ac_try) 2>&5
2588 ac_status=$?
2589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2590 (exit $ac_status); }; }; then
2591 break
2592else
2593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002594sed 's/^/| /' conftest.$ac_ext >&5
2595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002597rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002598done
2599rm -f conftest*
2600if test -n "$ac_declaration"; then
2601 echo '#ifdef __cplusplus' >>confdefs.h
2602 echo $ac_declaration >>confdefs.h
2603 echo '#endif' >>confdefs.h
2604fi
2605
2606else
2607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002608sed 's/^/| /' conftest.$ac_ext >&5
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002612ac_ext=c
2613ac_cpp='$CPP $CPPFLAGS'
2614ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2615ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2616ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002618
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002619
2620
2621echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
2622echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6
2623
2624# Check whether --with-cxx_main or --without-cxx_main was given.
2625if test "${with_cxx_main+set}" = set; then
2626 withval="$with_cxx_main"
2627
2628
2629 case $withval in
2630 no) with_cxx_main=no
2631 MAINCC='$(CC)';;
2632 yes) with_cxx_main=yes
2633 MAINCC='$(CXX)';;
2634 *) with_cxx_main=yes
2635 MAINCC=$withval
2636 if test -z "$CXX"
2637 then
2638 CXX=$withval
2639 fi;;
2640 esac
2641else
2642
2643 with_cxx_main=no
2644 MAINCC='$(CC)'
2645
2646fi;
2647echo "$as_me:$LINENO: result: $with_cxx_main" >&5
2648echo "${ECHO_T}$with_cxx_main" >&6
2649
2650preset_cxx="$CXX"
2651if test -z "$CXX"
2652then
2653 case "$CC" in
2654 gcc) # Extract the first word of "g++", so it can be a program name with args.
2655set dummy g++; ac_word=$2
2656echo "$as_me:$LINENO: checking for $ac_word" >&5
2657echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2658if test "${ac_cv_path_CXX+set}" = set; then
2659 echo $ECHO_N "(cached) $ECHO_C" >&6
2660else
2661 case $CXX in
2662 [\\/]* | ?:[\\/]*)
2663 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2664 ;;
2665 *)
2666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2667for as_dir in notfound
2668do
2669 IFS=$as_save_IFS
2670 test -z "$as_dir" && as_dir=.
2671 for ac_exec_ext in '' $ac_executable_extensions; do
2672 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2673 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
2674 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2675 break 2
2676 fi
2677done
2678done
2679
2680 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
2681 ;;
2682esac
2683fi
2684CXX=$ac_cv_path_CXX
2685
2686if test -n "$CXX"; then
2687 echo "$as_me:$LINENO: result: $CXX" >&5
2688echo "${ECHO_T}$CXX" >&6
2689else
2690 echo "$as_me:$LINENO: result: no" >&5
2691echo "${ECHO_T}no" >&6
2692fi
2693 ;;
2694 cc) # Extract the first word of "c++", so it can be a program name with args.
2695set dummy c++; ac_word=$2
2696echo "$as_me:$LINENO: checking for $ac_word" >&5
2697echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2698if test "${ac_cv_path_CXX+set}" = set; then
2699 echo $ECHO_N "(cached) $ECHO_C" >&6
2700else
2701 case $CXX in
2702 [\\/]* | ?:[\\/]*)
2703 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2704 ;;
2705 *)
2706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2707for as_dir in notfound
2708do
2709 IFS=$as_save_IFS
2710 test -z "$as_dir" && as_dir=.
2711 for ac_exec_ext in '' $ac_executable_extensions; do
2712 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2713 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
2714 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2715 break 2
2716 fi
2717done
2718done
2719
2720 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
2721 ;;
2722esac
2723fi
2724CXX=$ac_cv_path_CXX
2725
2726if test -n "$CXX"; then
2727 echo "$as_me:$LINENO: result: $CXX" >&5
2728echo "${ECHO_T}$CXX" >&6
2729else
2730 echo "$as_me:$LINENO: result: no" >&5
2731echo "${ECHO_T}no" >&6
2732fi
2733 ;;
2734 esac
2735 if test "$CXX" = "notfound"
2736 then
2737 CXX=""
2738 fi
2739fi
2740if test -z "$CXX"
2741then
2742 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2743do
2744 # Extract the first word of "$ac_prog", so it can be a program name with args.
2745set dummy $ac_prog; ac_word=$2
2746echo "$as_me:$LINENO: checking for $ac_word" >&5
2747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2748if test "${ac_cv_prog_CXX+set}" = set; then
2749 echo $ECHO_N "(cached) $ECHO_C" >&6
2750else
2751 if test -n "$CXX"; then
2752 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2753else
2754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2755for as_dir in $PATH
2756do
2757 IFS=$as_save_IFS
2758 test -z "$as_dir" && as_dir=.
2759 for ac_exec_ext in '' $ac_executable_extensions; do
2760 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2761 ac_cv_prog_CXX="$ac_prog"
2762 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2763 break 2
2764 fi
2765done
2766done
2767
2768fi
2769fi
2770CXX=$ac_cv_prog_CXX
2771if test -n "$CXX"; then
2772 echo "$as_me:$LINENO: result: $CXX" >&5
2773echo "${ECHO_T}$CXX" >&6
2774else
2775 echo "$as_me:$LINENO: result: no" >&5
2776echo "${ECHO_T}no" >&6
2777fi
2778
2779 test -n "$CXX" && break
2780done
2781test -n "$CXX" || CXX="notfound"
2782
2783 if test "$CXX" = "notfound"
2784 then
2785 CXX=""
2786 fi
2787fi
2788if test "$preset_cxx" != "$CXX"
2789then
2790 { echo "$as_me:$LINENO: WARNING:
2791
2792 By default, distutils will build C++ extension modules with \"$CXX\".
2793 If this is not intended, then set CXX on the configure command line.
2794 " >&5
2795echo "$as_me: WARNING:
2796
2797 By default, distutils will build C++ extension modules with \"$CXX\".
2798 If this is not intended, then set CXX on the configure command line.
2799 " >&2;}
2800fi
2801
2802
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002803# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002804
2805ac_ext=c
2806ac_cpp='$CPP $CPPFLAGS'
2807ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2808ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2809ac_compiler_gnu=$ac_cv_c_compiler_gnu
2810echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2811echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002812# On Suns, sometimes $CPP names a directory.
2813if test -n "$CPP" && test -d "$CPP"; then
2814 CPP=
2815fi
2816if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002817 if test "${ac_cv_prog_CPP+set}" = set; then
2818 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002819else
Martin v. Löwis11437992002-04-12 09:54:03 +00002820 # Double quotes because CPP needs to be expanded
2821 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2822 do
2823 ac_preproc_ok=false
2824for ac_c_preproc_warn_flag in '' yes
2825do
2826 # Use a header file that comes with gcc, so configuring glibc
2827 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002828 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2829 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002830 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 # not just through cpp. "Syntax error" is here to catch this case.
2832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002833/* confdefs.h. */
2834_ACEOF
2835cat confdefs.h >>conftest.$ac_ext
2836cat >>conftest.$ac_ext <<_ACEOF
2837/* end confdefs.h. */
2838#ifdef __STDC__
2839# include <limits.h>
2840#else
2841# include <assert.h>
2842#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002843 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002844_ACEOF
2845if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2846 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2847 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002848 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002849 rm -f conftest.er1
2850 cat conftest.err >&5
2851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2852 (exit $ac_status); } >/dev/null; then
2853 if test -s conftest.err; then
2854 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002855 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002856 else
2857 ac_cpp_err=
2858 fi
2859else
2860 ac_cpp_err=yes
2861fi
2862if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002863 :
2864else
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002866sed 's/^/| /' conftest.$ac_ext >&5
2867
Martin v. Löwis11437992002-04-12 09:54:03 +00002868 # Broken: fails on valid input.
2869continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002870fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002871rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002872
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 # OK, works on sane cases. Now check whether non-existent headers
2874 # can be detected and how.
2875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002876/* confdefs.h. */
2877_ACEOF
2878cat confdefs.h >>conftest.$ac_ext
2879cat >>conftest.$ac_ext <<_ACEOF
2880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002881#include <ac_nonexistent.h>
2882_ACEOF
2883if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2884 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2885 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002886 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002887 rm -f conftest.er1
2888 cat conftest.err >&5
2889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2890 (exit $ac_status); } >/dev/null; then
2891 if test -s conftest.err; then
2892 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002893 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 else
2895 ac_cpp_err=
2896 fi
2897else
2898 ac_cpp_err=yes
2899fi
2900if test -z "$ac_cpp_err"; then
2901 # Broken: success on invalid input.
2902continue
2903else
2904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002905sed 's/^/| /' conftest.$ac_ext >&5
2906
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 # Passes both tests.
2908ac_preproc_ok=:
2909break
2910fi
2911rm -f conftest.err conftest.$ac_ext
2912
2913done
2914# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2915rm -f conftest.err conftest.$ac_ext
2916if $ac_preproc_ok; then
2917 break
2918fi
2919
2920 done
2921 ac_cv_prog_CPP=$CPP
2922
2923fi
2924 CPP=$ac_cv_prog_CPP
2925else
2926 ac_cv_prog_CPP=$CPP
2927fi
2928echo "$as_me:$LINENO: result: $CPP" >&5
2929echo "${ECHO_T}$CPP" >&6
2930ac_preproc_ok=false
2931for ac_c_preproc_warn_flag in '' yes
2932do
2933 # Use a header file that comes with gcc, so configuring glibc
2934 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002935 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2936 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 # On the NeXT, cc -E runs the code through the compiler's parser,
2938 # not just through cpp. "Syntax error" is here to catch this case.
2939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002940/* confdefs.h. */
2941_ACEOF
2942cat confdefs.h >>conftest.$ac_ext
2943cat >>conftest.$ac_ext <<_ACEOF
2944/* end confdefs.h. */
2945#ifdef __STDC__
2946# include <limits.h>
2947#else
2948# include <assert.h>
2949#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002950 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002951_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 :
2971else
2972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002973sed 's/^/| /' conftest.$ac_ext >&5
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975 # Broken: fails on valid input.
2976continue
2977fi
2978rm -f conftest.err conftest.$ac_ext
2979
2980 # OK, works on sane cases. Now check whether non-existent headers
2981 # can be detected and how.
2982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002983/* confdefs.h. */
2984_ACEOF
2985cat confdefs.h >>conftest.$ac_ext
2986cat >>conftest.$ac_ext <<_ACEOF
2987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002988#include <ac_nonexistent.h>
2989_ACEOF
2990if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2991 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2992 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002993 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002994 rm -f conftest.er1
2995 cat conftest.err >&5
2996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2997 (exit $ac_status); } >/dev/null; then
2998 if test -s conftest.err; then
2999 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003000 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 else
3002 ac_cpp_err=
3003 fi
3004else
3005 ac_cpp_err=yes
3006fi
3007if test -z "$ac_cpp_err"; then
3008 # Broken: success on invalid input.
3009continue
3010else
3011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003012sed 's/^/| /' conftest.$ac_ext >&5
3013
Martin v. Löwis11437992002-04-12 09:54:03 +00003014 # Passes both tests.
3015ac_preproc_ok=:
3016break
3017fi
3018rm -f conftest.err conftest.$ac_ext
3019
3020done
3021# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3022rm -f conftest.err conftest.$ac_ext
3023if $ac_preproc_ok; then
3024 :
3025else
Skip Montanaro6dead952003-09-25 14:50:04 +00003026 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3027See \`config.log' for more details." >&5
3028echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3029See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003030 { (exit 1); exit 1; }; }
3031fi
3032
3033ac_ext=c
3034ac_cpp='$CPP $CPPFLAGS'
3035ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3036ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3037ac_compiler_gnu=$ac_cv_c_compiler_gnu
3038
3039
Skip Montanaro6dead952003-09-25 14:50:04 +00003040echo "$as_me:$LINENO: checking for egrep" >&5
3041echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3042if test "${ac_cv_prog_egrep+set}" = set; then
3043 echo $ECHO_N "(cached) $ECHO_C" >&6
3044else
3045 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3046 then ac_cv_prog_egrep='grep -E'
3047 else ac_cv_prog_egrep='egrep'
3048 fi
3049fi
3050echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3051echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3052 EGREP=$ac_cv_prog_egrep
3053
3054
Martin v. Löwis11437992002-04-12 09:54:03 +00003055
3056echo "$as_me:$LINENO: checking for AIX" >&5
3057echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003059/* confdefs.h. */
3060_ACEOF
3061cat confdefs.h >>conftest.$ac_ext
3062cat >>conftest.$ac_ext <<_ACEOF
3063/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003064#ifdef _AIX
3065 yes
3066#endif
3067
Martin v. Löwis11437992002-04-12 09:54:03 +00003068_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003070 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003071 echo "$as_me:$LINENO: result: yes" >&5
3072echo "${ECHO_T}yes" >&6
3073cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003074#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003075_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003076
3077else
Martin v. Löwis11437992002-04-12 09:54:03 +00003078 echo "$as_me:$LINENO: result: no" >&5
3079echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003080fi
3081rm -f conftest*
3082
Michael W. Hudson54241132001-12-07 15:38:26 +00003083
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003084
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003085# Check for unsupported systems
3086case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003087Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003088 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3089 echo See README for details.
3090 exit 1;;
3091esac
3092
Michael W. Hudson54241132001-12-07 15:38:26 +00003093
Martin v. Löwis11437992002-04-12 09:54:03 +00003094echo "$as_me:$LINENO: checking for --with-suffix" >&5
3095echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003096
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003097# Check whether --with-suffix or --without-suffix was given.
3098if test "${with_suffix+set}" = set; then
3099 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003100
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003101 case $withval in
3102 no) EXEEXT=;;
3103 yes) EXEEXT=.exe;;
3104 *) EXEEXT=$withval;;
3105 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003106fi;
3107echo "$as_me:$LINENO: result: $EXEEXT" >&5
3108echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003109
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003110# Test whether we're running on a non-case-sensitive system, in which
3111# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003112
Martin v. Löwis11437992002-04-12 09:54:03 +00003113echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3114echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003115if test ! -d CaseSensitiveTestDir; then
3116mkdir CaseSensitiveTestDir
3117fi
3118
3119if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003120then
Martin v. Löwis11437992002-04-12 09:54:03 +00003121 echo "$as_me:$LINENO: result: yes" >&5
3122echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003123 BUILDEXEEXT=.exe
3124else
Martin v. Löwis11437992002-04-12 09:54:03 +00003125 echo "$as_me:$LINENO: result: no" >&5
3126echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003127 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003128fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003129rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003130
Guido van Rossumdd997f71998-10-07 19:58:26 +00003131case $MACHDEP in
3132bsdos*)
3133 case $CC in
3134 gcc) CC="$CC -D_HAVE_BSDI";;
3135 esac;;
3136esac
3137
Guido van Rossum24b1e751997-08-21 02:29:16 +00003138case $ac_sys_system in
3139hp*|HP*)
3140 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003141 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003142 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003143Monterey*)
3144 case $CC in
3145 cc) CC="$CC -Wl,-Bexport";;
3146 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003147SunOS*)
3148 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003149
3150cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003151#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003152_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003153
3154 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003155esac
3156
Michael W. Hudson54241132001-12-07 15:38:26 +00003157
3158
Martin v. Löwis11437992002-04-12 09:54:03 +00003159echo "$as_me:$LINENO: checking LIBRARY" >&5
3160echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003161if test -z "$LIBRARY"
3162then
3163 LIBRARY='libpython$(VERSION).a'
3164fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003165echo "$as_me:$LINENO: result: $LIBRARY" >&5
3166echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003167
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003168# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003169# name of the library into which to insert object files). BLDLIBRARY is also
3170# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3171# is blank as the main program is not linked directly against LDLIBRARY.
3172# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3173# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3174# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3175# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003176#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003177# RUNSHARED is used to run shared python without installed libraries
3178#
3179# INSTSONAME is the name of the shared library that will be use to install
3180# on the system - some systems like version suffix, others don't
3181
3182
Michael W. Hudson54241132001-12-07 15:38:26 +00003183
3184
3185
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003186
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003187LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003188BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003189INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003190DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003191LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003192RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003193
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003194# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003195# If CXX is set, and if it is needed to link a main function that was
3196# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3197# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003198# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003199# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003200
Martin v. Löwis11437992002-04-12 09:54:03 +00003201echo "$as_me:$LINENO: checking LINKCC" >&5
3202echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003203if test -z "$LINKCC"
3204then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003205 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003206 case $ac_sys_system in
3207 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003208 exp_extra="\"\""
3209 if test $ac_sys_release -ge 5 -o \
3210 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3211 exp_extra="."
3212 fi
3213 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003214 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003215 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003216 esac
3217fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003218echo "$as_me:$LINENO: result: $LINKCC" >&5
3219echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003220
Martin v. Löwis11437992002-04-12 09:54:03 +00003221echo "$as_me:$LINENO: checking for --enable-shared" >&5
3222echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003223# Check whether --enable-shared or --disable-shared was given.
3224if test "${enable_shared+set}" = set; then
3225 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003226
Martin v. Löwis11437992002-04-12 09:54:03 +00003227fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228
3229if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003230then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003231 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003232 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003233 enable_shared="yes";;
3234 *)
3235 enable_shared="no";;
3236 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003238echo "$as_me:$LINENO: result: $enable_shared" >&5
3239echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003240
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003241echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3242echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3243# Check whether --enable-profiling or --disable-profiling was given.
3244if test "${enable_profiling+set}" = set; then
3245 enableval="$enable_profiling"
3246 ac_save_cc="$CC"
3247 CC="$CC -pg"
3248 if test "$cross_compiling" = yes; then
3249 ac_enable_profiling="no"
3250else
3251 cat >conftest.$ac_ext <<_ACEOF
3252/* confdefs.h. */
3253_ACEOF
3254cat confdefs.h >>conftest.$ac_ext
3255cat >>conftest.$ac_ext <<_ACEOF
3256/* end confdefs.h. */
3257int main() { return 0; }
3258_ACEOF
3259rm -f conftest$ac_exeext
3260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3261 (eval $ac_link) 2>&5
3262 ac_status=$?
3263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3264 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3266 (eval $ac_try) 2>&5
3267 ac_status=$?
3268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3269 (exit $ac_status); }; }; then
3270 ac_enable_profiling="yes"
3271else
3272 echo "$as_me: program exited with status $ac_status" >&5
3273echo "$as_me: failed program was:" >&5
3274sed 's/^/| /' conftest.$ac_ext >&5
3275
3276( exit $ac_status )
3277ac_enable_profiling="no"
3278fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003279rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003280fi
3281 CC="$ac_save_cc"
3282fi;
3283echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3284echo "${ECHO_T}$ac_enable_profiling" >&6
3285
3286case "$ac_enable_profiling" in
3287 "yes")
3288 BASECFLAGS="-pg $BASECFLAGS"
3289 LDFLAGS="-pg $LDFLAGS"
3290 ;;
3291esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003292
Martin v. Löwis11437992002-04-12 09:54:03 +00003293echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3294echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003295
Guido van Rossumb8552162001-09-05 14:58:11 +00003296# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3297# library that we build, but we do not want to link against it (we
3298# will find it with a -framework option). For this reason there is an
3299# extra variable BLDLIBRARY against which Python and the extension
3300# modules are linked, BLDLIBRARY. This is normally the same as
3301# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003302if test "$enable_framework"
3303then
3304 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003305 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003306 BLDLIBRARY=''
3307else
3308 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003309fi
Jack Jansene578a632001-08-15 01:27:14 +00003310
Martin v. Löwis1142de32002-03-29 16:28:31 +00003311# Other platforms follow
3312if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003313
3314cat >>confdefs.h <<\_ACEOF
3315#define Py_ENABLE_SHARED 1
3316_ACEOF
3317
Martin v. Löwis1142de32002-03-29 16:28:31 +00003318 case $ac_sys_system in
3319 BeOS*)
3320 LDLIBRARY='libpython$(VERSION).so'
3321 ;;
3322 CYGWIN*)
3323 LDLIBRARY='libpython$(VERSION).dll.a'
3324 DLLLIBRARY='libpython$(VERSION).dll'
3325 ;;
3326 SunOS*)
3327 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003328 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003329 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003330 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003331 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00003332 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003333 LDLIBRARY='libpython$(VERSION).so'
3334 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003335 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003336 case $ac_sys_system in
3337 FreeBSD*)
3338 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3339 ;;
3340 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003341 INSTSONAME="$LDLIBRARY".$SOVERSION
3342 ;;
3343 hp*|HP*)
3344 LDLIBRARY='libpython$(VERSION).sl'
3345 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003346 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003347 ;;
3348 OSF*)
3349 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00003350 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003351 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003352 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003353 atheos*)
3354 LDLIBRARY='libpython$(VERSION).so'
3355 BLDLIBRARY='-L. -lpython$(VERSION)'
3356 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3357 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003358 esac
Jason Tishler30765592003-09-04 11:04:06 +00003359else # shared is disabled
3360 case $ac_sys_system in
3361 CYGWIN*)
3362 BLDLIBRARY='$(LIBRARY)'
3363 LDLIBRARY='libpython$(VERSION).dll.a'
3364 ;;
3365 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003366fi
3367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3369echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003370
Martin v. Löwis11437992002-04-12 09:54:03 +00003371if test -n "$ac_tool_prefix"; then
3372 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3373set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3374echo "$as_me:$LINENO: checking for $ac_word" >&5
3375echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3376if test "${ac_cv_prog_RANLIB+set}" = set; then
3377 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003378else
3379 if test -n "$RANLIB"; then
3380 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3381else
Martin v. Löwis11437992002-04-12 09:54:03 +00003382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3383for as_dir in $PATH
3384do
3385 IFS=$as_save_IFS
3386 test -z "$as_dir" && as_dir=.
3387 for ac_exec_ext in '' $ac_executable_extensions; do
3388 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3389 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3390 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3391 break 2
3392 fi
3393done
3394done
3395
Guido van Rossum627b2d71993-12-24 10:39:16 +00003396fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003397fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003398RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003399if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 echo "$as_me:$LINENO: result: $RANLIB" >&5
3401echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003402else
Martin v. Löwis11437992002-04-12 09:54:03 +00003403 echo "$as_me:$LINENO: result: no" >&5
3404echo "${ECHO_T}no" >&6
3405fi
3406
3407fi
3408if test -z "$ac_cv_prog_RANLIB"; then
3409 ac_ct_RANLIB=$RANLIB
3410 # Extract the first word of "ranlib", so it can be a program name with args.
3411set dummy ranlib; ac_word=$2
3412echo "$as_me:$LINENO: checking for $ac_word" >&5
3413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3414if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3415 echo $ECHO_N "(cached) $ECHO_C" >&6
3416else
3417 if test -n "$ac_ct_RANLIB"; then
3418 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3419else
3420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421for as_dir in $PATH
3422do
3423 IFS=$as_save_IFS
3424 test -z "$as_dir" && as_dir=.
3425 for ac_exec_ext in '' $ac_executable_extensions; do
3426 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3427 ac_cv_prog_ac_ct_RANLIB="ranlib"
3428 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3429 break 2
3430 fi
3431done
3432done
3433
3434 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3435fi
3436fi
3437ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3438if test -n "$ac_ct_RANLIB"; then
3439 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3440echo "${ECHO_T}$ac_ct_RANLIB" >&6
3441else
3442 echo "$as_me:$LINENO: result: no" >&5
3443echo "${ECHO_T}no" >&6
3444fi
3445
3446 RANLIB=$ac_ct_RANLIB
3447else
3448 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003449fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003450
3451
Guido van Rossum7f43da71994-08-01 12:15:30 +00003452for ac_prog in ar aal
3453do
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003455set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003456echo "$as_me:$LINENO: checking for $ac_word" >&5
3457echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3458if test "${ac_cv_prog_AR+set}" = set; then
3459 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003460else
3461 if test -n "$AR"; then
3462 ac_cv_prog_AR="$AR" # Let the user override the test.
3463else
Martin v. Löwis11437992002-04-12 09:54:03 +00003464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3465for as_dir in $PATH
3466do
3467 IFS=$as_save_IFS
3468 test -z "$as_dir" && as_dir=.
3469 for ac_exec_ext in '' $ac_executable_extensions; do
3470 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3471 ac_cv_prog_AR="$ac_prog"
3472 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3473 break 2
3474 fi
3475done
3476done
3477
Guido van Rossum7f43da71994-08-01 12:15:30 +00003478fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003479fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003480AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003481if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 echo "$as_me:$LINENO: result: $AR" >&5
3483echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003484else
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 echo "$as_me:$LINENO: result: no" >&5
3486echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003487fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003488
Martin v. Löwis11437992002-04-12 09:54:03 +00003489 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003490done
3491test -n "$AR" || AR="ar"
3492
Michael W. Hudson54241132001-12-07 15:38:26 +00003493
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003494
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003495# Extract the first word of "svnversion", so it can be a program name with args.
3496set dummy svnversion; ac_word=$2
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003497echo "$as_me:$LINENO: checking for $ac_word" >&5
3498echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3499if test "${ac_cv_prog_SVNVERSION+set}" = set; then
3500 echo $ECHO_N "(cached) $ECHO_C" >&6
3501else
3502 if test -n "$SVNVERSION"; then
3503 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
3504else
3505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506for as_dir in $PATH
3507do
3508 IFS=$as_save_IFS
3509 test -z "$as_dir" && as_dir=.
3510 for ac_exec_ext in '' $ac_executable_extensions; do
3511 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003512 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003513 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3514 break 2
3515 fi
3516done
3517done
3518
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003519 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003520fi
3521fi
3522SVNVERSION=$ac_cv_prog_SVNVERSION
3523if test -n "$SVNVERSION"; then
3524 echo "$as_me:$LINENO: result: $SVNVERSION" >&5
3525echo "${ECHO_T}$SVNVERSION" >&6
3526else
3527 echo "$as_me:$LINENO: result: no" >&5
3528echo "${ECHO_T}no" >&6
3529fi
3530
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003531if test $SVNVERSION = found
3532then
3533 SVNVERSION="svnversion \$(srcdir)"
3534else
3535 SVNVERSION="echo exported"
3536fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003537
Neil Schemenauera42c8272001-03-31 00:01:55 +00003538case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003539bsdos*|hp*|HP*)
3540 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003541 if test -z "$INSTALL"
3542 then
3543 INSTALL="${srcdir}/install-sh -c"
3544 fi
3545esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003546ac_aux_dir=
3547for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3548 if test -f $ac_dir/install-sh; then
3549 ac_aux_dir=$ac_dir
3550 ac_install_sh="$ac_aux_dir/install-sh -c"
3551 break
3552 elif test -f $ac_dir/install.sh; then
3553 ac_aux_dir=$ac_dir
3554 ac_install_sh="$ac_aux_dir/install.sh -c"
3555 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 elif test -f $ac_dir/shtool; then
3557 ac_aux_dir=$ac_dir
3558 ac_install_sh="$ac_aux_dir/shtool install -c"
3559 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003560 fi
3561done
3562if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3564echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3565 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003567ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3568ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3569ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003570
3571# Find a good install program. We prefer a C program (faster),
3572# so one script is as good as another. But avoid the broken or
3573# incompatible versions:
3574# SysV /etc/install, /usr/sbin/install
3575# SunOS /usr/etc/install
3576# IRIX /sbin/install
3577# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003578# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003579# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3580# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3581# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003582# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003583# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003584echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3585echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003586if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003587if test "${ac_cv_path_install+set}" = set; then
3588 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003589else
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH
3592do
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
3595 # Account for people who put trailing slashes in PATH elements.
3596case $as_dir/ in
3597 ./ | .// | /cC/* | \
3598 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003599 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 /usr/ucb/* ) ;;
3601 *)
3602 # OSF1 and SCO ODT 3.0 have their own names for install.
3603 # Don't use installbsd from OSF since it installs stuff as root
3604 # by default.
3605 for ac_prog in ginstall scoinst install; do
3606 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003607 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3608 if test $ac_prog = install &&
3609 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3610 # AIX install. It has an incompatible calling convention.
3611 :
3612 elif test $ac_prog = install &&
3613 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3614 # program-specific install script used by HP pwplus--don't use.
3615 :
3616 else
3617 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3618 break 3
3619 fi
3620 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003621 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 done
3623 ;;
3624esac
3625done
3626
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003627
3628fi
3629 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003631 else
3632 # As a last resort, use the slow shell script. We don't cache a
3633 # path for INSTALL within a source directory, because that will
3634 # break other packages using the cache if that directory is
3635 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003637 fi
3638fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003639echo "$as_me:$LINENO: result: $INSTALL" >&5
3640echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003641
3642# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3643# It thinks the first close brace ends the variable substitution.
3644test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003647
3648test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3649
Michael W. Hudson54241132001-12-07 15:38:26 +00003650
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003651# Not every filesystem supports hard links
3652
3653if test -z "$LN" ; then
3654 case $ac_sys_system in
3655 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003656 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003657 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003658 *) LN=ln;;
3659 esac
3660fi
3661
Fred Drake109d9862001-07-11 06:27:56 +00003662# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003663echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3664echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3665
Fred Drake109d9862001-07-11 06:27:56 +00003666# Check whether --with-pydebug or --without-pydebug was given.
3667if test "${with_pydebug+set}" = set; then
3668 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003669
Fred Drake109d9862001-07-11 06:27:56 +00003670if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003671then
3672
3673cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003674#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003675_ACEOF
3676
3677 echo "$as_me:$LINENO: result: yes" >&5
3678echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003679 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else echo "$as_me:$LINENO: result: no" >&5
3681echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003682fi
3683else
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 echo "$as_me:$LINENO: result: no" >&5
3685echo "${ECHO_T}no" >&6
3686fi;
Fred Drake109d9862001-07-11 06:27:56 +00003687
Skip Montanarodecc6a42003-01-01 20:07:49 +00003688# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3689# merged with this chunk of code?
3690
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003691# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003692# ------------------------
3693# (The following bit of code is complicated enough - please keep things
3694# indented properly. Just pretend you're editing Python code. ;-)
3695
3696# There are two parallel sets of case statements below, one that checks to
3697# see if OPT was set and one that does BASECFLAGS setting based upon
3698# compiler and platform. BASECFLAGS tweaks need to be made even if the
3699# user set OPT.
3700
3701# tweak OPT based on compiler and platform, only if the user didn't set
3702# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003703
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003704if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003705then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003706 case $GCC in
3707 yes)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003708 if test "$CC" != 'g++' ; then
3709 STRICT_PROTO="-Wstrict-prototypes"
3710 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003711 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003712 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003713 if test "$Py_DEBUG" = 'true' ; then
3714 # Optimization messes up debuggers, so turn it off for
3715 # debug builds.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003716 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00003717 else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003718 OPT="-g -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003719 fi
3720 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003721 *)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003722 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003723 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003724 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003725 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003726 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3727 ;;
3728 esac
Fred Drake109d9862001-07-11 06:27:56 +00003729 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003730
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003731 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003732 OPT="-O"
3733 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003734 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003735
3736 # The current (beta) Monterey compiler dies with optimizations
3737 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003738 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003739 Monterey*)
3740 OPT=""
3741 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003742 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003743
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003744fi
3745
Skip Montanarodecc6a42003-01-01 20:07:49 +00003746
3747# tweak BASECFLAGS based on compiler and platform
3748case $GCC in
3749yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003750 # Python violates C99 rules, by casting between incompatible
3751 # pointer types. GCC may generate bad code as a result of that,
3752 # so use -fno-strict-aliasing if supported.
3753 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3754echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3755 ac_save_cc="$CC"
3756 CC="$CC -fno-strict-aliasing"
3757 if test "$cross_compiling" = yes; then
3758 ac_cv_no_strict_aliasing_ok=no
3759else
3760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003761/* confdefs.h. */
3762_ACEOF
3763cat confdefs.h >>conftest.$ac_ext
3764cat >>conftest.$ac_ext <<_ACEOF
3765/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003766int main() { return 0; }
3767_ACEOF
3768rm -f conftest$ac_exeext
3769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3770 (eval $ac_link) 2>&5
3771 ac_status=$?
3772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3775 (eval $ac_try) 2>&5
3776 ac_status=$?
3777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3778 (exit $ac_status); }; }; then
3779 ac_cv_no_strict_aliasing_ok=yes
3780else
3781 echo "$as_me: program exited with status $ac_status" >&5
3782echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003783sed 's/^/| /' conftest.$ac_ext >&5
3784
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003785( exit $ac_status )
3786ac_cv_no_strict_aliasing_ok=no
3787fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003788rm -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 +00003789fi
3790 CC="$ac_save_cc"
3791 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3792echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3793 if test $ac_cv_no_strict_aliasing_ok = yes
3794 then
3795 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3796 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003797 case $ac_sys_system in
3798 SCO_SV*)
3799 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3800 ;;
3801 # is there any other compiler on Darwin besides gcc?
3802 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003803 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003804 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003805 OSF*)
3806 BASECFLAGS="$BASECFLAGS -mieee"
3807 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003808 esac
3809 ;;
3810
3811*)
3812 case $ac_sys_system in
3813 OpenUNIX*|UnixWare*)
3814 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3815 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003816 OSF*)
3817 BASECFLAGS="$BASECFLAGS -ieee -std"
3818 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003819 SCO_SV*)
3820 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3821 ;;
3822 esac
3823 ;;
3824esac
3825
Fred Drakee1ceaa02001-12-04 20:55:47 +00003826if test "$Py_DEBUG" = 'true'; then
3827 :
3828else
3829 OPT="-DNDEBUG $OPT"
3830fi
3831
Guido van Rossum563e7081996-09-10 18:20:48 +00003832if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003833then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003834 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003835fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003836
Neal Norwitz020c46a2006-01-07 21:39:28 +00003837# disable check for icc since it seems to pass, but generates a warning
3838if test "$CC" = icc
3839then
3840 ac_cv_opt_olimit_ok=no
3841fi
3842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3844echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3845if test "${ac_cv_opt_olimit_ok+set}" = set; then
3846 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003847else
3848 ac_save_cc="$CC"
3849CC="$CC -OPT:Olimit=0"
3850if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003851 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003852else
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003854/* confdefs.h. */
3855_ACEOF
3856cat confdefs.h >>conftest.$ac_ext
3857cat >>conftest.$ac_ext <<_ACEOF
3858/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003859int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003860_ACEOF
3861rm -f conftest$ac_exeext
3862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3863 (eval $ac_link) 2>&5
3864 ac_status=$?
3865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3868 (eval $ac_try) 2>&5
3869 ac_status=$?
3870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3871 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003872 ac_cv_opt_olimit_ok=yes
3873else
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 echo "$as_me: program exited with status $ac_status" >&5
3875echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003876sed 's/^/| /' conftest.$ac_ext >&5
3877
Martin v. Löwis11437992002-04-12 09:54:03 +00003878( exit $ac_status )
3879ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003880fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003881rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003882fi
Guido van Rossum91922671997-10-09 20:24:13 +00003883CC="$ac_save_cc"
3884fi
3885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3887echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003888if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003889 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003890 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3891 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3892 # environment?
3893 Darwin*)
3894 ;;
3895 *)
3896 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3897 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003898 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003899else
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3901echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3902 if test "${ac_cv_olimit_ok+set}" = set; then
3903 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003904else
3905 ac_save_cc="$CC"
3906 CC="$CC -Olimit 1500"
3907 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003908 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003909else
Martin v. Löwis11437992002-04-12 09:54:03 +00003910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003911/* confdefs.h. */
3912_ACEOF
3913cat confdefs.h >>conftest.$ac_ext
3914cat >>conftest.$ac_ext <<_ACEOF
3915/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003916int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003917_ACEOF
3918rm -f conftest$ac_exeext
3919if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3920 (eval $ac_link) 2>&5
3921 ac_status=$?
3922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3923 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3925 (eval $ac_try) 2>&5
3926 ac_status=$?
3927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3928 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003929 ac_cv_olimit_ok=yes
3930else
Martin v. Löwis11437992002-04-12 09:54:03 +00003931 echo "$as_me: program exited with status $ac_status" >&5
3932echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003933sed 's/^/| /' conftest.$ac_ext >&5
3934
Martin v. Löwis11437992002-04-12 09:54:03 +00003935( exit $ac_status )
3936ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003937fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003938rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003939fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003940 CC="$ac_save_cc"
3941fi
3942
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3944echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003945 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003946 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003947 fi
3948fi
3949
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003950# On some compilers, pthreads are available without further options
3951# (e.g. MacOS X). On some of these systems, the compiler will not
3952# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3953# So we have to see first whether pthreads are available without
3954# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003955echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3956echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3957if test "${ac_cv_pthread_is_default+set}" = set; then
3958 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003959else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003960 if test "$cross_compiling" = yes; then
3961 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003962else
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003964/* confdefs.h. */
3965_ACEOF
3966cat confdefs.h >>conftest.$ac_ext
3967cat >>conftest.$ac_ext <<_ACEOF
3968/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003969
Martin v. Löwis130fb172001-07-19 11:00:41 +00003970#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003971
3972void* routine(void* p){return NULL;}
3973
3974int main(){
3975 pthread_t p;
3976 if(pthread_create(&p,NULL,routine,NULL)!=0)
3977 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003978 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003979 return 0;
3980}
3981
Martin v. Löwis11437992002-04-12 09:54:03 +00003982_ACEOF
3983rm -f conftest$ac_exeext
3984if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3985 (eval $ac_link) 2>&5
3986 ac_status=$?
3987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3988 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3990 (eval $ac_try) 2>&5
3991 ac_status=$?
3992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003994
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003995 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003996 ac_cv_kthread=no
3997 ac_cv_pthread=no
3998
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003999else
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 echo "$as_me: program exited with status $ac_status" >&5
4001echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004002sed 's/^/| /' conftest.$ac_ext >&5
4003
Martin v. Löwis11437992002-04-12 09:54:03 +00004004( exit $ac_status )
4005ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004006fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004007rm -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 +00004008fi
4009
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004010fi
4011
Martin v. Löwis11437992002-04-12 09:54:03 +00004012echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4013echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004014
Michael W. Hudson54241132001-12-07 15:38:26 +00004015
Martin v. Löwis11437992002-04-12 09:54:03 +00004016if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004017then
4018 ac_cv_kpthread=no
4019else
4020# -Kpthread, if available, provides the right #defines
4021# and linker options to make pthread_create available
4022# Some compilers won't report that they do not support -Kpthread,
4023# so we need to run a program to see whether it really made the
4024# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004025echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4026echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4027if test "${ac_cv_kpthread+set}" = set; then
4028 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004029else
4030 ac_save_cc="$CC"
4031CC="$CC -Kpthread"
4032if test "$cross_compiling" = yes; then
4033 ac_cv_kpthread=no
4034else
Martin v. Löwis11437992002-04-12 09:54:03 +00004035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004036/* confdefs.h. */
4037_ACEOF
4038cat confdefs.h >>conftest.$ac_ext
4039cat >>conftest.$ac_ext <<_ACEOF
4040/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004041
4042#include <pthread.h>
4043
4044void* routine(void* p){return NULL;}
4045
4046int main(){
4047 pthread_t p;
4048 if(pthread_create(&p,NULL,routine,NULL)!=0)
4049 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004050 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004051 return 0;
4052}
4053
Martin v. Löwis11437992002-04-12 09:54:03 +00004054_ACEOF
4055rm -f conftest$ac_exeext
4056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4057 (eval $ac_link) 2>&5
4058 ac_status=$?
4059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4062 (eval $ac_try) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004066 ac_cv_kpthread=yes
4067else
Martin v. Löwis11437992002-04-12 09:54:03 +00004068 echo "$as_me: program exited with status $ac_status" >&5
4069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004070sed 's/^/| /' conftest.$ac_ext >&5
4071
Martin v. Löwis11437992002-04-12 09:54:03 +00004072( exit $ac_status )
4073ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004074fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004075rm -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 +00004076fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004077CC="$ac_save_cc"
4078fi
4079
Martin v. Löwis11437992002-04-12 09:54:03 +00004080echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4081echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004082fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004083
Skip Montanarod8d39a02003-07-10 20:44:10 +00004084if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004085then
4086# -Kthread, if available, provides the right #defines
4087# and linker options to make pthread_create available
4088# Some compilers won't report that they do not support -Kthread,
4089# so we need to run a program to see whether it really made the
4090# function available.
4091echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4092echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4093if test "${ac_cv_kthread+set}" = set; then
4094 echo $ECHO_N "(cached) $ECHO_C" >&6
4095else
4096 ac_save_cc="$CC"
4097CC="$CC -Kthread"
4098if test "$cross_compiling" = yes; then
4099 ac_cv_kthread=no
4100else
4101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004102/* confdefs.h. */
4103_ACEOF
4104cat confdefs.h >>conftest.$ac_ext
4105cat >>conftest.$ac_ext <<_ACEOF
4106/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004107
4108#include <pthread.h>
4109
4110void* routine(void* p){return NULL;}
4111
4112int main(){
4113 pthread_t p;
4114 if(pthread_create(&p,NULL,routine,NULL)!=0)
4115 return 1;
4116 (void)pthread_detach(p);
4117 return 0;
4118}
4119
4120_ACEOF
4121rm -f conftest$ac_exeext
4122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4123 (eval $ac_link) 2>&5
4124 ac_status=$?
4125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4128 (eval $ac_try) 2>&5
4129 ac_status=$?
4130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4131 (exit $ac_status); }; }; then
4132 ac_cv_kthread=yes
4133else
4134 echo "$as_me: program exited with status $ac_status" >&5
4135echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004136sed 's/^/| /' conftest.$ac_ext >&5
4137
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004138( exit $ac_status )
4139ac_cv_kthread=no
4140fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004141rm -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 +00004142fi
4143CC="$ac_save_cc"
4144fi
4145
4146echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4147echo "${ECHO_T}$ac_cv_kthread" >&6
4148fi
4149
Skip Montanarod8d39a02003-07-10 20:44:10 +00004150if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004151then
4152# -pthread, if available, provides the right #defines
4153# and linker options to make pthread_create available
4154# Some compilers won't report that they do not support -pthread,
4155# so we need to run a program to see whether it really made the
4156# function available.
4157echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4158echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4159if test "${ac_cv_thread+set}" = set; then
4160 echo $ECHO_N "(cached) $ECHO_C" >&6
4161else
4162 ac_save_cc="$CC"
4163CC="$CC -pthread"
4164if test "$cross_compiling" = yes; then
4165 ac_cv_pthread=no
4166else
4167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004168/* confdefs.h. */
4169_ACEOF
4170cat confdefs.h >>conftest.$ac_ext
4171cat >>conftest.$ac_ext <<_ACEOF
4172/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004173
4174#include <pthread.h>
4175
4176void* routine(void* p){return NULL;}
4177
4178int main(){
4179 pthread_t p;
4180 if(pthread_create(&p,NULL,routine,NULL)!=0)
4181 return 1;
4182 (void)pthread_detach(p);
4183 return 0;
4184}
4185
4186_ACEOF
4187rm -f conftest$ac_exeext
4188if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4189 (eval $ac_link) 2>&5
4190 ac_status=$?
4191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4194 (eval $ac_try) 2>&5
4195 ac_status=$?
4196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197 (exit $ac_status); }; }; then
4198 ac_cv_pthread=yes
4199else
4200 echo "$as_me: program exited with status $ac_status" >&5
4201echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004202sed 's/^/| /' conftest.$ac_ext >&5
4203
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004204( exit $ac_status )
4205ac_cv_pthread=no
4206fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004207rm -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 +00004208fi
4209CC="$ac_save_cc"
4210fi
4211
4212echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4213echo "${ECHO_T}$ac_cv_pthread" >&6
4214fi
4215
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004216# If we have set a CC compiler flag for thread support then
4217# check if it works for CXX, too.
4218ac_cv_cxx_thread=no
4219if test ! -z "$CXX"
4220then
4221echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4222echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4223ac_save_cxx="$CXX"
4224
4225if test "$ac_cv_kpthread" = "yes"
4226then
4227 CXX="$CXX -Kpthread"
4228 ac_cv_cxx_thread=yes
4229elif test "$ac_cv_kthread" = "yes"
4230then
4231 CXX="$CXX -Kthread"
4232 ac_cv_cxx_thread=yes
4233elif test "$ac_cv_pthread" = "yes"
4234then
4235 CXX="$CXX -pthread"
4236 ac_cv_cxx_thread=yes
4237fi
4238
4239if test $ac_cv_cxx_thread = yes
4240then
4241 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4242 $CXX -c conftest.$ac_ext 2>&5
4243 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4244 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4245 then
4246 ac_cv_cxx_thread=yes
4247 else
4248 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004249 fi
4250 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004251fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004252echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4253echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004254fi
4255CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004256
Michael W. Hudson54241132001-12-07 15:38:26 +00004257
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004258# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004259echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4260echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4261if test "${ac_cv_header_stdc+set}" = set; then
4262 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004265/* confdefs.h. */
4266_ACEOF
4267cat confdefs.h >>conftest.$ac_ext
4268cat >>conftest.$ac_ext <<_ACEOF
4269/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004270#include <stdlib.h>
4271#include <stdarg.h>
4272#include <string.h>
4273#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004274
Skip Montanaro6dead952003-09-25 14:50:04 +00004275int
4276main ()
4277{
4278
4279 ;
4280 return 0;
4281}
Martin v. Löwis11437992002-04-12 09:54:03 +00004282_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004283rm -f conftest.$ac_objext
4284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004285 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287 grep -v '^ *+' conftest.er1 >conftest.err
4288 rm -f conftest.er1
4289 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004291 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004292 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4294 (eval $ac_try) 2>&5
4295 ac_status=$?
4296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4297 (exit $ac_status); }; } &&
4298 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4300 (eval $ac_try) 2>&5
4301 ac_status=$?
4302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4303 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304 ac_cv_header_stdc=yes
4305else
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004307sed 's/^/| /' conftest.$ac_ext >&5
4308
4309ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004310fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004312
4313if test $ac_cv_header_stdc = yes; then
4314 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004316/* confdefs.h. */
4317_ACEOF
4318cat confdefs.h >>conftest.$ac_ext
4319cat >>conftest.$ac_ext <<_ACEOF
4320/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004322
4323_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004325 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004326 :
4327else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328 ac_cv_header_stdc=no
4329fi
4330rm -f conftest*
4331
4332fi
4333
4334if test $ac_cv_header_stdc = yes; then
4335 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004337/* confdefs.h. */
4338_ACEOF
4339cat confdefs.h >>conftest.$ac_ext
4340cat >>conftest.$ac_ext <<_ACEOF
4341/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004342#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004343
4344_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004346 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347 :
4348else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004349 ac_cv_header_stdc=no
4350fi
4351rm -f conftest*
4352
4353fi
4354
4355if test $ac_cv_header_stdc = yes; then
4356 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004357 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004358 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004359else
Martin v. Löwis11437992002-04-12 09:54:03 +00004360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004361/* confdefs.h. */
4362_ACEOF
4363cat confdefs.h >>conftest.$ac_ext
4364cat >>conftest.$ac_ext <<_ACEOF
4365/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004366#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004367#if ((' ' & 0x0FF) == 0x020)
4368# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4369# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4370#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004371# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004372 (('a' <= (c) && (c) <= 'i') \
4373 || ('j' <= (c) && (c) <= 'r') \
4374 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004375# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4376#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004377
Martin v. Löwis11437992002-04-12 09:54:03 +00004378#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4379int
4380main ()
4381{
4382 int i;
4383 for (i = 0; i < 256; i++)
4384 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004385 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004386 exit(2);
4387 exit (0);
4388}
4389_ACEOF
4390rm -f conftest$ac_exeext
4391if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4392 (eval $ac_link) 2>&5
4393 ac_status=$?
4394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4397 (eval $ac_try) 2>&5
4398 ac_status=$?
4399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004401 :
4402else
Martin v. Löwis11437992002-04-12 09:54:03 +00004403 echo "$as_me: program exited with status $ac_status" >&5
4404echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004405sed 's/^/| /' conftest.$ac_ext >&5
4406
Martin v. Löwis11437992002-04-12 09:54:03 +00004407( exit $ac_status )
4408ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004409fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004410rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004411fi
4412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004413fi
4414echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4415echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004416if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004417
4418cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004419#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004420_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004421
4422fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004423
Skip Montanarob9820a32004-01-17 00:16:12 +00004424# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004435 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004436do
4437as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4438echo "$as_me:$LINENO: checking for $ac_header" >&5
4439echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4440if eval "test \"\${$as_ac_Header+set}\" = set"; then
4441 echo $ECHO_N "(cached) $ECHO_C" >&6
4442else
4443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004444/* confdefs.h. */
4445_ACEOF
4446cat confdefs.h >>conftest.$ac_ext
4447cat >>conftest.$ac_ext <<_ACEOF
4448/* end confdefs.h. */
4449$ac_includes_default
4450
4451#include <$ac_header>
4452_ACEOF
4453rm -f conftest.$ac_objext
4454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004455 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004457 grep -v '^ *+' conftest.er1 >conftest.err
4458 rm -f conftest.er1
4459 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4461 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004462 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4464 (eval $ac_try) 2>&5
4465 ac_status=$?
4466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4467 (exit $ac_status); }; } &&
4468 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4470 (eval $ac_try) 2>&5
4471 ac_status=$?
4472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4473 (exit $ac_status); }; }; then
4474 eval "$as_ac_Header=yes"
4475else
4476 echo "$as_me: failed program was:" >&5
4477sed 's/^/| /' conftest.$ac_ext >&5
4478
4479eval "$as_ac_Header=no"
4480fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004482fi
4483echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4484echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4485if test `eval echo '${'$as_ac_Header'}'` = yes; then
4486 cat >>confdefs.h <<_ACEOF
4487#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4488_ACEOF
4489
4490fi
4491
4492done
4493
4494
Martin v. Löwis11437992002-04-12 09:54:03 +00004495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
Anthony Baxter8a560de2004-10-13 15:30:56 +00004531
Martin v. Löwisc3001752005-01-23 09:27:24 +00004532
Martin v. Löwis11017b12006-01-14 18:12:57 +00004533
4534for ac_header in asm/types.h curses.h dlfcn.h fcntl.h grp.h \
4535shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004536stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004537unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004538sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4539sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004540sys/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 +00004541sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004542sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4543bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004544do
Martin v. Löwis11437992002-04-12 09:54:03 +00004545as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4546if eval "test \"\${$as_ac_Header+set}\" = set"; then
4547 echo "$as_me:$LINENO: checking for $ac_header" >&5
4548echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4549if eval "test \"\${$as_ac_Header+set}\" = set"; then
4550 echo $ECHO_N "(cached) $ECHO_C" >&6
4551fi
4552echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4553echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554else
Martin v. Löwis11437992002-04-12 09:54:03 +00004555 # Is the header compilable?
4556echo "$as_me:$LINENO: checking $ac_header usability" >&5
4557echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004559/* confdefs.h. */
4560_ACEOF
4561cat confdefs.h >>conftest.$ac_ext
4562cat >>conftest.$ac_ext <<_ACEOF
4563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004564$ac_includes_default
4565#include <$ac_header>
4566_ACEOF
4567rm -f conftest.$ac_objext
4568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004569 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004571 grep -v '^ *+' conftest.er1 >conftest.err
4572 rm -f conftest.er1
4573 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4575 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004576 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4578 (eval $ac_try) 2>&5
4579 ac_status=$?
4580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4581 (exit $ac_status); }; } &&
4582 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4584 (eval $ac_try) 2>&5
4585 ac_status=$?
4586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4587 (exit $ac_status); }; }; then
4588 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004589else
Martin v. Löwis11437992002-04-12 09:54:03 +00004590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004591sed 's/^/| /' conftest.$ac_ext >&5
4592
Martin v. Löwis11437992002-04-12 09:54:03 +00004593ac_header_compiler=no
4594fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004595rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004596echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4597echo "${ECHO_T}$ac_header_compiler" >&6
4598
4599# Is the header present?
4600echo "$as_me:$LINENO: checking $ac_header presence" >&5
4601echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004603/* confdefs.h. */
4604_ACEOF
4605cat confdefs.h >>conftest.$ac_ext
4606cat >>conftest.$ac_ext <<_ACEOF
4607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004608#include <$ac_header>
4609_ACEOF
4610if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4611 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4612 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004613 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004614 rm -f conftest.er1
4615 cat conftest.err >&5
4616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617 (exit $ac_status); } >/dev/null; then
4618 if test -s conftest.err; then
4619 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004620 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004621 else
4622 ac_cpp_err=
4623 fi
4624else
4625 ac_cpp_err=yes
4626fi
4627if test -z "$ac_cpp_err"; then
4628 ac_header_preproc=yes
4629else
4630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004631sed 's/^/| /' conftest.$ac_ext >&5
4632
Martin v. Löwis11437992002-04-12 09:54:03 +00004633 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004634fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004635rm -f conftest.err conftest.$ac_ext
4636echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4637echo "${ECHO_T}$ac_header_preproc" >&6
4638
4639# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004640case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4641 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004642 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4643echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004644 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4645echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4646 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004647 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004648 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004649 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4650echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004651 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4652echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4653 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4654echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4655 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4656echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004657 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4658echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004659 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4660echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004661 (
4662 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004663## ------------------------------------------------ ##
4664## Report this to http://www.python.org/python-bugs ##
4665## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004666_ASBOX
4667 ) |
4668 sed "s/^/$as_me: WARNING: /" >&2
4669 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004670esac
4671echo "$as_me:$LINENO: checking for $ac_header" >&5
4672echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4673if eval "test \"\${$as_ac_Header+set}\" = set"; then
4674 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004675else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004676 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004677fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004678echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4679echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4680
4681fi
4682if test `eval echo '${'$as_ac_Header'}'` = yes; then
4683 cat >>confdefs.h <<_ACEOF
4684#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4685_ACEOF
4686
4687fi
4688
Guido van Rossum627b2d71993-12-24 10:39:16 +00004689done
4690
Martin v. Löwis11437992002-04-12 09:54:03 +00004691
4692
4693
4694
4695
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004696ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004697for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4698 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4699echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4700echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4701if eval "test \"\${$as_ac_Header+set}\" = set"; then
4702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004703else
Martin v. Löwis11437992002-04-12 09:54:03 +00004704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004705/* confdefs.h. */
4706_ACEOF
4707cat confdefs.h >>conftest.$ac_ext
4708cat >>conftest.$ac_ext <<_ACEOF
4709/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004710#include <sys/types.h>
4711#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004712
Martin v. Löwis11437992002-04-12 09:54:03 +00004713int
4714main ()
4715{
4716if ((DIR *) 0)
4717return 0;
4718 ;
4719 return 0;
4720}
4721_ACEOF
4722rm -f conftest.$ac_objext
4723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004724 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004726 grep -v '^ *+' conftest.er1 >conftest.err
4727 rm -f conftest.er1
4728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4730 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004731 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4733 (eval $ac_try) 2>&5
4734 ac_status=$?
4735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736 (exit $ac_status); }; } &&
4737 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4739 (eval $ac_try) 2>&5
4740 ac_status=$?
4741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4742 (exit $ac_status); }; }; then
4743 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004744else
Martin v. Löwis11437992002-04-12 09:54:03 +00004745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004746sed 's/^/| /' conftest.$ac_ext >&5
4747
Martin v. Löwis11437992002-04-12 09:54:03 +00004748eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004749fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004752echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4753echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4754if test `eval echo '${'$as_ac_Header'}'` = yes; then
4755 cat >>confdefs.h <<_ACEOF
4756#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4757_ACEOF
4758
4759ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004760fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004761
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004762done
4763# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4764if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004765 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4766echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4767if test "${ac_cv_search_opendir+set}" = set; then
4768 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004769else
Martin v. Löwis11437992002-04-12 09:54:03 +00004770 ac_func_search_save_LIBS=$LIBS
4771ac_cv_search_opendir=no
4772cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004773/* confdefs.h. */
4774_ACEOF
4775cat confdefs.h >>conftest.$ac_ext
4776cat >>conftest.$ac_ext <<_ACEOF
4777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004778
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004779/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004780#ifdef __cplusplus
4781extern "C"
4782#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004783/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004784 builtin and then its argument prototype would still apply. */
4785char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004786int
4787main ()
4788{
4789opendir ();
4790 ;
4791 return 0;
4792}
4793_ACEOF
4794rm -f conftest.$ac_objext conftest$ac_exeext
4795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004796 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004798 grep -v '^ *+' conftest.er1 >conftest.err
4799 rm -f conftest.er1
4800 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4802 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4805 (eval $ac_try) 2>&5
4806 ac_status=$?
4807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808 (exit $ac_status); }; } &&
4809 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4811 (eval $ac_try) 2>&5
4812 ac_status=$?
4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814 (exit $ac_status); }; }; then
4815 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004816else
Martin v. Löwis11437992002-04-12 09:54:03 +00004817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004818sed 's/^/| /' conftest.$ac_ext >&5
4819
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004820fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004821rm -f conftest.err conftest.$ac_objext \
4822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004823if test "$ac_cv_search_opendir" = no; then
4824 for ac_lib in dir; do
4825 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004827/* confdefs.h. */
4828_ACEOF
4829cat confdefs.h >>conftest.$ac_ext
4830cat >>conftest.$ac_ext <<_ACEOF
4831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004832
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004833/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004834#ifdef __cplusplus
4835extern "C"
4836#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004837/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004838 builtin and then its argument prototype would still apply. */
4839char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004840int
4841main ()
4842{
4843opendir ();
4844 ;
4845 return 0;
4846}
4847_ACEOF
4848rm -f conftest.$ac_objext conftest$ac_exeext
4849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004850 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004852 grep -v '^ *+' conftest.er1 >conftest.err
4853 rm -f conftest.er1
4854 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859 (eval $ac_try) 2>&5
4860 ac_status=$?
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862 (exit $ac_status); }; } &&
4863 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4865 (eval $ac_try) 2>&5
4866 ac_status=$?
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868 (exit $ac_status); }; }; then
4869 ac_cv_search_opendir="-l$ac_lib"
4870break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004871else
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004873sed 's/^/| /' conftest.$ac_ext >&5
4874
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004875fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004876rm -f conftest.err conftest.$ac_objext \
4877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 done
4879fi
4880LIBS=$ac_func_search_save_LIBS
4881fi
4882echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4883echo "${ECHO_T}$ac_cv_search_opendir" >&6
4884if test "$ac_cv_search_opendir" != no; then
4885 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004886
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004887fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004888
Michael W. Hudson54241132001-12-07 15:38:26 +00004889else
Martin v. Löwis11437992002-04-12 09:54:03 +00004890 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4891echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4892if test "${ac_cv_search_opendir+set}" = set; then
4893 echo $ECHO_N "(cached) $ECHO_C" >&6
4894else
4895 ac_func_search_save_LIBS=$LIBS
4896ac_cv_search_opendir=no
4897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004898/* confdefs.h. */
4899_ACEOF
4900cat confdefs.h >>conftest.$ac_ext
4901cat >>conftest.$ac_ext <<_ACEOF
4902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004903
4904/* Override any gcc2 internal prototype to avoid an error. */
4905#ifdef __cplusplus
4906extern "C"
4907#endif
4908/* We use char because int might match the return type of a gcc2
4909 builtin and then its argument prototype would still apply. */
4910char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004911int
4912main ()
4913{
4914opendir ();
4915 ;
4916 return 0;
4917}
4918_ACEOF
4919rm -f conftest.$ac_objext conftest$ac_exeext
4920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004921 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004923 grep -v '^ *+' conftest.er1 >conftest.err
4924 rm -f conftest.er1
4925 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4927 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004928 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4930 (eval $ac_try) 2>&5
4931 ac_status=$?
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); }; } &&
4934 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4936 (eval $ac_try) 2>&5
4937 ac_status=$?
4938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939 (exit $ac_status); }; }; then
4940 ac_cv_search_opendir="none required"
4941else
4942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004943sed 's/^/| /' conftest.$ac_ext >&5
4944
Martin v. Löwis11437992002-04-12 09:54:03 +00004945fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004946rm -f conftest.err conftest.$ac_objext \
4947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004948if test "$ac_cv_search_opendir" = no; then
4949 for ac_lib in x; do
4950 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004952/* confdefs.h. */
4953_ACEOF
4954cat confdefs.h >>conftest.$ac_ext
4955cat >>conftest.$ac_ext <<_ACEOF
4956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004957
4958/* Override any gcc2 internal prototype to avoid an error. */
4959#ifdef __cplusplus
4960extern "C"
4961#endif
4962/* We use char because int might match the return type of a gcc2
4963 builtin and then its argument prototype would still apply. */
4964char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004965int
4966main ()
4967{
4968opendir ();
4969 ;
4970 return 0;
4971}
4972_ACEOF
4973rm -f conftest.$ac_objext conftest$ac_exeext
4974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004975 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004977 grep -v '^ *+' conftest.er1 >conftest.err
4978 rm -f conftest.er1
4979 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4981 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004982 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4984 (eval $ac_try) 2>&5
4985 ac_status=$?
4986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4987 (exit $ac_status); }; } &&
4988 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4990 (eval $ac_try) 2>&5
4991 ac_status=$?
4992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4993 (exit $ac_status); }; }; then
4994 ac_cv_search_opendir="-l$ac_lib"
4995break
4996else
4997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004998sed 's/^/| /' conftest.$ac_ext >&5
4999
Martin v. Löwis11437992002-04-12 09:54:03 +00005000fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005001rm -f conftest.err conftest.$ac_objext \
5002 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005003 done
5004fi
5005LIBS=$ac_func_search_save_LIBS
5006fi
5007echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5008echo "${ECHO_T}$ac_cv_search_opendir" >&6
5009if test "$ac_cv_search_opendir" != no; then
5010 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5011
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005012fi
5013
5014fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005015
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005016echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5017echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5018if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5019 echo $ECHO_N "(cached) $ECHO_C" >&6
5020else
5021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005022/* confdefs.h. */
5023_ACEOF
5024cat confdefs.h >>conftest.$ac_ext
5025cat >>conftest.$ac_ext <<_ACEOF
5026/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005027#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005028int
5029main ()
5030{
5031return makedev(0, 0);
5032 ;
5033 return 0;
5034}
5035_ACEOF
5036rm -f conftest.$ac_objext conftest$ac_exeext
5037if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005038 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005040 grep -v '^ *+' conftest.er1 >conftest.err
5041 rm -f conftest.er1
5042 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5044 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5047 (eval $ac_try) 2>&5
5048 ac_status=$?
5049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5050 (exit $ac_status); }; } &&
5051 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5053 (eval $ac_try) 2>&5
5054 ac_status=$?
5055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056 (exit $ac_status); }; }; then
5057 ac_cv_header_sys_types_h_makedev=yes
5058else
5059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005060sed 's/^/| /' conftest.$ac_ext >&5
5061
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005062ac_cv_header_sys_types_h_makedev=no
5063fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005064rm -f conftest.err conftest.$ac_objext \
5065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005066
5067fi
5068echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5069echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5070
5071if test $ac_cv_header_sys_types_h_makedev = no; then
5072if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5073 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5074echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5075if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5076 echo $ECHO_N "(cached) $ECHO_C" >&6
5077fi
5078echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5079echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5080else
5081 # Is the header compilable?
5082echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5083echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005085/* confdefs.h. */
5086_ACEOF
5087cat confdefs.h >>conftest.$ac_ext
5088cat >>conftest.$ac_ext <<_ACEOF
5089/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005090$ac_includes_default
5091#include <sys/mkdev.h>
5092_ACEOF
5093rm -f conftest.$ac_objext
5094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005095 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005097 grep -v '^ *+' conftest.er1 >conftest.err
5098 rm -f conftest.er1
5099 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5104 (eval $ac_try) 2>&5
5105 ac_status=$?
5106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5107 (exit $ac_status); }; } &&
5108 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5110 (eval $ac_try) 2>&5
5111 ac_status=$?
5112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113 (exit $ac_status); }; }; then
5114 ac_header_compiler=yes
5115else
5116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005117sed 's/^/| /' conftest.$ac_ext >&5
5118
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005119ac_header_compiler=no
5120fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005121rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005122echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5123echo "${ECHO_T}$ac_header_compiler" >&6
5124
5125# Is the header present?
5126echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5127echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5128cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005129/* confdefs.h. */
5130_ACEOF
5131cat confdefs.h >>conftest.$ac_ext
5132cat >>conftest.$ac_ext <<_ACEOF
5133/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005134#include <sys/mkdev.h>
5135_ACEOF
5136if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5137 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5138 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005139 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005140 rm -f conftest.er1
5141 cat conftest.err >&5
5142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5143 (exit $ac_status); } >/dev/null; then
5144 if test -s conftest.err; then
5145 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005146 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005147 else
5148 ac_cpp_err=
5149 fi
5150else
5151 ac_cpp_err=yes
5152fi
5153if test -z "$ac_cpp_err"; then
5154 ac_header_preproc=yes
5155else
5156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005157sed 's/^/| /' conftest.$ac_ext >&5
5158
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005159 ac_header_preproc=no
5160fi
5161rm -f conftest.err conftest.$ac_ext
5162echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5163echo "${ECHO_T}$ac_header_preproc" >&6
5164
5165# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005166case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5167 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005168 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5169echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005170 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5171echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5172 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005173 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005174 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005175 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5176echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005177 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5178echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5179 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5180echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5181 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5182echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005183 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5184echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005185 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5186echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005187 (
5188 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005189## ------------------------------------------------ ##
5190## Report this to http://www.python.org/python-bugs ##
5191## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005192_ASBOX
5193 ) |
5194 sed "s/^/$as_me: WARNING: /" >&2
5195 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005196esac
5197echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5198echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5199if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5200 echo $ECHO_N "(cached) $ECHO_C" >&6
5201else
5202 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5203fi
5204echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5205echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5206
5207fi
5208if test $ac_cv_header_sys_mkdev_h = yes; then
5209
5210cat >>confdefs.h <<\_ACEOF
5211#define MAJOR_IN_MKDEV 1
5212_ACEOF
5213
5214fi
5215
5216
5217
5218 if test $ac_cv_header_sys_mkdev_h = no; then
5219 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5220 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5221echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5222if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5223 echo $ECHO_N "(cached) $ECHO_C" >&6
5224fi
5225echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5226echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5227else
5228 # Is the header compilable?
5229echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5230echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5231cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005232/* confdefs.h. */
5233_ACEOF
5234cat confdefs.h >>conftest.$ac_ext
5235cat >>conftest.$ac_ext <<_ACEOF
5236/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005237$ac_includes_default
5238#include <sys/sysmacros.h>
5239_ACEOF
5240rm -f conftest.$ac_objext
5241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005242 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005244 grep -v '^ *+' conftest.er1 >conftest.err
5245 rm -f conftest.er1
5246 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5248 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005249 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5251 (eval $ac_try) 2>&5
5252 ac_status=$?
5253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5254 (exit $ac_status); }; } &&
5255 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5257 (eval $ac_try) 2>&5
5258 ac_status=$?
5259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5260 (exit $ac_status); }; }; then
5261 ac_header_compiler=yes
5262else
5263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005264sed 's/^/| /' conftest.$ac_ext >&5
5265
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005266ac_header_compiler=no
5267fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005268rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005269echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5270echo "${ECHO_T}$ac_header_compiler" >&6
5271
5272# Is the header present?
5273echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5274echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005276/* confdefs.h. */
5277_ACEOF
5278cat confdefs.h >>conftest.$ac_ext
5279cat >>conftest.$ac_ext <<_ACEOF
5280/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005281#include <sys/sysmacros.h>
5282_ACEOF
5283if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5284 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5285 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005286 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005287 rm -f conftest.er1
5288 cat conftest.err >&5
5289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290 (exit $ac_status); } >/dev/null; then
5291 if test -s conftest.err; then
5292 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005293 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005294 else
5295 ac_cpp_err=
5296 fi
5297else
5298 ac_cpp_err=yes
5299fi
5300if test -z "$ac_cpp_err"; then
5301 ac_header_preproc=yes
5302else
5303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005304sed 's/^/| /' conftest.$ac_ext >&5
5305
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005306 ac_header_preproc=no
5307fi
5308rm -f conftest.err conftest.$ac_ext
5309echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5310echo "${ECHO_T}$ac_header_preproc" >&6
5311
5312# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005313case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5314 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005315 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5316echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005317 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5318echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5319 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005320 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005321 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005322 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5323echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005324 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5325echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5326 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5327echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5328 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5329echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5331echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5333echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005334 (
5335 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005336## ------------------------------------------------ ##
5337## Report this to http://www.python.org/python-bugs ##
5338## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005339_ASBOX
5340 ) |
5341 sed "s/^/$as_me: WARNING: /" >&2
5342 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005343esac
5344echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5345echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5346if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5347 echo $ECHO_N "(cached) $ECHO_C" >&6
5348else
5349 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5350fi
5351echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5352echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5353
5354fi
5355if test $ac_cv_header_sys_sysmacros_h = yes; then
5356
5357cat >>confdefs.h <<\_ACEOF
5358#define MAJOR_IN_SYSMACROS 1
5359_ACEOF
5360
5361fi
5362
5363
5364 fi
5365fi
5366
Michael W. Hudson54241132001-12-07 15:38:26 +00005367
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005368# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005369
5370for ac_header in term.h
5371do
5372as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5373echo "$as_me:$LINENO: checking for $ac_header" >&5
5374echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5375if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005376 echo $ECHO_N "(cached) $ECHO_C" >&6
5377else
5378 cat >conftest.$ac_ext <<_ACEOF
5379/* confdefs.h. */
5380_ACEOF
5381cat confdefs.h >>conftest.$ac_ext
5382cat >>conftest.$ac_ext <<_ACEOF
5383/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005384
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005385#ifdef HAVE_CURSES_H
5386#include <curses.h>
5387#endif
5388
5389
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005390#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005391_ACEOF
5392rm -f conftest.$ac_objext
5393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5394 (eval $ac_compile) 2>conftest.er1
5395 ac_status=$?
5396 grep -v '^ *+' conftest.er1 >conftest.err
5397 rm -f conftest.er1
5398 cat conftest.err >&5
5399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5400 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005401 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5403 (eval $ac_try) 2>&5
5404 ac_status=$?
5405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406 (exit $ac_status); }; } &&
5407 { ac_try='test -s conftest.$ac_objext'
5408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409 (eval $ac_try) 2>&5
5410 ac_status=$?
5411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005413 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005414else
5415 echo "$as_me: failed program was:" >&5
5416sed 's/^/| /' conftest.$ac_ext >&5
5417
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005418eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005419fi
5420rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5421fi
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005422echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5423echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5424if test `eval echo '${'$as_ac_Header'}'` = yes; then
5425 cat >>confdefs.h <<_ACEOF
5426#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5427_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005428
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005429fi
5430
5431done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005432
5433
Martin v. Löwis11017b12006-01-14 18:12:57 +00005434# On Linux, netlink.h requires asm/types.h
5435
5436for ac_header in linux/netlink.h
5437do
5438as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5439echo "$as_me:$LINENO: checking for $ac_header" >&5
5440echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5441if eval "test \"\${$as_ac_Header+set}\" = set"; then
5442 echo $ECHO_N "(cached) $ECHO_C" >&6
5443else
5444 cat >conftest.$ac_ext <<_ACEOF
5445/* confdefs.h. */
5446_ACEOF
5447cat confdefs.h >>conftest.$ac_ext
5448cat >>conftest.$ac_ext <<_ACEOF
5449/* end confdefs.h. */
5450
5451#ifdef HAVE_ASM_TYPES_H
5452#include <asm/types.h>
5453#endif
5454#ifdef HAVE_SYS_SOCKET_H
5455#include <sys/socket.h>
5456#endif
5457
5458
5459#include <$ac_header>
5460_ACEOF
5461rm -f conftest.$ac_objext
5462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5463 (eval $ac_compile) 2>conftest.er1
5464 ac_status=$?
5465 grep -v '^ *+' conftest.er1 >conftest.err
5466 rm -f conftest.er1
5467 cat conftest.err >&5
5468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5469 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005470 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwis11017b12006-01-14 18:12:57 +00005471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5472 (eval $ac_try) 2>&5
5473 ac_status=$?
5474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475 (exit $ac_status); }; } &&
5476 { ac_try='test -s conftest.$ac_objext'
5477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5478 (eval $ac_try) 2>&5
5479 ac_status=$?
5480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5481 (exit $ac_status); }; }; then
5482 eval "$as_ac_Header=yes"
5483else
5484 echo "$as_me: failed program was:" >&5
5485sed 's/^/| /' conftest.$ac_ext >&5
5486
5487eval "$as_ac_Header=no"
5488fi
5489rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5490fi
5491echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5492echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5493if test `eval echo '${'$as_ac_Header'}'` = yes; then
5494 cat >>confdefs.h <<_ACEOF
5495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5496_ACEOF
5497
5498fi
5499
5500done
5501
5502
Guido van Rossum627b2d71993-12-24 10:39:16 +00005503# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005504was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005505echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5506echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005508/* confdefs.h. */
5509_ACEOF
5510cat confdefs.h >>conftest.$ac_ext
5511cat >>conftest.$ac_ext <<_ACEOF
5512/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005513#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005514
5515_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005517 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005518 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005519else
Martin v. Löwis11437992002-04-12 09:54:03 +00005520
5521
5522cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005523#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005524_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005525
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005526
Guido van Rossum627b2d71993-12-24 10:39:16 +00005527fi
5528rm -f conftest*
5529
Martin v. Löwis11437992002-04-12 09:54:03 +00005530echo "$as_me:$LINENO: result: $was_it_defined" >&5
5531echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005532
Neal Norwitz11690112002-07-30 01:08:28 +00005533# Check whether using makedev requires defining _OSF_SOURCE
5534echo "$as_me:$LINENO: checking for makedev" >&5
5535echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005537/* confdefs.h. */
5538_ACEOF
5539cat confdefs.h >>conftest.$ac_ext
5540cat >>conftest.$ac_ext <<_ACEOF
5541/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005542#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005543int
5544main ()
5545{
5546 makedev(0, 0)
5547 ;
5548 return 0;
5549}
5550_ACEOF
5551rm -f conftest.$ac_objext conftest$ac_exeext
5552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005553 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005555 grep -v '^ *+' conftest.er1 >conftest.err
5556 rm -f conftest.er1
5557 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5559 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005560 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5562 (eval $ac_try) 2>&5
5563 ac_status=$?
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); }; } &&
5566 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5568 (eval $ac_try) 2>&5
5569 ac_status=$?
5570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5571 (exit $ac_status); }; }; then
5572 ac_cv_has_makedev=yes
5573else
5574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005575sed 's/^/| /' conftest.$ac_ext >&5
5576
Neal Norwitz11690112002-07-30 01:08:28 +00005577ac_cv_has_makedev=no
5578fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005579rm -f conftest.err conftest.$ac_objext \
5580 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005581if test "$ac_cv_has_makedev" = "no"; then
5582 # we didn't link, try if _OSF_SOURCE will allow us to link
5583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005584/* confdefs.h. */
5585_ACEOF
5586cat confdefs.h >>conftest.$ac_ext
5587cat >>conftest.$ac_ext <<_ACEOF
5588/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005589
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005590#define _OSF_SOURCE 1
5591#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005592
Neal Norwitz11690112002-07-30 01:08:28 +00005593int
5594main ()
5595{
5596 makedev(0, 0)
5597 ;
5598 return 0;
5599}
5600_ACEOF
5601rm -f conftest.$ac_objext conftest$ac_exeext
5602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005603 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005605 grep -v '^ *+' conftest.er1 >conftest.err
5606 rm -f conftest.er1
5607 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5609 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005610 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5612 (eval $ac_try) 2>&5
5613 ac_status=$?
5614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5615 (exit $ac_status); }; } &&
5616 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5618 (eval $ac_try) 2>&5
5619 ac_status=$?
5620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621 (exit $ac_status); }; }; then
5622 ac_cv_has_makedev=yes
5623else
5624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005625sed 's/^/| /' conftest.$ac_ext >&5
5626
Neal Norwitz11690112002-07-30 01:08:28 +00005627ac_cv_has_makedev=no
5628fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005629rm -f conftest.err conftest.$ac_objext \
5630 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005631 if test "$ac_cv_has_makedev" = "yes"; then
5632
5633cat >>confdefs.h <<\_ACEOF
5634#define _OSF_SOURCE 1
5635_ACEOF
5636
5637 fi
5638fi
5639echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5640echo "${ECHO_T}$ac_cv_has_makedev" >&6
5641if test "$ac_cv_has_makedev" = "yes"; then
5642
5643cat >>confdefs.h <<\_ACEOF
5644#define HAVE_MAKEDEV 1
5645_ACEOF
5646
5647fi
5648
Martin v. Löwis399a6892002-10-04 10:22:02 +00005649# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5650# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5651# defined, but the compiler does not support pragma redefine_extname,
5652# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5653# structures (such as rlimit64) without declaring them. As a
5654# work-around, disable LFS on such configurations
5655
5656use_lfs=yes
5657echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5658echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005660/* confdefs.h. */
5661_ACEOF
5662cat confdefs.h >>conftest.$ac_ext
5663cat >>conftest.$ac_ext <<_ACEOF
5664/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005665
5666#define _LARGEFILE_SOURCE 1
5667#define _FILE_OFFSET_BITS 64
5668#include <sys/resource.h>
5669
Martin v. Löwis399a6892002-10-04 10:22:02 +00005670int
5671main ()
5672{
5673struct rlimit foo;
5674 ;
5675 return 0;
5676}
5677_ACEOF
5678rm -f conftest.$ac_objext
5679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005680 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005682 grep -v '^ *+' conftest.er1 >conftest.err
5683 rm -f conftest.er1
5684 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5686 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005687 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5689 (eval $ac_try) 2>&5
5690 ac_status=$?
5691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5692 (exit $ac_status); }; } &&
5693 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5695 (eval $ac_try) 2>&5
5696 ac_status=$?
5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5698 (exit $ac_status); }; }; then
5699 sol_lfs_bug=no
5700else
5701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005702sed 's/^/| /' conftest.$ac_ext >&5
5703
Martin v. Löwis399a6892002-10-04 10:22:02 +00005704sol_lfs_bug=yes
5705fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005707echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5708echo "${ECHO_T}$sol_lfs_bug" >&6
5709if test "$sol_lfs_bug" = "yes"; then
5710 use_lfs=no
5711fi
5712
5713if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005714# Two defines needed to enable largefile support on various platforms
5715# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005716
Martin v. Löwis11437992002-04-12 09:54:03 +00005717cat >>confdefs.h <<\_ACEOF
5718#define _LARGEFILE_SOURCE 1
5719_ACEOF
5720
5721
5722cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005723#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005724_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005725
Martin v. Löwis399a6892002-10-04 10:22:02 +00005726fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005727
Guido van Rossum84e7b241996-08-19 21:59:00 +00005728# Add some code to confdefs.h so that the test for off_t works on SCO
5729cat >> confdefs.h <<\EOF
5730#if defined(SCO_DS)
5731#undef _OFF_T
5732#endif
5733EOF
5734
Guido van Rossumef2255b2000-03-10 22:30:29 +00005735# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005736echo "$as_me:$LINENO: checking for mode_t" >&5
5737echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5738if test "${ac_cv_type_mode_t+set}" = set; then
5739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005740else
Martin v. Löwis11437992002-04-12 09:54:03 +00005741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005742/* confdefs.h. */
5743_ACEOF
5744cat confdefs.h >>conftest.$ac_ext
5745cat >>conftest.$ac_ext <<_ACEOF
5746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005747$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005748int
5749main ()
5750{
5751if ((mode_t *) 0)
5752 return 0;
5753if (sizeof (mode_t))
5754 return 0;
5755 ;
5756 return 0;
5757}
5758_ACEOF
5759rm -f conftest.$ac_objext
5760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005761 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005763 grep -v '^ *+' conftest.er1 >conftest.err
5764 rm -f conftest.er1
5765 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5767 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005768 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5770 (eval $ac_try) 2>&5
5771 ac_status=$?
5772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5773 (exit $ac_status); }; } &&
5774 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5776 (eval $ac_try) 2>&5
5777 ac_status=$?
5778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5779 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005780 ac_cv_type_mode_t=yes
5781else
Martin v. Löwis11437992002-04-12 09:54:03 +00005782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005783sed 's/^/| /' conftest.$ac_ext >&5
5784
Martin v. Löwis11437992002-04-12 09:54:03 +00005785ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005786fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005787rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005789echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5790echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5791if test $ac_cv_type_mode_t = yes; then
5792 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005793else
Martin v. Löwis11437992002-04-12 09:54:03 +00005794
5795cat >>confdefs.h <<_ACEOF
5796#define mode_t int
5797_ACEOF
5798
5799fi
5800
5801echo "$as_me:$LINENO: checking for off_t" >&5
5802echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5803if test "${ac_cv_type_off_t+set}" = set; then
5804 echo $ECHO_N "(cached) $ECHO_C" >&6
5805else
5806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005807/* confdefs.h. */
5808_ACEOF
5809cat confdefs.h >>conftest.$ac_ext
5810cat >>conftest.$ac_ext <<_ACEOF
5811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005812$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005813int
5814main ()
5815{
5816if ((off_t *) 0)
5817 return 0;
5818if (sizeof (off_t))
5819 return 0;
5820 ;
5821 return 0;
5822}
5823_ACEOF
5824rm -f conftest.$ac_objext
5825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005826 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005828 grep -v '^ *+' conftest.er1 >conftest.err
5829 rm -f conftest.er1
5830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005833 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5835 (eval $ac_try) 2>&5
5836 ac_status=$?
5837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5838 (exit $ac_status); }; } &&
5839 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5841 (eval $ac_try) 2>&5
5842 ac_status=$?
5843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005845 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005846else
Martin v. Löwis11437992002-04-12 09:54:03 +00005847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005848sed 's/^/| /' conftest.$ac_ext >&5
5849
Martin v. Löwis11437992002-04-12 09:54:03 +00005850ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005851fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005852rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005854echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5855echo "${ECHO_T}$ac_cv_type_off_t" >&6
5856if test $ac_cv_type_off_t = yes; then
5857 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005858else
Martin v. Löwis11437992002-04-12 09:54:03 +00005859
5860cat >>confdefs.h <<_ACEOF
5861#define off_t long
5862_ACEOF
5863
5864fi
5865
5866echo "$as_me:$LINENO: checking for pid_t" >&5
5867echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5868if test "${ac_cv_type_pid_t+set}" = set; then
5869 echo $ECHO_N "(cached) $ECHO_C" >&6
5870else
5871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005872/* confdefs.h. */
5873_ACEOF
5874cat confdefs.h >>conftest.$ac_ext
5875cat >>conftest.$ac_ext <<_ACEOF
5876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005877$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005878int
5879main ()
5880{
5881if ((pid_t *) 0)
5882 return 0;
5883if (sizeof (pid_t))
5884 return 0;
5885 ;
5886 return 0;
5887}
5888_ACEOF
5889rm -f conftest.$ac_objext
5890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005891 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005893 grep -v '^ *+' conftest.er1 >conftest.err
5894 rm -f conftest.er1
5895 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5897 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005898 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5900 (eval $ac_try) 2>&5
5901 ac_status=$?
5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5903 (exit $ac_status); }; } &&
5904 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5906 (eval $ac_try) 2>&5
5907 ac_status=$?
5908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005910 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005911else
Martin v. Löwis11437992002-04-12 09:54:03 +00005912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005913sed 's/^/| /' conftest.$ac_ext >&5
5914
Martin v. Löwis11437992002-04-12 09:54:03 +00005915ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005916fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005918fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005919echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5920echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5921if test $ac_cv_type_pid_t = yes; then
5922 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005923else
Martin v. Löwis11437992002-04-12 09:54:03 +00005924
5925cat >>confdefs.h <<_ACEOF
5926#define pid_t int
5927_ACEOF
5928
5929fi
5930
5931echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5932echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5933if test "${ac_cv_type_signal+set}" = set; then
5934 echo $ECHO_N "(cached) $ECHO_C" >&6
5935else
5936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005937/* confdefs.h. */
5938_ACEOF
5939cat confdefs.h >>conftest.$ac_ext
5940cat >>conftest.$ac_ext <<_ACEOF
5941/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005942#include <sys/types.h>
5943#include <signal.h>
5944#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005945# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005946#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005947#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005948extern "C" void (*signal (int, void (*)(int)))(int);
5949#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005950void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005951#endif
5952
Martin v. Löwis11437992002-04-12 09:54:03 +00005953int
5954main ()
5955{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005957 ;
5958 return 0;
5959}
5960_ACEOF
5961rm -f conftest.$ac_objext
5962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005963 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005965 grep -v '^ *+' conftest.er1 >conftest.err
5966 rm -f conftest.er1
5967 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5969 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005970 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5972 (eval $ac_try) 2>&5
5973 ac_status=$?
5974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5975 (exit $ac_status); }; } &&
5976 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5978 (eval $ac_try) 2>&5
5979 ac_status=$?
5980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5981 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005982 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005983else
Martin v. Löwis11437992002-04-12 09:54:03 +00005984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005985sed 's/^/| /' conftest.$ac_ext >&5
5986
Martin v. Löwis11437992002-04-12 09:54:03 +00005987ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005988fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005989rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005990fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005991echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5992echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005993
Martin v. Löwis11437992002-04-12 09:54:03 +00005994cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005995#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005996_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005997
Michael W. Hudson54241132001-12-07 15:38:26 +00005998
Martin v. Löwis11437992002-04-12 09:54:03 +00005999echo "$as_me:$LINENO: checking for size_t" >&5
6000echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6001if test "${ac_cv_type_size_t+set}" = set; then
6002 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006003else
Martin v. Löwis11437992002-04-12 09:54:03 +00006004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006005/* confdefs.h. */
6006_ACEOF
6007cat confdefs.h >>conftest.$ac_ext
6008cat >>conftest.$ac_ext <<_ACEOF
6009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006010$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006011int
6012main ()
6013{
6014if ((size_t *) 0)
6015 return 0;
6016if (sizeof (size_t))
6017 return 0;
6018 ;
6019 return 0;
6020}
6021_ACEOF
6022rm -f conftest.$ac_objext
6023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006024 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006026 grep -v '^ *+' conftest.er1 >conftest.err
6027 rm -f conftest.er1
6028 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6030 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006031 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6033 (eval $ac_try) 2>&5
6034 ac_status=$?
6035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6036 (exit $ac_status); }; } &&
6037 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6039 (eval $ac_try) 2>&5
6040 ac_status=$?
6041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006043 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006044else
Martin v. Löwis11437992002-04-12 09:54:03 +00006045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006046sed 's/^/| /' conftest.$ac_ext >&5
6047
Martin v. Löwis11437992002-04-12 09:54:03 +00006048ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006049fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006050rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006051fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006052echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6053echo "${ECHO_T}$ac_cv_type_size_t" >&6
6054if test $ac_cv_type_size_t = yes; then
6055 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006056else
Martin v. Löwis11437992002-04-12 09:54:03 +00006057
6058cat >>confdefs.h <<_ACEOF
6059#define size_t unsigned
6060_ACEOF
6061
6062fi
6063
6064echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6065echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6066if test "${ac_cv_type_uid_t+set}" = set; then
6067 echo $ECHO_N "(cached) $ECHO_C" >&6
6068else
6069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006070/* confdefs.h. */
6071_ACEOF
6072cat confdefs.h >>conftest.$ac_ext
6073cat >>conftest.$ac_ext <<_ACEOF
6074/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006075#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006076
6077_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006079 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006080 ac_cv_type_uid_t=yes
6081else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006082 ac_cv_type_uid_t=no
6083fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006084rm -f conftest*
6085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006086fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006087echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6088echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006089if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006090
Martin v. Löwis11437992002-04-12 09:54:03 +00006091cat >>confdefs.h <<\_ACEOF
6092#define uid_t int
6093_ACEOF
6094
6095
6096cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006098_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006099
6100fi
6101
Martin v. Löwis18e16552006-02-15 17:27:45 +00006102echo "$as_me:$LINENO: checking for ssize_t" >&5
6103echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
6104if test "${ac_cv_type_ssize_t+set}" = set; then
6105 echo $ECHO_N "(cached) $ECHO_C" >&6
6106else
6107 cat >conftest.$ac_ext <<_ACEOF
6108/* confdefs.h. */
6109_ACEOF
6110cat confdefs.h >>conftest.$ac_ext
6111cat >>conftest.$ac_ext <<_ACEOF
6112/* end confdefs.h. */
6113$ac_includes_default
6114int
6115main ()
6116{
6117if ((ssize_t *) 0)
6118 return 0;
6119if (sizeof (ssize_t))
6120 return 0;
6121 ;
6122 return 0;
6123}
6124_ACEOF
6125rm -f conftest.$ac_objext
6126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6127 (eval $ac_compile) 2>conftest.er1
6128 ac_status=$?
6129 grep -v '^ *+' conftest.er1 >conftest.err
6130 rm -f conftest.er1
6131 cat conftest.err >&5
6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006134 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwis18e16552006-02-15 17:27:45 +00006135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6136 (eval $ac_try) 2>&5
6137 ac_status=$?
6138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6139 (exit $ac_status); }; } &&
6140 { ac_try='test -s conftest.$ac_objext'
6141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6142 (eval $ac_try) 2>&5
6143 ac_status=$?
6144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6145 (exit $ac_status); }; }; then
6146 ac_cv_type_ssize_t=yes
6147else
6148 echo "$as_me: failed program was:" >&5
6149sed 's/^/| /' conftest.$ac_ext >&5
6150
6151ac_cv_type_ssize_t=no
6152fi
6153rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6154fi
6155echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6156echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
6157if test $ac_cv_type_ssize_t = yes; then
6158
6159cat >>confdefs.h <<\_ACEOF
6160#define HAVE_SSIZE_T 1
6161_ACEOF
6162
6163fi
6164
Jack Jansendd19cf82001-12-06 22:36:17 +00006165
Michael W. Hudson54241132001-12-07 15:38:26 +00006166# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006167# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006168echo "$as_me:$LINENO: checking for int" >&5
6169echo $ECHO_N "checking for int... $ECHO_C" >&6
6170if test "${ac_cv_type_int+set}" = set; then
6171 echo $ECHO_N "(cached) $ECHO_C" >&6
6172else
6173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006174/* confdefs.h. */
6175_ACEOF
6176cat confdefs.h >>conftest.$ac_ext
6177cat >>conftest.$ac_ext <<_ACEOF
6178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006179$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006180int
6181main ()
6182{
6183if ((int *) 0)
6184 return 0;
6185if (sizeof (int))
6186 return 0;
6187 ;
6188 return 0;
6189}
6190_ACEOF
6191rm -f conftest.$ac_objext
6192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006193 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006195 grep -v '^ *+' conftest.er1 >conftest.err
6196 rm -f conftest.er1
6197 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006200 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6202 (eval $ac_try) 2>&5
6203 ac_status=$?
6204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6205 (exit $ac_status); }; } &&
6206 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6208 (eval $ac_try) 2>&5
6209 ac_status=$?
6210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6211 (exit $ac_status); }; }; then
6212 ac_cv_type_int=yes
6213else
6214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006215sed 's/^/| /' conftest.$ac_ext >&5
6216
Martin v. Löwis11437992002-04-12 09:54:03 +00006217ac_cv_type_int=no
6218fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006219rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006220fi
6221echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6222echo "${ECHO_T}$ac_cv_type_int" >&6
6223
6224echo "$as_me:$LINENO: checking size of int" >&5
6225echo $ECHO_N "checking size of int... $ECHO_C" >&6
6226if test "${ac_cv_sizeof_int+set}" = set; then
6227 echo $ECHO_N "(cached) $ECHO_C" >&6
6228else
6229 if test "$ac_cv_type_int" = yes; then
6230 # The cast to unsigned long works around a bug in the HP C Compiler
6231 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6232 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6233 # This bug is HP SR number 8606223364.
6234 if test "$cross_compiling" = yes; then
6235 # Depending upon the size, compute the lo and hi bounds.
6236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006237/* confdefs.h. */
6238_ACEOF
6239cat confdefs.h >>conftest.$ac_ext
6240cat >>conftest.$ac_ext <<_ACEOF
6241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006242$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006243int
6244main ()
6245{
6246static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6247test_array [0] = 0
6248
6249 ;
6250 return 0;
6251}
6252_ACEOF
6253rm -f conftest.$ac_objext
6254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006255 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006257 grep -v '^ *+' conftest.er1 >conftest.err
6258 rm -f conftest.er1
6259 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006262 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6264 (eval $ac_try) 2>&5
6265 ac_status=$?
6266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267 (exit $ac_status); }; } &&
6268 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6270 (eval $ac_try) 2>&5
6271 ac_status=$?
6272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6273 (exit $ac_status); }; }; then
6274 ac_lo=0 ac_mid=0
6275 while :; do
6276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006277/* confdefs.h. */
6278_ACEOF
6279cat confdefs.h >>conftest.$ac_ext
6280cat >>conftest.$ac_ext <<_ACEOF
6281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006282$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006283int
6284main ()
6285{
6286static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6287test_array [0] = 0
6288
6289 ;
6290 return 0;
6291}
6292_ACEOF
6293rm -f conftest.$ac_objext
6294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006295 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006297 grep -v '^ *+' conftest.er1 >conftest.err
6298 rm -f conftest.er1
6299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6301 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006302 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6304 (eval $ac_try) 2>&5
6305 ac_status=$?
6306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6307 (exit $ac_status); }; } &&
6308 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6310 (eval $ac_try) 2>&5
6311 ac_status=$?
6312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6313 (exit $ac_status); }; }; then
6314 ac_hi=$ac_mid; break
6315else
6316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006317sed 's/^/| /' conftest.$ac_ext >&5
6318
Martin v. Löwis11437992002-04-12 09:54:03 +00006319ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006320 if test $ac_lo -le $ac_mid; then
6321 ac_lo= ac_hi=
6322 break
6323 fi
6324 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006325fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006326rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006327 done
6328else
6329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006330sed 's/^/| /' conftest.$ac_ext >&5
6331
Martin v. Löwis11437992002-04-12 09:54:03 +00006332cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006333/* confdefs.h. */
6334_ACEOF
6335cat confdefs.h >>conftest.$ac_ext
6336cat >>conftest.$ac_ext <<_ACEOF
6337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006338$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006339int
6340main ()
6341{
6342static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6343test_array [0] = 0
6344
6345 ;
6346 return 0;
6347}
6348_ACEOF
6349rm -f conftest.$ac_objext
6350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006351 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006353 grep -v '^ *+' conftest.er1 >conftest.err
6354 rm -f conftest.er1
6355 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6357 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006358 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6360 (eval $ac_try) 2>&5
6361 ac_status=$?
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363 (exit $ac_status); }; } &&
6364 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6366 (eval $ac_try) 2>&5
6367 ac_status=$?
6368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369 (exit $ac_status); }; }; then
6370 ac_hi=-1 ac_mid=-1
6371 while :; do
6372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006373/* confdefs.h. */
6374_ACEOF
6375cat confdefs.h >>conftest.$ac_ext
6376cat >>conftest.$ac_ext <<_ACEOF
6377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006378$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006379int
6380main ()
6381{
6382static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6383test_array [0] = 0
6384
6385 ;
6386 return 0;
6387}
6388_ACEOF
6389rm -f conftest.$ac_objext
6390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006391 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006393 grep -v '^ *+' conftest.er1 >conftest.err
6394 rm -f conftest.er1
6395 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6397 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006398 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6400 (eval $ac_try) 2>&5
6401 ac_status=$?
6402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6403 (exit $ac_status); }; } &&
6404 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6406 (eval $ac_try) 2>&5
6407 ac_status=$?
6408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6409 (exit $ac_status); }; }; then
6410 ac_lo=$ac_mid; break
6411else
6412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006413sed 's/^/| /' conftest.$ac_ext >&5
6414
Martin v. Löwis11437992002-04-12 09:54:03 +00006415ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006416 if test $ac_mid -le $ac_hi; then
6417 ac_lo= ac_hi=
6418 break
6419 fi
6420 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006421fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006422rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006423 done
6424else
6425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006426sed 's/^/| /' conftest.$ac_ext >&5
6427
Martin v. Löwis11437992002-04-12 09:54:03 +00006428ac_lo= ac_hi=
6429fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006430rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006431fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006433# Binary search between lo and hi bounds.
6434while test "x$ac_lo" != "x$ac_hi"; do
6435 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006437/* confdefs.h. */
6438_ACEOF
6439cat confdefs.h >>conftest.$ac_ext
6440cat >>conftest.$ac_ext <<_ACEOF
6441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006442$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006443int
6444main ()
6445{
6446static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6447test_array [0] = 0
6448
6449 ;
6450 return 0;
6451}
6452_ACEOF
6453rm -f conftest.$ac_objext
6454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006455 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006457 grep -v '^ *+' conftest.er1 >conftest.err
6458 rm -f conftest.er1
6459 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6461 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006462 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6464 (eval $ac_try) 2>&5
6465 ac_status=$?
6466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467 (exit $ac_status); }; } &&
6468 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6470 (eval $ac_try) 2>&5
6471 ac_status=$?
6472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6473 (exit $ac_status); }; }; then
6474 ac_hi=$ac_mid
6475else
6476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006477sed 's/^/| /' conftest.$ac_ext >&5
6478
Martin v. Löwis11437992002-04-12 09:54:03 +00006479ac_lo=`expr '(' $ac_mid ')' + 1`
6480fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006482done
6483case $ac_lo in
6484?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006485'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6486See \`config.log' for more details." >&5
6487echo "$as_me: error: cannot compute sizeof (int), 77
6488See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006489 { (exit 1); exit 1; }; } ;;
6490esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006491else
6492 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006493 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
6494echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006495 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006496else
Martin v. Löwis11437992002-04-12 09:54:03 +00006497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006498/* confdefs.h. */
6499_ACEOF
6500cat confdefs.h >>conftest.$ac_ext
6501cat >>conftest.$ac_ext <<_ACEOF
6502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006503$ac_includes_default
6504long longval () { return (long) (sizeof (int)); }
6505unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006506#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006507#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006508int
6509main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006510{
Martin v. Löwis11437992002-04-12 09:54:03 +00006511
6512 FILE *f = fopen ("conftest.val", "w");
6513 if (! f)
6514 exit (1);
6515 if (((long) (sizeof (int))) < 0)
6516 {
6517 long i = longval ();
6518 if (i != ((long) (sizeof (int))))
6519 exit (1);
6520 fprintf (f, "%ld\n", i);
6521 }
6522 else
6523 {
6524 unsigned long i = ulongval ();
6525 if (i != ((long) (sizeof (int))))
6526 exit (1);
6527 fprintf (f, "%lu\n", i);
6528 }
6529 exit (ferror (f) || fclose (f) != 0);
6530
6531 ;
6532 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006533}
Martin v. Löwis11437992002-04-12 09:54:03 +00006534_ACEOF
6535rm -f conftest$ac_exeext
6536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6537 (eval $ac_link) 2>&5
6538 ac_status=$?
6539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6542 (eval $ac_try) 2>&5
6543 ac_status=$?
6544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6545 (exit $ac_status); }; }; then
6546 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006547else
Martin v. Löwis11437992002-04-12 09:54:03 +00006548 echo "$as_me: program exited with status $ac_status" >&5
6549echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006550sed 's/^/| /' conftest.$ac_ext >&5
6551
Martin v. Löwis11437992002-04-12 09:54:03 +00006552( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006553{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6554See \`config.log' for more details." >&5
6555echo "$as_me: error: cannot compute sizeof (int), 77
6556See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006557 { (exit 1); exit 1; }; }
6558fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006559rm -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 +00006560fi
6561fi
6562rm -f conftest.val
6563else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006564 ac_cv_sizeof_int=0
6565fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006567echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6568echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6569cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006570#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006571_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006572
6573
Martin v. Löwis11437992002-04-12 09:54:03 +00006574echo "$as_me:$LINENO: checking for long" >&5
6575echo $ECHO_N "checking for long... $ECHO_C" >&6
6576if test "${ac_cv_type_long+set}" = set; then
6577 echo $ECHO_N "(cached) $ECHO_C" >&6
6578else
6579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006580/* confdefs.h. */
6581_ACEOF
6582cat confdefs.h >>conftest.$ac_ext
6583cat >>conftest.$ac_ext <<_ACEOF
6584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006585$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006586int
6587main ()
6588{
6589if ((long *) 0)
6590 return 0;
6591if (sizeof (long))
6592 return 0;
6593 ;
6594 return 0;
6595}
6596_ACEOF
6597rm -f conftest.$ac_objext
6598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006599 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006601 grep -v '^ *+' conftest.er1 >conftest.err
6602 rm -f conftest.er1
6603 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6605 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006606 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6608 (eval $ac_try) 2>&5
6609 ac_status=$?
6610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6611 (exit $ac_status); }; } &&
6612 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6614 (eval $ac_try) 2>&5
6615 ac_status=$?
6616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6617 (exit $ac_status); }; }; then
6618 ac_cv_type_long=yes
6619else
6620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006621sed 's/^/| /' conftest.$ac_ext >&5
6622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623ac_cv_type_long=no
6624fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006626fi
6627echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6628echo "${ECHO_T}$ac_cv_type_long" >&6
6629
6630echo "$as_me:$LINENO: checking size of long" >&5
6631echo $ECHO_N "checking size of long... $ECHO_C" >&6
6632if test "${ac_cv_sizeof_long+set}" = set; then
6633 echo $ECHO_N "(cached) $ECHO_C" >&6
6634else
6635 if test "$ac_cv_type_long" = yes; then
6636 # The cast to unsigned long works around a bug in the HP C Compiler
6637 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6638 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6639 # This bug is HP SR number 8606223364.
6640 if test "$cross_compiling" = yes; then
6641 # Depending upon the size, compute the lo and hi bounds.
6642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006643/* confdefs.h. */
6644_ACEOF
6645cat confdefs.h >>conftest.$ac_ext
6646cat >>conftest.$ac_ext <<_ACEOF
6647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006648$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006649int
6650main ()
6651{
6652static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6653test_array [0] = 0
6654
6655 ;
6656 return 0;
6657}
6658_ACEOF
6659rm -f conftest.$ac_objext
6660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006661 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006663 grep -v '^ *+' conftest.er1 >conftest.err
6664 rm -f conftest.er1
6665 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006668 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6670 (eval $ac_try) 2>&5
6671 ac_status=$?
6672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6673 (exit $ac_status); }; } &&
6674 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6676 (eval $ac_try) 2>&5
6677 ac_status=$?
6678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6679 (exit $ac_status); }; }; then
6680 ac_lo=0 ac_mid=0
6681 while :; do
6682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006683/* confdefs.h. */
6684_ACEOF
6685cat confdefs.h >>conftest.$ac_ext
6686cat >>conftest.$ac_ext <<_ACEOF
6687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006688$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006689int
6690main ()
6691{
6692static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6693test_array [0] = 0
6694
6695 ;
6696 return 0;
6697}
6698_ACEOF
6699rm -f conftest.$ac_objext
6700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006701 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006703 grep -v '^ *+' conftest.er1 >conftest.err
6704 rm -f conftest.er1
6705 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6707 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006708 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6710 (eval $ac_try) 2>&5
6711 ac_status=$?
6712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6713 (exit $ac_status); }; } &&
6714 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6716 (eval $ac_try) 2>&5
6717 ac_status=$?
6718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6719 (exit $ac_status); }; }; then
6720 ac_hi=$ac_mid; break
6721else
6722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006723sed 's/^/| /' conftest.$ac_ext >&5
6724
Martin v. Löwis11437992002-04-12 09:54:03 +00006725ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006726 if test $ac_lo -le $ac_mid; then
6727 ac_lo= ac_hi=
6728 break
6729 fi
6730 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006731fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006732rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006733 done
6734else
6735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006736sed 's/^/| /' conftest.$ac_ext >&5
6737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006739/* confdefs.h. */
6740_ACEOF
6741cat confdefs.h >>conftest.$ac_ext
6742cat >>conftest.$ac_ext <<_ACEOF
6743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006744$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006745int
6746main ()
6747{
6748static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6749test_array [0] = 0
6750
6751 ;
6752 return 0;
6753}
6754_ACEOF
6755rm -f conftest.$ac_objext
6756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006757 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006759 grep -v '^ *+' conftest.er1 >conftest.err
6760 rm -f conftest.er1
6761 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006764 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6766 (eval $ac_try) 2>&5
6767 ac_status=$?
6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6769 (exit $ac_status); }; } &&
6770 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6772 (eval $ac_try) 2>&5
6773 ac_status=$?
6774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6775 (exit $ac_status); }; }; then
6776 ac_hi=-1 ac_mid=-1
6777 while :; do
6778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006779/* confdefs.h. */
6780_ACEOF
6781cat confdefs.h >>conftest.$ac_ext
6782cat >>conftest.$ac_ext <<_ACEOF
6783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006784$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006785int
6786main ()
6787{
6788static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6789test_array [0] = 0
6790
6791 ;
6792 return 0;
6793}
6794_ACEOF
6795rm -f conftest.$ac_objext
6796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006797 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006799 grep -v '^ *+' conftest.er1 >conftest.err
6800 rm -f conftest.er1
6801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6803 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006804 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6806 (eval $ac_try) 2>&5
6807 ac_status=$?
6808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6809 (exit $ac_status); }; } &&
6810 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6812 (eval $ac_try) 2>&5
6813 ac_status=$?
6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815 (exit $ac_status); }; }; then
6816 ac_lo=$ac_mid; break
6817else
6818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006819sed 's/^/| /' conftest.$ac_ext >&5
6820
Martin v. Löwis11437992002-04-12 09:54:03 +00006821ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006822 if test $ac_mid -le $ac_hi; then
6823 ac_lo= ac_hi=
6824 break
6825 fi
6826 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006827fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006828rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006829 done
6830else
6831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006832sed 's/^/| /' conftest.$ac_ext >&5
6833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834ac_lo= ac_hi=
6835fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006837fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006838rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006839# Binary search between lo and hi bounds.
6840while test "x$ac_lo" != "x$ac_hi"; do
6841 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006843/* confdefs.h. */
6844_ACEOF
6845cat confdefs.h >>conftest.$ac_ext
6846cat >>conftest.$ac_ext <<_ACEOF
6847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006848$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006849int
6850main ()
6851{
6852static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6853test_array [0] = 0
6854
6855 ;
6856 return 0;
6857}
6858_ACEOF
6859rm -f conftest.$ac_objext
6860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006861 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006863 grep -v '^ *+' conftest.er1 >conftest.err
6864 rm -f conftest.er1
6865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6867 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006868 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6870 (eval $ac_try) 2>&5
6871 ac_status=$?
6872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6873 (exit $ac_status); }; } &&
6874 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6876 (eval $ac_try) 2>&5
6877 ac_status=$?
6878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6879 (exit $ac_status); }; }; then
6880 ac_hi=$ac_mid
6881else
6882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006883sed 's/^/| /' conftest.$ac_ext >&5
6884
Martin v. Löwis11437992002-04-12 09:54:03 +00006885ac_lo=`expr '(' $ac_mid ')' + 1`
6886fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006887rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006888done
6889case $ac_lo in
6890?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006891'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6892See \`config.log' for more details." >&5
6893echo "$as_me: error: cannot compute sizeof (long), 77
6894See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006895 { (exit 1); exit 1; }; } ;;
6896esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006897else
6898 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006899 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
6900echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006901 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006902else
Martin v. Löwis11437992002-04-12 09:54:03 +00006903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006904/* confdefs.h. */
6905_ACEOF
6906cat confdefs.h >>conftest.$ac_ext
6907cat >>conftest.$ac_ext <<_ACEOF
6908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006909$ac_includes_default
6910long longval () { return (long) (sizeof (long)); }
6911unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006912#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006913#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006914int
6915main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006916{
Martin v. Löwis11437992002-04-12 09:54:03 +00006917
6918 FILE *f = fopen ("conftest.val", "w");
6919 if (! f)
6920 exit (1);
6921 if (((long) (sizeof (long))) < 0)
6922 {
6923 long i = longval ();
6924 if (i != ((long) (sizeof (long))))
6925 exit (1);
6926 fprintf (f, "%ld\n", i);
6927 }
6928 else
6929 {
6930 unsigned long i = ulongval ();
6931 if (i != ((long) (sizeof (long))))
6932 exit (1);
6933 fprintf (f, "%lu\n", i);
6934 }
6935 exit (ferror (f) || fclose (f) != 0);
6936
6937 ;
6938 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006939}
Martin v. Löwis11437992002-04-12 09:54:03 +00006940_ACEOF
6941rm -f conftest$ac_exeext
6942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6943 (eval $ac_link) 2>&5
6944 ac_status=$?
6945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6948 (eval $ac_try) 2>&5
6949 ac_status=$?
6950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951 (exit $ac_status); }; }; then
6952 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006953else
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 echo "$as_me: program exited with status $ac_status" >&5
6955echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006956sed 's/^/| /' conftest.$ac_ext >&5
6957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006959{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6960See \`config.log' for more details." >&5
6961echo "$as_me: error: cannot compute sizeof (long), 77
6962See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006963 { (exit 1); exit 1; }; }
6964fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006965rm -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 +00006966fi
6967fi
6968rm -f conftest.val
6969else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006970 ac_cv_sizeof_long=0
6971fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006973echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6974echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6975cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006976#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006977_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006978
6979
Martin v. Löwis11437992002-04-12 09:54:03 +00006980echo "$as_me:$LINENO: checking for void *" >&5
6981echo $ECHO_N "checking for void *... $ECHO_C" >&6
6982if test "${ac_cv_type_void_p+set}" = set; then
6983 echo $ECHO_N "(cached) $ECHO_C" >&6
6984else
6985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006986/* confdefs.h. */
6987_ACEOF
6988cat confdefs.h >>conftest.$ac_ext
6989cat >>conftest.$ac_ext <<_ACEOF
6990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006991$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006992int
6993main ()
6994{
6995if ((void * *) 0)
6996 return 0;
6997if (sizeof (void *))
6998 return 0;
6999 ;
7000 return 0;
7001}
7002_ACEOF
7003rm -f conftest.$ac_objext
7004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007005 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007007 grep -v '^ *+' conftest.er1 >conftest.err
7008 rm -f conftest.er1
7009 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7011 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007012 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7014 (eval $ac_try) 2>&5
7015 ac_status=$?
7016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7017 (exit $ac_status); }; } &&
7018 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7020 (eval $ac_try) 2>&5
7021 ac_status=$?
7022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7023 (exit $ac_status); }; }; then
7024 ac_cv_type_void_p=yes
7025else
7026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007027sed 's/^/| /' conftest.$ac_ext >&5
7028
Martin v. Löwis11437992002-04-12 09:54:03 +00007029ac_cv_type_void_p=no
7030fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007032fi
7033echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7034echo "${ECHO_T}$ac_cv_type_void_p" >&6
7035
7036echo "$as_me:$LINENO: checking size of void *" >&5
7037echo $ECHO_N "checking size of void *... $ECHO_C" >&6
7038if test "${ac_cv_sizeof_void_p+set}" = set; then
7039 echo $ECHO_N "(cached) $ECHO_C" >&6
7040else
7041 if test "$ac_cv_type_void_p" = yes; then
7042 # The cast to unsigned long works around a bug in the HP C Compiler
7043 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7044 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7045 # This bug is HP SR number 8606223364.
7046 if test "$cross_compiling" = yes; then
7047 # Depending upon the size, compute the lo and hi bounds.
7048cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007049/* confdefs.h. */
7050_ACEOF
7051cat confdefs.h >>conftest.$ac_ext
7052cat >>conftest.$ac_ext <<_ACEOF
7053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007054$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007055int
7056main ()
7057{
7058static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
7059test_array [0] = 0
7060
7061 ;
7062 return 0;
7063}
7064_ACEOF
7065rm -f conftest.$ac_objext
7066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007067 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007069 grep -v '^ *+' conftest.er1 >conftest.err
7070 rm -f conftest.er1
7071 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7073 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007074 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7076 (eval $ac_try) 2>&5
7077 ac_status=$?
7078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7079 (exit $ac_status); }; } &&
7080 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7082 (eval $ac_try) 2>&5
7083 ac_status=$?
7084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7085 (exit $ac_status); }; }; then
7086 ac_lo=0 ac_mid=0
7087 while :; do
7088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007089/* confdefs.h. */
7090_ACEOF
7091cat confdefs.h >>conftest.$ac_ext
7092cat >>conftest.$ac_ext <<_ACEOF
7093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007094$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007095int
7096main ()
7097{
7098static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7099test_array [0] = 0
7100
7101 ;
7102 return 0;
7103}
7104_ACEOF
7105rm -f conftest.$ac_objext
7106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007107 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007109 grep -v '^ *+' conftest.er1 >conftest.err
7110 rm -f conftest.er1
7111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7113 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007114 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7116 (eval $ac_try) 2>&5
7117 ac_status=$?
7118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119 (exit $ac_status); }; } &&
7120 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7122 (eval $ac_try) 2>&5
7123 ac_status=$?
7124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125 (exit $ac_status); }; }; then
7126 ac_hi=$ac_mid; break
7127else
7128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007129sed 's/^/| /' conftest.$ac_ext >&5
7130
Martin v. Löwis11437992002-04-12 09:54:03 +00007131ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007132 if test $ac_lo -le $ac_mid; then
7133 ac_lo= ac_hi=
7134 break
7135 fi
7136 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007137fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007138rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007139 done
7140else
7141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007142sed 's/^/| /' conftest.$ac_ext >&5
7143
Martin v. Löwis11437992002-04-12 09:54:03 +00007144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007145/* confdefs.h. */
7146_ACEOF
7147cat confdefs.h >>conftest.$ac_ext
7148cat >>conftest.$ac_ext <<_ACEOF
7149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007150$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007151int
7152main ()
7153{
7154static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7155test_array [0] = 0
7156
7157 ;
7158 return 0;
7159}
7160_ACEOF
7161rm -f conftest.$ac_objext
7162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007163 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007165 grep -v '^ *+' conftest.er1 >conftest.err
7166 rm -f conftest.er1
7167 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7169 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007170 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7172 (eval $ac_try) 2>&5
7173 ac_status=$?
7174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7175 (exit $ac_status); }; } &&
7176 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7178 (eval $ac_try) 2>&5
7179 ac_status=$?
7180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7181 (exit $ac_status); }; }; then
7182 ac_hi=-1 ac_mid=-1
7183 while :; do
7184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007185/* confdefs.h. */
7186_ACEOF
7187cat confdefs.h >>conftest.$ac_ext
7188cat >>conftest.$ac_ext <<_ACEOF
7189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007190$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007191int
7192main ()
7193{
7194static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7195test_array [0] = 0
7196
7197 ;
7198 return 0;
7199}
7200_ACEOF
7201rm -f conftest.$ac_objext
7202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007203 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007205 grep -v '^ *+' conftest.er1 >conftest.err
7206 rm -f conftest.er1
7207 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007210 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7212 (eval $ac_try) 2>&5
7213 ac_status=$?
7214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7215 (exit $ac_status); }; } &&
7216 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7218 (eval $ac_try) 2>&5
7219 ac_status=$?
7220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7221 (exit $ac_status); }; }; then
7222 ac_lo=$ac_mid; break
7223else
7224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007225sed 's/^/| /' conftest.$ac_ext >&5
7226
Martin v. Löwis11437992002-04-12 09:54:03 +00007227ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007228 if test $ac_mid -le $ac_hi; then
7229 ac_lo= ac_hi=
7230 break
7231 fi
7232 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007233fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007234rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007235 done
7236else
7237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007238sed 's/^/| /' conftest.$ac_ext >&5
7239
Martin v. Löwis11437992002-04-12 09:54:03 +00007240ac_lo= ac_hi=
7241fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007242rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007243fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007244rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007245# Binary search between lo and hi bounds.
7246while test "x$ac_lo" != "x$ac_hi"; do
7247 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007249/* confdefs.h. */
7250_ACEOF
7251cat confdefs.h >>conftest.$ac_ext
7252cat >>conftest.$ac_ext <<_ACEOF
7253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007254$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007255int
7256main ()
7257{
7258static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7259test_array [0] = 0
7260
7261 ;
7262 return 0;
7263}
7264_ACEOF
7265rm -f conftest.$ac_objext
7266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007267 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007269 grep -v '^ *+' conftest.er1 >conftest.err
7270 rm -f conftest.er1
7271 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007274 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7276 (eval $ac_try) 2>&5
7277 ac_status=$?
7278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7279 (exit $ac_status); }; } &&
7280 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7282 (eval $ac_try) 2>&5
7283 ac_status=$?
7284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7285 (exit $ac_status); }; }; then
7286 ac_hi=$ac_mid
7287else
7288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007289sed 's/^/| /' conftest.$ac_ext >&5
7290
Martin v. Löwis11437992002-04-12 09:54:03 +00007291ac_lo=`expr '(' $ac_mid ')' + 1`
7292fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007294done
7295case $ac_lo in
7296?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007297'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7298See \`config.log' for more details." >&5
7299echo "$as_me: error: cannot compute sizeof (void *), 77
7300See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007301 { (exit 1); exit 1; }; } ;;
7302esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007303else
7304 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007305 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
7306echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007307 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007308else
Martin v. Löwis11437992002-04-12 09:54:03 +00007309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007310/* confdefs.h. */
7311_ACEOF
7312cat confdefs.h >>conftest.$ac_ext
7313cat >>conftest.$ac_ext <<_ACEOF
7314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007315$ac_includes_default
7316long longval () { return (long) (sizeof (void *)); }
7317unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007318#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007319#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007320int
7321main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007322{
Martin v. Löwis11437992002-04-12 09:54:03 +00007323
7324 FILE *f = fopen ("conftest.val", "w");
7325 if (! f)
7326 exit (1);
7327 if (((long) (sizeof (void *))) < 0)
7328 {
7329 long i = longval ();
7330 if (i != ((long) (sizeof (void *))))
7331 exit (1);
7332 fprintf (f, "%ld\n", i);
7333 }
7334 else
7335 {
7336 unsigned long i = ulongval ();
7337 if (i != ((long) (sizeof (void *))))
7338 exit (1);
7339 fprintf (f, "%lu\n", i);
7340 }
7341 exit (ferror (f) || fclose (f) != 0);
7342
7343 ;
7344 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007345}
Martin v. Löwis11437992002-04-12 09:54:03 +00007346_ACEOF
7347rm -f conftest$ac_exeext
7348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7349 (eval $ac_link) 2>&5
7350 ac_status=$?
7351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7354 (eval $ac_try) 2>&5
7355 ac_status=$?
7356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7357 (exit $ac_status); }; }; then
7358 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007359else
Martin v. Löwis11437992002-04-12 09:54:03 +00007360 echo "$as_me: program exited with status $ac_status" >&5
7361echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007362sed 's/^/| /' conftest.$ac_ext >&5
7363
Martin v. Löwis11437992002-04-12 09:54:03 +00007364( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007365{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7366See \`config.log' for more details." >&5
7367echo "$as_me: error: cannot compute sizeof (void *), 77
7368See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007369 { (exit 1); exit 1; }; }
7370fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007371rm -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 +00007372fi
7373fi
7374rm -f conftest.val
7375else
Guido van Rossumad678af1998-10-02 14:42:15 +00007376 ac_cv_sizeof_void_p=0
7377fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007378fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007379echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7380echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7381cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007382#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007383_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007384
7385
Martin v. Löwis11437992002-04-12 09:54:03 +00007386echo "$as_me:$LINENO: checking for short" >&5
7387echo $ECHO_N "checking for short... $ECHO_C" >&6
7388if test "${ac_cv_type_short+set}" = set; then
7389 echo $ECHO_N "(cached) $ECHO_C" >&6
7390else
7391 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007392/* confdefs.h. */
7393_ACEOF
7394cat confdefs.h >>conftest.$ac_ext
7395cat >>conftest.$ac_ext <<_ACEOF
7396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007397$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007398int
7399main ()
7400{
7401if ((short *) 0)
7402 return 0;
7403if (sizeof (short))
7404 return 0;
7405 ;
7406 return 0;
7407}
7408_ACEOF
7409rm -f conftest.$ac_objext
7410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007411 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007413 grep -v '^ *+' conftest.er1 >conftest.err
7414 rm -f conftest.er1
7415 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7417 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007418 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7420 (eval $ac_try) 2>&5
7421 ac_status=$?
7422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7423 (exit $ac_status); }; } &&
7424 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7426 (eval $ac_try) 2>&5
7427 ac_status=$?
7428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7429 (exit $ac_status); }; }; then
7430 ac_cv_type_short=yes
7431else
7432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007433sed 's/^/| /' conftest.$ac_ext >&5
7434
Martin v. Löwis11437992002-04-12 09:54:03 +00007435ac_cv_type_short=no
7436fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007438fi
7439echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7440echo "${ECHO_T}$ac_cv_type_short" >&6
7441
7442echo "$as_me:$LINENO: checking size of short" >&5
7443echo $ECHO_N "checking size of short... $ECHO_C" >&6
7444if test "${ac_cv_sizeof_short+set}" = set; then
7445 echo $ECHO_N "(cached) $ECHO_C" >&6
7446else
7447 if test "$ac_cv_type_short" = yes; then
7448 # The cast to unsigned long works around a bug in the HP C Compiler
7449 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7450 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7451 # This bug is HP SR number 8606223364.
7452 if test "$cross_compiling" = yes; then
7453 # Depending upon the size, compute the lo and hi bounds.
7454cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007455/* confdefs.h. */
7456_ACEOF
7457cat confdefs.h >>conftest.$ac_ext
7458cat >>conftest.$ac_ext <<_ACEOF
7459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007460$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007461int
7462main ()
7463{
7464static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7465test_array [0] = 0
7466
7467 ;
7468 return 0;
7469}
7470_ACEOF
7471rm -f conftest.$ac_objext
7472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007473 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007475 grep -v '^ *+' conftest.er1 >conftest.err
7476 rm -f conftest.er1
7477 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7479 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007480 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7482 (eval $ac_try) 2>&5
7483 ac_status=$?
7484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485 (exit $ac_status); }; } &&
7486 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7488 (eval $ac_try) 2>&5
7489 ac_status=$?
7490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7491 (exit $ac_status); }; }; then
7492 ac_lo=0 ac_mid=0
7493 while :; do
7494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007495/* confdefs.h. */
7496_ACEOF
7497cat confdefs.h >>conftest.$ac_ext
7498cat >>conftest.$ac_ext <<_ACEOF
7499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007500$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007501int
7502main ()
7503{
7504static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7505test_array [0] = 0
7506
7507 ;
7508 return 0;
7509}
7510_ACEOF
7511rm -f conftest.$ac_objext
7512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007513 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007515 grep -v '^ *+' conftest.er1 >conftest.err
7516 rm -f conftest.er1
7517 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007520 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7522 (eval $ac_try) 2>&5
7523 ac_status=$?
7524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7525 (exit $ac_status); }; } &&
7526 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7528 (eval $ac_try) 2>&5
7529 ac_status=$?
7530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7531 (exit $ac_status); }; }; then
7532 ac_hi=$ac_mid; break
7533else
7534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007535sed 's/^/| /' conftest.$ac_ext >&5
7536
Martin v. Löwis11437992002-04-12 09:54:03 +00007537ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007538 if test $ac_lo -le $ac_mid; then
7539 ac_lo= ac_hi=
7540 break
7541 fi
7542 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007543fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007545 done
7546else
7547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007548sed 's/^/| /' conftest.$ac_ext >&5
7549
Martin v. Löwis11437992002-04-12 09:54:03 +00007550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007551/* confdefs.h. */
7552_ACEOF
7553cat confdefs.h >>conftest.$ac_ext
7554cat >>conftest.$ac_ext <<_ACEOF
7555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007556$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007557int
7558main ()
7559{
7560static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7561test_array [0] = 0
7562
7563 ;
7564 return 0;
7565}
7566_ACEOF
7567rm -f conftest.$ac_objext
7568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007569 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007571 grep -v '^ *+' conftest.er1 >conftest.err
7572 rm -f conftest.er1
7573 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007576 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7578 (eval $ac_try) 2>&5
7579 ac_status=$?
7580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7581 (exit $ac_status); }; } &&
7582 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7584 (eval $ac_try) 2>&5
7585 ac_status=$?
7586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7587 (exit $ac_status); }; }; then
7588 ac_hi=-1 ac_mid=-1
7589 while :; do
7590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007591/* confdefs.h. */
7592_ACEOF
7593cat confdefs.h >>conftest.$ac_ext
7594cat >>conftest.$ac_ext <<_ACEOF
7595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007596$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007597int
7598main ()
7599{
7600static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7601test_array [0] = 0
7602
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
7608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007609 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007611 grep -v '^ *+' conftest.er1 >conftest.err
7612 rm -f conftest.er1
7613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7615 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007616 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7618 (eval $ac_try) 2>&5
7619 ac_status=$?
7620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7621 (exit $ac_status); }; } &&
7622 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7624 (eval $ac_try) 2>&5
7625 ac_status=$?
7626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7627 (exit $ac_status); }; }; then
7628 ac_lo=$ac_mid; break
7629else
7630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007631sed 's/^/| /' conftest.$ac_ext >&5
7632
Martin v. Löwis11437992002-04-12 09:54:03 +00007633ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007634 if test $ac_mid -le $ac_hi; then
7635 ac_lo= ac_hi=
7636 break
7637 fi
7638 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007639fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007640rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007641 done
7642else
7643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007644sed 's/^/| /' conftest.$ac_ext >&5
7645
Martin v. Löwis11437992002-04-12 09:54:03 +00007646ac_lo= ac_hi=
7647fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007648rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007649fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007651# Binary search between lo and hi bounds.
7652while test "x$ac_lo" != "x$ac_hi"; do
7653 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007655/* confdefs.h. */
7656_ACEOF
7657cat confdefs.h >>conftest.$ac_ext
7658cat >>conftest.$ac_ext <<_ACEOF
7659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007660$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007661int
7662main ()
7663{
7664static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7665test_array [0] = 0
7666
7667 ;
7668 return 0;
7669}
7670_ACEOF
7671rm -f conftest.$ac_objext
7672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007673 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007675 grep -v '^ *+' conftest.er1 >conftest.err
7676 rm -f conftest.er1
7677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007680 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
7686 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7688 (eval $ac_try) 2>&5
7689 ac_status=$?
7690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7691 (exit $ac_status); }; }; then
7692 ac_hi=$ac_mid
7693else
7694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007695sed 's/^/| /' conftest.$ac_ext >&5
7696
Martin v. Löwis11437992002-04-12 09:54:03 +00007697ac_lo=`expr '(' $ac_mid ')' + 1`
7698fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007700done
7701case $ac_lo in
7702?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007703'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7704See \`config.log' for more details." >&5
7705echo "$as_me: error: cannot compute sizeof (short), 77
7706See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 { (exit 1); exit 1; }; } ;;
7708esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007709else
7710 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007711 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
7712echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007714else
Martin v. Löwis11437992002-04-12 09:54:03 +00007715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007716/* confdefs.h. */
7717_ACEOF
7718cat confdefs.h >>conftest.$ac_ext
7719cat >>conftest.$ac_ext <<_ACEOF
7720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007721$ac_includes_default
7722long longval () { return (long) (sizeof (short)); }
7723unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007724#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007725#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007726int
7727main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007728{
Martin v. Löwis11437992002-04-12 09:54:03 +00007729
7730 FILE *f = fopen ("conftest.val", "w");
7731 if (! f)
7732 exit (1);
7733 if (((long) (sizeof (short))) < 0)
7734 {
7735 long i = longval ();
7736 if (i != ((long) (sizeof (short))))
7737 exit (1);
7738 fprintf (f, "%ld\n", i);
7739 }
7740 else
7741 {
7742 unsigned long i = ulongval ();
7743 if (i != ((long) (sizeof (short))))
7744 exit (1);
7745 fprintf (f, "%lu\n", i);
7746 }
7747 exit (ferror (f) || fclose (f) != 0);
7748
7749 ;
7750 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007751}
Martin v. Löwis11437992002-04-12 09:54:03 +00007752_ACEOF
7753rm -f conftest$ac_exeext
7754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7755 (eval $ac_link) 2>&5
7756 ac_status=$?
7757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7758 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7760 (eval $ac_try) 2>&5
7761 ac_status=$?
7762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7763 (exit $ac_status); }; }; then
7764 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007765else
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 echo "$as_me: program exited with status $ac_status" >&5
7767echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007768sed 's/^/| /' conftest.$ac_ext >&5
7769
Martin v. Löwis11437992002-04-12 09:54:03 +00007770( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007771{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7772See \`config.log' for more details." >&5
7773echo "$as_me: error: cannot compute sizeof (short), 77
7774See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 { (exit 1); exit 1; }; }
7776fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007777rm -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 +00007778fi
7779fi
7780rm -f conftest.val
7781else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007782 ac_cv_sizeof_short=0
7783fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007785echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7786echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7787cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007788#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007789_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007790
7791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792echo "$as_me:$LINENO: checking for float" >&5
7793echo $ECHO_N "checking for float... $ECHO_C" >&6
7794if test "${ac_cv_type_float+set}" = set; then
7795 echo $ECHO_N "(cached) $ECHO_C" >&6
7796else
7797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007798/* confdefs.h. */
7799_ACEOF
7800cat confdefs.h >>conftest.$ac_ext
7801cat >>conftest.$ac_ext <<_ACEOF
7802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007803$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007804int
7805main ()
7806{
7807if ((float *) 0)
7808 return 0;
7809if (sizeof (float))
7810 return 0;
7811 ;
7812 return 0;
7813}
7814_ACEOF
7815rm -f conftest.$ac_objext
7816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007817 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007819 grep -v '^ *+' conftest.er1 >conftest.err
7820 rm -f conftest.er1
7821 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7823 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007824 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7826 (eval $ac_try) 2>&5
7827 ac_status=$?
7828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7829 (exit $ac_status); }; } &&
7830 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7832 (eval $ac_try) 2>&5
7833 ac_status=$?
7834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7835 (exit $ac_status); }; }; then
7836 ac_cv_type_float=yes
7837else
7838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007839sed 's/^/| /' conftest.$ac_ext >&5
7840
Martin v. Löwis11437992002-04-12 09:54:03 +00007841ac_cv_type_float=no
7842fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007843rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007844fi
7845echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7846echo "${ECHO_T}$ac_cv_type_float" >&6
7847
7848echo "$as_me:$LINENO: checking size of float" >&5
7849echo $ECHO_N "checking size of float... $ECHO_C" >&6
7850if test "${ac_cv_sizeof_float+set}" = set; then
7851 echo $ECHO_N "(cached) $ECHO_C" >&6
7852else
7853 if test "$ac_cv_type_float" = yes; then
7854 # The cast to unsigned long works around a bug in the HP C Compiler
7855 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7856 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7857 # This bug is HP SR number 8606223364.
7858 if test "$cross_compiling" = yes; then
7859 # Depending upon the size, compute the lo and hi bounds.
7860cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007861/* confdefs.h. */
7862_ACEOF
7863cat confdefs.h >>conftest.$ac_ext
7864cat >>conftest.$ac_ext <<_ACEOF
7865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007866$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007867int
7868main ()
7869{
7870static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7871test_array [0] = 0
7872
7873 ;
7874 return 0;
7875}
7876_ACEOF
7877rm -f conftest.$ac_objext
7878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007879 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007881 grep -v '^ *+' conftest.er1 >conftest.err
7882 rm -f conftest.er1
7883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7885 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007886 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7888 (eval $ac_try) 2>&5
7889 ac_status=$?
7890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7891 (exit $ac_status); }; } &&
7892 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7894 (eval $ac_try) 2>&5
7895 ac_status=$?
7896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7897 (exit $ac_status); }; }; then
7898 ac_lo=0 ac_mid=0
7899 while :; do
7900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007901/* confdefs.h. */
7902_ACEOF
7903cat confdefs.h >>conftest.$ac_ext
7904cat >>conftest.$ac_ext <<_ACEOF
7905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007906$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007907int
7908main ()
7909{
7910static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7911test_array [0] = 0
7912
7913 ;
7914 return 0;
7915}
7916_ACEOF
7917rm -f conftest.$ac_objext
7918if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007919 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007921 grep -v '^ *+' conftest.er1 >conftest.err
7922 rm -f conftest.er1
7923 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7925 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007926 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7928 (eval $ac_try) 2>&5
7929 ac_status=$?
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); }; } &&
7932 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7934 (eval $ac_try) 2>&5
7935 ac_status=$?
7936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7937 (exit $ac_status); }; }; then
7938 ac_hi=$ac_mid; break
7939else
7940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007941sed 's/^/| /' conftest.$ac_ext >&5
7942
Martin v. Löwis11437992002-04-12 09:54:03 +00007943ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007944 if test $ac_lo -le $ac_mid; then
7945 ac_lo= ac_hi=
7946 break
7947 fi
7948 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007949fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 done
7952else
7953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007954sed 's/^/| /' conftest.$ac_ext >&5
7955
Martin v. Löwis11437992002-04-12 09:54:03 +00007956cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007963int
7964main ()
7965{
7966static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7967test_array [0] = 0
7968
7969 ;
7970 return 0;
7971}
7972_ACEOF
7973rm -f conftest.$ac_objext
7974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007975 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007977 grep -v '^ *+' conftest.er1 >conftest.err
7978 rm -f conftest.er1
7979 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7981 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007982 { ac_try='test -z "$ac_c_werror_flag" || 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); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008022 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8024 (eval $ac_try) 2>&5
8025 ac_status=$?
8026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8027 (exit $ac_status); }; } &&
8028 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8030 (eval $ac_try) 2>&5
8031 ac_status=$?
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); }; }; then
8034 ac_lo=$ac_mid; break
8035else
8036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008037sed 's/^/| /' conftest.$ac_ext >&5
8038
Martin v. Löwis11437992002-04-12 09:54:03 +00008039ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008040 if test $ac_mid -le $ac_hi; then
8041 ac_lo= ac_hi=
8042 break
8043 fi
8044 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008045fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008046rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 done
8048else
8049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008050sed 's/^/| /' conftest.$ac_ext >&5
8051
Martin v. Löwis11437992002-04-12 09:54:03 +00008052ac_lo= ac_hi=
8053fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008054rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008055fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008056rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008057# Binary search between lo and hi bounds.
8058while test "x$ac_lo" != "x$ac_hi"; do
8059 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008061/* confdefs.h. */
8062_ACEOF
8063cat confdefs.h >>conftest.$ac_ext
8064cat >>conftest.$ac_ext <<_ACEOF
8065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008066$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008067int
8068main ()
8069{
8070static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8071test_array [0] = 0
8072
8073 ;
8074 return 0;
8075}
8076_ACEOF
8077rm -f conftest.$ac_objext
8078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008079 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008081 grep -v '^ *+' conftest.er1 >conftest.err
8082 rm -f conftest.er1
8083 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8085 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008086 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8088 (eval $ac_try) 2>&5
8089 ac_status=$?
8090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8091 (exit $ac_status); }; } &&
8092 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8094 (eval $ac_try) 2>&5
8095 ac_status=$?
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); }; }; then
8098 ac_hi=$ac_mid
8099else
8100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008101sed 's/^/| /' conftest.$ac_ext >&5
8102
Martin v. Löwis11437992002-04-12 09:54:03 +00008103ac_lo=`expr '(' $ac_mid ')' + 1`
8104fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008105rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008106done
8107case $ac_lo in
8108?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008109'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8110See \`config.log' for more details." >&5
8111echo "$as_me: error: cannot compute sizeof (float), 77
8112See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 { (exit 1); exit 1; }; } ;;
8114esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008115else
8116 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008117 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
8118echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008120else
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008122/* confdefs.h. */
8123_ACEOF
8124cat confdefs.h >>conftest.$ac_ext
8125cat >>conftest.$ac_ext <<_ACEOF
8126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008127$ac_includes_default
8128long longval () { return (long) (sizeof (float)); }
8129unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008130#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008131#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008132int
8133main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008134{
Martin v. Löwis11437992002-04-12 09:54:03 +00008135
8136 FILE *f = fopen ("conftest.val", "w");
8137 if (! f)
8138 exit (1);
8139 if (((long) (sizeof (float))) < 0)
8140 {
8141 long i = longval ();
8142 if (i != ((long) (sizeof (float))))
8143 exit (1);
8144 fprintf (f, "%ld\n", i);
8145 }
8146 else
8147 {
8148 unsigned long i = ulongval ();
8149 if (i != ((long) (sizeof (float))))
8150 exit (1);
8151 fprintf (f, "%lu\n", i);
8152 }
8153 exit (ferror (f) || fclose (f) != 0);
8154
8155 ;
8156 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008157}
Martin v. Löwis11437992002-04-12 09:54:03 +00008158_ACEOF
8159rm -f conftest$ac_exeext
8160if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8161 (eval $ac_link) 2>&5
8162 ac_status=$?
8163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8164 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8166 (eval $ac_try) 2>&5
8167 ac_status=$?
8168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8169 (exit $ac_status); }; }; then
8170 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008171else
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 echo "$as_me: program exited with status $ac_status" >&5
8173echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008174sed 's/^/| /' conftest.$ac_ext >&5
8175
Martin v. Löwis11437992002-04-12 09:54:03 +00008176( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008177{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8178See \`config.log' for more details." >&5
8179echo "$as_me: error: cannot compute sizeof (float), 77
8180See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008181 { (exit 1); exit 1; }; }
8182fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008183rm -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 +00008184fi
8185fi
8186rm -f conftest.val
8187else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008188 ac_cv_sizeof_float=0
8189fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008191echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8192echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8193cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008194#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008195_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008196
8197
Martin v. Löwis11437992002-04-12 09:54:03 +00008198echo "$as_me:$LINENO: checking for double" >&5
8199echo $ECHO_N "checking for double... $ECHO_C" >&6
8200if test "${ac_cv_type_double+set}" = set; then
8201 echo $ECHO_N "(cached) $ECHO_C" >&6
8202else
8203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008204/* confdefs.h. */
8205_ACEOF
8206cat confdefs.h >>conftest.$ac_ext
8207cat >>conftest.$ac_ext <<_ACEOF
8208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008209$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008210int
8211main ()
8212{
8213if ((double *) 0)
8214 return 0;
8215if (sizeof (double))
8216 return 0;
8217 ;
8218 return 0;
8219}
8220_ACEOF
8221rm -f conftest.$ac_objext
8222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008223 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008225 grep -v '^ *+' conftest.er1 >conftest.err
8226 rm -f conftest.er1
8227 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8229 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008230 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8232 (eval $ac_try) 2>&5
8233 ac_status=$?
8234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8235 (exit $ac_status); }; } &&
8236 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8238 (eval $ac_try) 2>&5
8239 ac_status=$?
8240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8241 (exit $ac_status); }; }; then
8242 ac_cv_type_double=yes
8243else
8244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008245sed 's/^/| /' conftest.$ac_ext >&5
8246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247ac_cv_type_double=no
8248fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008249rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008250fi
8251echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8252echo "${ECHO_T}$ac_cv_type_double" >&6
8253
8254echo "$as_me:$LINENO: checking size of double" >&5
8255echo $ECHO_N "checking size of double... $ECHO_C" >&6
8256if test "${ac_cv_sizeof_double+set}" = set; then
8257 echo $ECHO_N "(cached) $ECHO_C" >&6
8258else
8259 if test "$ac_cv_type_double" = yes; then
8260 # The cast to unsigned long works around a bug in the HP C Compiler
8261 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8262 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8263 # This bug is HP SR number 8606223364.
8264 if test "$cross_compiling" = yes; then
8265 # Depending upon the size, compute the lo and hi bounds.
8266cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008267/* confdefs.h. */
8268_ACEOF
8269cat confdefs.h >>conftest.$ac_ext
8270cat >>conftest.$ac_ext <<_ACEOF
8271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008272$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008273int
8274main ()
8275{
8276static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8277test_array [0] = 0
8278
8279 ;
8280 return 0;
8281}
8282_ACEOF
8283rm -f conftest.$ac_objext
8284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008285 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008287 grep -v '^ *+' conftest.er1 >conftest.err
8288 rm -f conftest.er1
8289 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8291 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008292 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8294 (eval $ac_try) 2>&5
8295 ac_status=$?
8296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8297 (exit $ac_status); }; } &&
8298 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8300 (eval $ac_try) 2>&5
8301 ac_status=$?
8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303 (exit $ac_status); }; }; then
8304 ac_lo=0 ac_mid=0
8305 while :; do
8306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008307/* confdefs.h. */
8308_ACEOF
8309cat confdefs.h >>conftest.$ac_ext
8310cat >>conftest.$ac_ext <<_ACEOF
8311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008312$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008313int
8314main ()
8315{
8316static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8317test_array [0] = 0
8318
8319 ;
8320 return 0;
8321}
8322_ACEOF
8323rm -f conftest.$ac_objext
8324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008325 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008327 grep -v '^ *+' conftest.er1 >conftest.err
8328 rm -f conftest.er1
8329 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8331 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008332 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8334 (eval $ac_try) 2>&5
8335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); }; } &&
8338 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8340 (eval $ac_try) 2>&5
8341 ac_status=$?
8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8343 (exit $ac_status); }; }; then
8344 ac_hi=$ac_mid; break
8345else
8346 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008347sed 's/^/| /' conftest.$ac_ext >&5
8348
Martin v. Löwis11437992002-04-12 09:54:03 +00008349ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008350 if test $ac_lo -le $ac_mid; then
8351 ac_lo= ac_hi=
8352 break
8353 fi
8354 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008355fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008356rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008357 done
8358else
8359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008360sed 's/^/| /' conftest.$ac_ext >&5
8361
Martin v. Löwis11437992002-04-12 09:54:03 +00008362cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008363/* confdefs.h. */
8364_ACEOF
8365cat confdefs.h >>conftest.$ac_ext
8366cat >>conftest.$ac_ext <<_ACEOF
8367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008368$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008369int
8370main ()
8371{
8372static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8373test_array [0] = 0
8374
8375 ;
8376 return 0;
8377}
8378_ACEOF
8379rm -f conftest.$ac_objext
8380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008381 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008383 grep -v '^ *+' conftest.er1 >conftest.err
8384 rm -f conftest.er1
8385 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8387 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008388 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8390 (eval $ac_try) 2>&5
8391 ac_status=$?
8392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8393 (exit $ac_status); }; } &&
8394 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8396 (eval $ac_try) 2>&5
8397 ac_status=$?
8398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8399 (exit $ac_status); }; }; then
8400 ac_hi=-1 ac_mid=-1
8401 while :; do
8402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008403/* confdefs.h. */
8404_ACEOF
8405cat confdefs.h >>conftest.$ac_ext
8406cat >>conftest.$ac_ext <<_ACEOF
8407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008408$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008409int
8410main ()
8411{
8412static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8413test_array [0] = 0
8414
8415 ;
8416 return 0;
8417}
8418_ACEOF
8419rm -f conftest.$ac_objext
8420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008421 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008423 grep -v '^ *+' conftest.er1 >conftest.err
8424 rm -f conftest.er1
8425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8427 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008428 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8430 (eval $ac_try) 2>&5
8431 ac_status=$?
8432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8433 (exit $ac_status); }; } &&
8434 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8436 (eval $ac_try) 2>&5
8437 ac_status=$?
8438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8439 (exit $ac_status); }; }; then
8440 ac_lo=$ac_mid; break
8441else
8442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008443sed 's/^/| /' conftest.$ac_ext >&5
8444
Martin v. Löwis11437992002-04-12 09:54:03 +00008445ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008446 if test $ac_mid -le $ac_hi; then
8447 ac_lo= ac_hi=
8448 break
8449 fi
8450 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008451fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008452rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 done
8454else
8455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008456sed 's/^/| /' conftest.$ac_ext >&5
8457
Martin v. Löwis11437992002-04-12 09:54:03 +00008458ac_lo= ac_hi=
8459fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008460rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008461fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008462rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008463# Binary search between lo and hi bounds.
8464while test "x$ac_lo" != "x$ac_hi"; do
8465 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008467/* confdefs.h. */
8468_ACEOF
8469cat confdefs.h >>conftest.$ac_ext
8470cat >>conftest.$ac_ext <<_ACEOF
8471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008472$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008473int
8474main ()
8475{
8476static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8477test_array [0] = 0
8478
8479 ;
8480 return 0;
8481}
8482_ACEOF
8483rm -f conftest.$ac_objext
8484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008485 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008487 grep -v '^ *+' conftest.er1 >conftest.err
8488 rm -f conftest.er1
8489 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008492 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8494 (eval $ac_try) 2>&5
8495 ac_status=$?
8496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497 (exit $ac_status); }; } &&
8498 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8500 (eval $ac_try) 2>&5
8501 ac_status=$?
8502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8503 (exit $ac_status); }; }; then
8504 ac_hi=$ac_mid
8505else
8506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008507sed 's/^/| /' conftest.$ac_ext >&5
8508
Martin v. Löwis11437992002-04-12 09:54:03 +00008509ac_lo=`expr '(' $ac_mid ')' + 1`
8510fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008511rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008512done
8513case $ac_lo in
8514?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008515'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8516See \`config.log' for more details." >&5
8517echo "$as_me: error: cannot compute sizeof (double), 77
8518See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 { (exit 1); exit 1; }; } ;;
8520esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008521else
8522 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008523 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
8524echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008526else
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008528/* confdefs.h. */
8529_ACEOF
8530cat confdefs.h >>conftest.$ac_ext
8531cat >>conftest.$ac_ext <<_ACEOF
8532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008533$ac_includes_default
8534long longval () { return (long) (sizeof (double)); }
8535unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008536#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008537#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008538int
8539main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008540{
Martin v. Löwis11437992002-04-12 09:54:03 +00008541
8542 FILE *f = fopen ("conftest.val", "w");
8543 if (! f)
8544 exit (1);
8545 if (((long) (sizeof (double))) < 0)
8546 {
8547 long i = longval ();
8548 if (i != ((long) (sizeof (double))))
8549 exit (1);
8550 fprintf (f, "%ld\n", i);
8551 }
8552 else
8553 {
8554 unsigned long i = ulongval ();
8555 if (i != ((long) (sizeof (double))))
8556 exit (1);
8557 fprintf (f, "%lu\n", i);
8558 }
8559 exit (ferror (f) || fclose (f) != 0);
8560
8561 ;
8562 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008563}
Martin v. Löwis11437992002-04-12 09:54:03 +00008564_ACEOF
8565rm -f conftest$ac_exeext
8566if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8567 (eval $ac_link) 2>&5
8568 ac_status=$?
8569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8572 (eval $ac_try) 2>&5
8573 ac_status=$?
8574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8575 (exit $ac_status); }; }; then
8576 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008577else
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 echo "$as_me: program exited with status $ac_status" >&5
8579echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008580sed 's/^/| /' conftest.$ac_ext >&5
8581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008583{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8584See \`config.log' for more details." >&5
8585echo "$as_me: error: cannot compute sizeof (double), 77
8586See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 { (exit 1); exit 1; }; }
8588fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008589rm -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 +00008590fi
8591fi
8592rm -f conftest.val
8593else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008594 ac_cv_sizeof_double=0
8595fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008596fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008597echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8598echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8599cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008600#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008601_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008602
8603
Martin v. Löwis11437992002-04-12 09:54:03 +00008604echo "$as_me:$LINENO: checking for fpos_t" >&5
8605echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8606if test "${ac_cv_type_fpos_t+set}" = set; then
8607 echo $ECHO_N "(cached) $ECHO_C" >&6
8608else
8609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008610/* confdefs.h. */
8611_ACEOF
8612cat confdefs.h >>conftest.$ac_ext
8613cat >>conftest.$ac_ext <<_ACEOF
8614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008615$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008616int
8617main ()
8618{
8619if ((fpos_t *) 0)
8620 return 0;
8621if (sizeof (fpos_t))
8622 return 0;
8623 ;
8624 return 0;
8625}
8626_ACEOF
8627rm -f conftest.$ac_objext
8628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008629 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008631 grep -v '^ *+' conftest.er1 >conftest.err
8632 rm -f conftest.er1
8633 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8635 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008636 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8638 (eval $ac_try) 2>&5
8639 ac_status=$?
8640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8641 (exit $ac_status); }; } &&
8642 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8644 (eval $ac_try) 2>&5
8645 ac_status=$?
8646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8647 (exit $ac_status); }; }; then
8648 ac_cv_type_fpos_t=yes
8649else
8650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008651sed 's/^/| /' conftest.$ac_ext >&5
8652
Martin v. Löwis11437992002-04-12 09:54:03 +00008653ac_cv_type_fpos_t=no
8654fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008656fi
8657echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8658echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8659
8660echo "$as_me:$LINENO: checking size of fpos_t" >&5
8661echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8662if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8663 echo $ECHO_N "(cached) $ECHO_C" >&6
8664else
8665 if test "$ac_cv_type_fpos_t" = yes; then
8666 # The cast to unsigned long works around a bug in the HP C Compiler
8667 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8668 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8669 # This bug is HP SR number 8606223364.
8670 if test "$cross_compiling" = yes; then
8671 # Depending upon the size, compute the lo and hi bounds.
8672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008673/* confdefs.h. */
8674_ACEOF
8675cat confdefs.h >>conftest.$ac_ext
8676cat >>conftest.$ac_ext <<_ACEOF
8677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008678$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008679int
8680main ()
8681{
8682static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8683test_array [0] = 0
8684
8685 ;
8686 return 0;
8687}
8688_ACEOF
8689rm -f conftest.$ac_objext
8690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008691 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008693 grep -v '^ *+' conftest.er1 >conftest.err
8694 rm -f conftest.er1
8695 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8697 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008698 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8700 (eval $ac_try) 2>&5
8701 ac_status=$?
8702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8703 (exit $ac_status); }; } &&
8704 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8706 (eval $ac_try) 2>&5
8707 ac_status=$?
8708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8709 (exit $ac_status); }; }; then
8710 ac_lo=0 ac_mid=0
8711 while :; do
8712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008713/* confdefs.h. */
8714_ACEOF
8715cat confdefs.h >>conftest.$ac_ext
8716cat >>conftest.$ac_ext <<_ACEOF
8717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008718$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008719int
8720main ()
8721{
8722static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8723test_array [0] = 0
8724
8725 ;
8726 return 0;
8727}
8728_ACEOF
8729rm -f conftest.$ac_objext
8730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008731 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008733 grep -v '^ *+' conftest.er1 >conftest.err
8734 rm -f conftest.er1
8735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8737 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008738 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8740 (eval $ac_try) 2>&5
8741 ac_status=$?
8742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8743 (exit $ac_status); }; } &&
8744 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8746 (eval $ac_try) 2>&5
8747 ac_status=$?
8748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8749 (exit $ac_status); }; }; then
8750 ac_hi=$ac_mid; break
8751else
8752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008753sed 's/^/| /' conftest.$ac_ext >&5
8754
Martin v. Löwis11437992002-04-12 09:54:03 +00008755ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008756 if test $ac_lo -le $ac_mid; then
8757 ac_lo= ac_hi=
8758 break
8759 fi
8760 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008761fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008762rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 done
8764else
8765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008766sed 's/^/| /' conftest.$ac_ext >&5
8767
Martin v. Löwis11437992002-04-12 09:54:03 +00008768cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008769/* confdefs.h. */
8770_ACEOF
8771cat confdefs.h >>conftest.$ac_ext
8772cat >>conftest.$ac_ext <<_ACEOF
8773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008774$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008775int
8776main ()
8777{
8778static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8779test_array [0] = 0
8780
8781 ;
8782 return 0;
8783}
8784_ACEOF
8785rm -f conftest.$ac_objext
8786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008787 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008789 grep -v '^ *+' conftest.er1 >conftest.err
8790 rm -f conftest.er1
8791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8793 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008794 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8796 (eval $ac_try) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); }; } &&
8800 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8802 (eval $ac_try) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_hi=-1 ac_mid=-1
8807 while :; do
8808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008809/* confdefs.h. */
8810_ACEOF
8811cat confdefs.h >>conftest.$ac_ext
8812cat >>conftest.$ac_ext <<_ACEOF
8813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
8818static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8819test_array [0] = 0
8820
8821 ;
8822 return 0;
8823}
8824_ACEOF
8825rm -f conftest.$ac_objext
8826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008827 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008829 grep -v '^ *+' conftest.er1 >conftest.err
8830 rm -f conftest.er1
8831 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008834 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8836 (eval $ac_try) 2>&5
8837 ac_status=$?
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); }; } &&
8840 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8842 (eval $ac_try) 2>&5
8843 ac_status=$?
8844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8845 (exit $ac_status); }; }; then
8846 ac_lo=$ac_mid; break
8847else
8848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008849sed 's/^/| /' conftest.$ac_ext >&5
8850
Martin v. Löwis11437992002-04-12 09:54:03 +00008851ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008852 if test $ac_mid -le $ac_hi; then
8853 ac_lo= ac_hi=
8854 break
8855 fi
8856 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008857fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008858rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 done
8860else
8861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008862sed 's/^/| /' conftest.$ac_ext >&5
8863
Martin v. Löwis11437992002-04-12 09:54:03 +00008864ac_lo= ac_hi=
8865fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008866rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008867fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008868rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008869# Binary search between lo and hi bounds.
8870while test "x$ac_lo" != "x$ac_hi"; do
8871 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008873/* confdefs.h. */
8874_ACEOF
8875cat confdefs.h >>conftest.$ac_ext
8876cat >>conftest.$ac_ext <<_ACEOF
8877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008879int
8880main ()
8881{
8882static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8883test_array [0] = 0
8884
8885 ;
8886 return 0;
8887}
8888_ACEOF
8889rm -f conftest.$ac_objext
8890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008891 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008893 grep -v '^ *+' conftest.er1 >conftest.err
8894 rm -f conftest.er1
8895 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8897 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008898 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8900 (eval $ac_try) 2>&5
8901 ac_status=$?
8902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8903 (exit $ac_status); }; } &&
8904 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8906 (eval $ac_try) 2>&5
8907 ac_status=$?
8908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8909 (exit $ac_status); }; }; then
8910 ac_hi=$ac_mid
8911else
8912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008913sed 's/^/| /' conftest.$ac_ext >&5
8914
Martin v. Löwis11437992002-04-12 09:54:03 +00008915ac_lo=`expr '(' $ac_mid ')' + 1`
8916fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008918done
8919case $ac_lo in
8920?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008921'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8922See \`config.log' for more details." >&5
8923echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8924See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 { (exit 1); exit 1; }; } ;;
8926esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008927else
8928 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008929 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
8930echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008932else
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008934/* confdefs.h. */
8935_ACEOF
8936cat confdefs.h >>conftest.$ac_ext
8937cat >>conftest.$ac_ext <<_ACEOF
8938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008939$ac_includes_default
8940long longval () { return (long) (sizeof (fpos_t)); }
8941unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008942#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008943#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008944int
8945main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008946{
Martin v. Löwis11437992002-04-12 09:54:03 +00008947
8948 FILE *f = fopen ("conftest.val", "w");
8949 if (! f)
8950 exit (1);
8951 if (((long) (sizeof (fpos_t))) < 0)
8952 {
8953 long i = longval ();
8954 if (i != ((long) (sizeof (fpos_t))))
8955 exit (1);
8956 fprintf (f, "%ld\n", i);
8957 }
8958 else
8959 {
8960 unsigned long i = ulongval ();
8961 if (i != ((long) (sizeof (fpos_t))))
8962 exit (1);
8963 fprintf (f, "%lu\n", i);
8964 }
8965 exit (ferror (f) || fclose (f) != 0);
8966
8967 ;
8968 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008969}
Martin v. Löwis11437992002-04-12 09:54:03 +00008970_ACEOF
8971rm -f conftest$ac_exeext
8972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8973 (eval $ac_link) 2>&5
8974 ac_status=$?
8975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8978 (eval $ac_try) 2>&5
8979 ac_status=$?
8980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8981 (exit $ac_status); }; }; then
8982 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008983else
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 echo "$as_me: program exited with status $ac_status" >&5
8985echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008986sed 's/^/| /' conftest.$ac_ext >&5
8987
Martin v. Löwis11437992002-04-12 09:54:03 +00008988( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008989{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8990See \`config.log' for more details." >&5
8991echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8992See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 { (exit 1); exit 1; }; }
8994fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008995rm -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 +00008996fi
8997fi
8998rm -f conftest.val
8999else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009000 ac_cv_sizeof_fpos_t=0
9001fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009003echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9004echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
9005cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009006#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009007_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009008
Michael W. Hudson54241132001-12-07 15:38:26 +00009009
Martin v. Löwis18e16552006-02-15 17:27:45 +00009010echo "$as_me:$LINENO: checking for size_t" >&5
9011echo $ECHO_N "checking for size_t... $ECHO_C" >&6
9012if test "${ac_cv_type_size_t+set}" = set; then
9013 echo $ECHO_N "(cached) $ECHO_C" >&6
9014else
9015 cat >conftest.$ac_ext <<_ACEOF
9016/* confdefs.h. */
9017_ACEOF
9018cat confdefs.h >>conftest.$ac_ext
9019cat >>conftest.$ac_ext <<_ACEOF
9020/* end confdefs.h. */
9021$ac_includes_default
9022int
9023main ()
9024{
9025if ((size_t *) 0)
9026 return 0;
9027if (sizeof (size_t))
9028 return 0;
9029 ;
9030 return 0;
9031}
9032_ACEOF
9033rm -f conftest.$ac_objext
9034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9035 (eval $ac_compile) 2>conftest.er1
9036 ac_status=$?
9037 grep -v '^ *+' conftest.er1 >conftest.err
9038 rm -f conftest.er1
9039 cat conftest.err >&5
9040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9041 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009042 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwis18e16552006-02-15 17:27:45 +00009043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9044 (eval $ac_try) 2>&5
9045 ac_status=$?
9046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9047 (exit $ac_status); }; } &&
9048 { ac_try='test -s conftest.$ac_objext'
9049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9050 (eval $ac_try) 2>&5
9051 ac_status=$?
9052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9053 (exit $ac_status); }; }; then
9054 ac_cv_type_size_t=yes
9055else
9056 echo "$as_me: failed program was:" >&5
9057sed 's/^/| /' conftest.$ac_ext >&5
9058
9059ac_cv_type_size_t=no
9060fi
9061rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9062fi
9063echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9064echo "${ECHO_T}$ac_cv_type_size_t" >&6
9065
9066echo "$as_me:$LINENO: checking size of size_t" >&5
9067echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
9068if test "${ac_cv_sizeof_size_t+set}" = set; then
9069 echo $ECHO_N "(cached) $ECHO_C" >&6
9070else
9071 if test "$ac_cv_type_size_t" = yes; then
9072 # The cast to unsigned long works around a bug in the HP C Compiler
9073 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9074 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9075 # This bug is HP SR number 8606223364.
9076 if test "$cross_compiling" = yes; then
9077 # Depending upon the size, compute the lo and hi bounds.
9078cat >conftest.$ac_ext <<_ACEOF
9079/* confdefs.h. */
9080_ACEOF
9081cat confdefs.h >>conftest.$ac_ext
9082cat >>conftest.$ac_ext <<_ACEOF
9083/* end confdefs.h. */
9084$ac_includes_default
9085int
9086main ()
9087{
9088static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
9089test_array [0] = 0
9090
9091 ;
9092 return 0;
9093}
9094_ACEOF
9095rm -f conftest.$ac_objext
9096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9097 (eval $ac_compile) 2>conftest.er1
9098 ac_status=$?
9099 grep -v '^ *+' conftest.er1 >conftest.err
9100 rm -f conftest.er1
9101 cat conftest.err >&5
9102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009104 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwis18e16552006-02-15 17:27:45 +00009105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9106 (eval $ac_try) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); }; } &&
9110 { ac_try='test -s conftest.$ac_objext'
9111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9112 (eval $ac_try) 2>&5
9113 ac_status=$?
9114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9115 (exit $ac_status); }; }; then
9116 ac_lo=0 ac_mid=0
9117 while :; do
9118 cat >conftest.$ac_ext <<_ACEOF
9119/* confdefs.h. */
9120_ACEOF
9121cat confdefs.h >>conftest.$ac_ext
9122cat >>conftest.$ac_ext <<_ACEOF
9123/* end confdefs.h. */
9124$ac_includes_default
9125int
9126main ()
9127{
9128static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
9129test_array [0] = 0
9130
9131 ;
9132 return 0;
9133}
9134_ACEOF
9135rm -f conftest.$ac_objext
9136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9137 (eval $ac_compile) 2>conftest.er1
9138 ac_status=$?
9139 grep -v '^ *+' conftest.er1 >conftest.err
9140 rm -f conftest.er1
9141 cat conftest.err >&5
9142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9143 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009144 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwis18e16552006-02-15 17:27:45 +00009145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9146 (eval $ac_try) 2>&5
9147 ac_status=$?
9148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9149 (exit $ac_status); }; } &&
9150 { ac_try='test -s conftest.$ac_objext'
9151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9152 (eval $ac_try) 2>&5
9153 ac_status=$?
9154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9155 (exit $ac_status); }; }; then
9156 ac_hi=$ac_mid; break
9157else
9158 echo "$as_me: failed program was:" >&5
9159sed 's/^/| /' conftest.$ac_ext >&5
9160
9161ac_lo=`expr $ac_mid + 1`
9162 if test $ac_lo -le $ac_mid; then
9163 ac_lo= ac_hi=
9164 break
9165 fi
9166 ac_mid=`expr 2 '*' $ac_mid + 1`
9167fi
9168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9169 done
9170else
9171 echo "$as_me: failed program was:" >&5
9172sed 's/^/| /' conftest.$ac_ext >&5
9173
9174cat >conftest.$ac_ext <<_ACEOF
9175/* confdefs.h. */
9176_ACEOF
9177cat confdefs.h >>conftest.$ac_ext
9178cat >>conftest.$ac_ext <<_ACEOF
9179/* end confdefs.h. */
9180$ac_includes_default
9181int
9182main ()
9183{
9184static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
9185test_array [0] = 0
9186
9187 ;
9188 return 0;
9189}
9190_ACEOF
9191rm -f conftest.$ac_objext
9192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9193 (eval $ac_compile) 2>conftest.er1
9194 ac_status=$?
9195 grep -v '^ *+' conftest.er1 >conftest.err
9196 rm -f conftest.er1
9197 cat conftest.err >&5
9198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9199 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009200 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwis18e16552006-02-15 17:27:45 +00009201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9202 (eval $ac_try) 2>&5
9203 ac_status=$?
9204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9205 (exit $ac_status); }; } &&
9206 { ac_try='test -s conftest.$ac_objext'
9207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9208 (eval $ac_try) 2>&5
9209 ac_status=$?
9210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9211 (exit $ac_status); }; }; then
9212 ac_hi=-1 ac_mid=-1
9213 while :; do
9214 cat >conftest.$ac_ext <<_ACEOF
9215/* confdefs.h. */
9216_ACEOF
9217cat confdefs.h >>conftest.$ac_ext
9218cat >>conftest.$ac_ext <<_ACEOF
9219/* end confdefs.h. */
9220$ac_includes_default
9221int
9222main ()
9223{
9224static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
9225test_array [0] = 0
9226
9227 ;
9228 return 0;
9229}
9230_ACEOF
9231rm -f conftest.$ac_objext
9232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9233 (eval $ac_compile) 2>conftest.er1
9234 ac_status=$?
9235 grep -v '^ *+' conftest.er1 >conftest.err
9236 rm -f conftest.er1
9237 cat conftest.err >&5
9238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9239 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009240 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwis18e16552006-02-15 17:27:45 +00009241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9242 (eval $ac_try) 2>&5
9243 ac_status=$?
9244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9245 (exit $ac_status); }; } &&
9246 { ac_try='test -s conftest.$ac_objext'
9247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9248 (eval $ac_try) 2>&5
9249 ac_status=$?
9250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9251 (exit $ac_status); }; }; then
9252 ac_lo=$ac_mid; break
9253else
9254 echo "$as_me: failed program was:" >&5
9255sed 's/^/| /' conftest.$ac_ext >&5
9256
9257ac_hi=`expr '(' $ac_mid ')' - 1`
9258 if test $ac_mid -le $ac_hi; then
9259 ac_lo= ac_hi=
9260 break
9261 fi
9262 ac_mid=`expr 2 '*' $ac_mid`
9263fi
9264rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9265 done
9266else
9267 echo "$as_me: failed program was:" >&5
9268sed 's/^/| /' conftest.$ac_ext >&5
9269
9270ac_lo= ac_hi=
9271fi
9272rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9273fi
9274rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9275# Binary search between lo and hi bounds.
9276while test "x$ac_lo" != "x$ac_hi"; do
9277 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9278 cat >conftest.$ac_ext <<_ACEOF
9279/* confdefs.h. */
9280_ACEOF
9281cat confdefs.h >>conftest.$ac_ext
9282cat >>conftest.$ac_ext <<_ACEOF
9283/* end confdefs.h. */
9284$ac_includes_default
9285int
9286main ()
9287{
9288static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
9289test_array [0] = 0
9290
9291 ;
9292 return 0;
9293}
9294_ACEOF
9295rm -f conftest.$ac_objext
9296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9297 (eval $ac_compile) 2>conftest.er1
9298 ac_status=$?
9299 grep -v '^ *+' conftest.er1 >conftest.err
9300 rm -f conftest.er1
9301 cat conftest.err >&5
9302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9303 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009304 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwis18e16552006-02-15 17:27:45 +00009305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9306 (eval $ac_try) 2>&5
9307 ac_status=$?
9308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9309 (exit $ac_status); }; } &&
9310 { ac_try='test -s conftest.$ac_objext'
9311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9312 (eval $ac_try) 2>&5
9313 ac_status=$?
9314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315 (exit $ac_status); }; }; then
9316 ac_hi=$ac_mid
9317else
9318 echo "$as_me: failed program was:" >&5
9319sed 's/^/| /' conftest.$ac_ext >&5
9320
9321ac_lo=`expr '(' $ac_mid ')' + 1`
9322fi
9323rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9324done
9325case $ac_lo in
9326?*) ac_cv_sizeof_size_t=$ac_lo;;
9327'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
9328See \`config.log' for more details." >&5
9329echo "$as_me: error: cannot compute sizeof (size_t), 77
9330See \`config.log' for more details." >&2;}
9331 { (exit 1); exit 1; }; } ;;
9332esac
9333else
9334 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009335 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
9336echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis18e16552006-02-15 17:27:45 +00009337 { (exit 1); exit 1; }; }
9338else
9339 cat >conftest.$ac_ext <<_ACEOF
9340/* confdefs.h. */
9341_ACEOF
9342cat confdefs.h >>conftest.$ac_ext
9343cat >>conftest.$ac_ext <<_ACEOF
9344/* end confdefs.h. */
9345$ac_includes_default
9346long longval () { return (long) (sizeof (size_t)); }
9347unsigned long ulongval () { return (long) (sizeof (size_t)); }
9348#include <stdio.h>
9349#include <stdlib.h>
9350int
9351main ()
9352{
9353
9354 FILE *f = fopen ("conftest.val", "w");
9355 if (! f)
9356 exit (1);
9357 if (((long) (sizeof (size_t))) < 0)
9358 {
9359 long i = longval ();
9360 if (i != ((long) (sizeof (size_t))))
9361 exit (1);
9362 fprintf (f, "%ld\n", i);
9363 }
9364 else
9365 {
9366 unsigned long i = ulongval ();
9367 if (i != ((long) (sizeof (size_t))))
9368 exit (1);
9369 fprintf (f, "%lu\n", i);
9370 }
9371 exit (ferror (f) || fclose (f) != 0);
9372
9373 ;
9374 return 0;
9375}
9376_ACEOF
9377rm -f conftest$ac_exeext
9378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9379 (eval $ac_link) 2>&5
9380 ac_status=$?
9381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9384 (eval $ac_try) 2>&5
9385 ac_status=$?
9386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9387 (exit $ac_status); }; }; then
9388 ac_cv_sizeof_size_t=`cat conftest.val`
9389else
9390 echo "$as_me: program exited with status $ac_status" >&5
9391echo "$as_me: failed program was:" >&5
9392sed 's/^/| /' conftest.$ac_ext >&5
9393
9394( exit $ac_status )
9395{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
9396See \`config.log' for more details." >&5
9397echo "$as_me: error: cannot compute sizeof (size_t), 77
9398See \`config.log' for more details." >&2;}
9399 { (exit 1); exit 1; }; }
9400fi
9401rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9402fi
9403fi
9404rm -f conftest.val
9405else
9406 ac_cv_sizeof_size_t=0
9407fi
9408fi
9409echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
9410echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
9411cat >>confdefs.h <<_ACEOF
9412#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
9413_ACEOF
9414
9415
Michael W. Hudson54241132001-12-07 15:38:26 +00009416
Martin v. Löwis11437992002-04-12 09:54:03 +00009417echo "$as_me:$LINENO: checking for long long support" >&5
9418echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009419have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009420cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009421/* confdefs.h. */
9422_ACEOF
9423cat confdefs.h >>conftest.$ac_ext
9424cat >>conftest.$ac_ext <<_ACEOF
9425/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009426
Martin v. Löwis11437992002-04-12 09:54:03 +00009427int
9428main ()
9429{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009430long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ;
9432 return 0;
9433}
9434_ACEOF
9435rm -f conftest.$ac_objext
9436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009437 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009439 grep -v '^ *+' conftest.er1 >conftest.err
9440 rm -f conftest.er1
9441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9443 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009444 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9446 (eval $ac_try) 2>&5
9447 ac_status=$?
9448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9449 (exit $ac_status); }; } &&
9450 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9452 (eval $ac_try) 2>&5
9453 ac_status=$?
9454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9455 (exit $ac_status); }; }; then
9456
9457
9458cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009459#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009460_ACEOF
9461
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009462 have_long_long=yes
9463
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009464else
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009466sed 's/^/| /' conftest.$ac_ext >&5
9467
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009468fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009469rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009470echo "$as_me:$LINENO: result: $have_long_long" >&5
9471echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009472if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009473echo "$as_me:$LINENO: checking for long long" >&5
9474echo $ECHO_N "checking for long long... $ECHO_C" >&6
9475if test "${ac_cv_type_long_long+set}" = set; then
9476 echo $ECHO_N "(cached) $ECHO_C" >&6
9477else
9478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009479/* confdefs.h. */
9480_ACEOF
9481cat confdefs.h >>conftest.$ac_ext
9482cat >>conftest.$ac_ext <<_ACEOF
9483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009484$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009485int
9486main ()
9487{
9488if ((long long *) 0)
9489 return 0;
9490if (sizeof (long long))
9491 return 0;
9492 ;
9493 return 0;
9494}
9495_ACEOF
9496rm -f conftest.$ac_objext
9497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009498 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009500 grep -v '^ *+' conftest.er1 >conftest.err
9501 rm -f conftest.er1
9502 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9504 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009505 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9507 (eval $ac_try) 2>&5
9508 ac_status=$?
9509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9510 (exit $ac_status); }; } &&
9511 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9513 (eval $ac_try) 2>&5
9514 ac_status=$?
9515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9516 (exit $ac_status); }; }; then
9517 ac_cv_type_long_long=yes
9518else
9519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009520sed 's/^/| /' conftest.$ac_ext >&5
9521
Martin v. Löwis11437992002-04-12 09:54:03 +00009522ac_cv_type_long_long=no
9523fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009524rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009525fi
9526echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9527echo "${ECHO_T}$ac_cv_type_long_long" >&6
9528
9529echo "$as_me:$LINENO: checking size of long long" >&5
9530echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9531if test "${ac_cv_sizeof_long_long+set}" = set; then
9532 echo $ECHO_N "(cached) $ECHO_C" >&6
9533else
9534 if test "$ac_cv_type_long_long" = yes; then
9535 # The cast to unsigned long works around a bug in the HP C Compiler
9536 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9537 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9538 # This bug is HP SR number 8606223364.
9539 if test "$cross_compiling" = yes; then
9540 # Depending upon the size, compute the lo and hi bounds.
9541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009542/* confdefs.h. */
9543_ACEOF
9544cat confdefs.h >>conftest.$ac_ext
9545cat >>conftest.$ac_ext <<_ACEOF
9546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009548int
9549main ()
9550{
9551static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9552test_array [0] = 0
9553
9554 ;
9555 return 0;
9556}
9557_ACEOF
9558rm -f conftest.$ac_objext
9559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009560 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009562 grep -v '^ *+' conftest.er1 >conftest.err
9563 rm -f conftest.er1
9564 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9566 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009567 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9569 (eval $ac_try) 2>&5
9570 ac_status=$?
9571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9572 (exit $ac_status); }; } &&
9573 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9575 (eval $ac_try) 2>&5
9576 ac_status=$?
9577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9578 (exit $ac_status); }; }; then
9579 ac_lo=0 ac_mid=0
9580 while :; do
9581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009582/* confdefs.h. */
9583_ACEOF
9584cat confdefs.h >>conftest.$ac_ext
9585cat >>conftest.$ac_ext <<_ACEOF
9586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009587$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009588int
9589main ()
9590{
9591static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9592test_array [0] = 0
9593
9594 ;
9595 return 0;
9596}
9597_ACEOF
9598rm -f conftest.$ac_objext
9599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009600 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009602 grep -v '^ *+' conftest.er1 >conftest.err
9603 rm -f conftest.er1
9604 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9606 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009607 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9609 (eval $ac_try) 2>&5
9610 ac_status=$?
9611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9612 (exit $ac_status); }; } &&
9613 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9615 (eval $ac_try) 2>&5
9616 ac_status=$?
9617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9618 (exit $ac_status); }; }; then
9619 ac_hi=$ac_mid; break
9620else
9621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009622sed 's/^/| /' conftest.$ac_ext >&5
9623
Martin v. Löwis11437992002-04-12 09:54:03 +00009624ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009625 if test $ac_lo -le $ac_mid; then
9626 ac_lo= ac_hi=
9627 break
9628 fi
9629 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009630fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009631rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 done
9633else
9634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009635sed 's/^/| /' conftest.$ac_ext >&5
9636
Martin v. Löwis11437992002-04-12 09:54:03 +00009637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009638/* confdefs.h. */
9639_ACEOF
9640cat confdefs.h >>conftest.$ac_ext
9641cat >>conftest.$ac_ext <<_ACEOF
9642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009643$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009644int
9645main ()
9646{
9647static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9648test_array [0] = 0
9649
9650 ;
9651 return 0;
9652}
9653_ACEOF
9654rm -f conftest.$ac_objext
9655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009656 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009658 grep -v '^ *+' conftest.er1 >conftest.err
9659 rm -f conftest.er1
9660 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9662 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009663 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
9669 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9671 (eval $ac_try) 2>&5
9672 ac_status=$?
9673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9674 (exit $ac_status); }; }; then
9675 ac_hi=-1 ac_mid=-1
9676 while :; do
9677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009678/* confdefs.h. */
9679_ACEOF
9680cat confdefs.h >>conftest.$ac_ext
9681cat >>conftest.$ac_ext <<_ACEOF
9682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009683$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009684int
9685main ()
9686{
9687static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9688test_array [0] = 0
9689
9690 ;
9691 return 0;
9692}
9693_ACEOF
9694rm -f conftest.$ac_objext
9695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009696 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009698 grep -v '^ *+' conftest.er1 >conftest.err
9699 rm -f conftest.er1
9700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9702 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009703 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9705 (eval $ac_try) 2>&5
9706 ac_status=$?
9707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708 (exit $ac_status); }; } &&
9709 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9711 (eval $ac_try) 2>&5
9712 ac_status=$?
9713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9714 (exit $ac_status); }; }; then
9715 ac_lo=$ac_mid; break
9716else
9717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009718sed 's/^/| /' conftest.$ac_ext >&5
9719
Martin v. Löwis11437992002-04-12 09:54:03 +00009720ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009721 if test $ac_mid -le $ac_hi; then
9722 ac_lo= ac_hi=
9723 break
9724 fi
9725 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009726fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009727rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 done
9729else
9730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009731sed 's/^/| /' conftest.$ac_ext >&5
9732
Martin v. Löwis11437992002-04-12 09:54:03 +00009733ac_lo= ac_hi=
9734fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009736fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009737rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009738# Binary search between lo and hi bounds.
9739while test "x$ac_lo" != "x$ac_hi"; do
9740 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009742/* confdefs.h. */
9743_ACEOF
9744cat confdefs.h >>conftest.$ac_ext
9745cat >>conftest.$ac_ext <<_ACEOF
9746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009747$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009748int
9749main ()
9750{
9751static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9752test_array [0] = 0
9753
9754 ;
9755 return 0;
9756}
9757_ACEOF
9758rm -f conftest.$ac_objext
9759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009760 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009762 grep -v '^ *+' conftest.er1 >conftest.err
9763 rm -f conftest.er1
9764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009767 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9769 (eval $ac_try) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); }; } &&
9773 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
9779 ac_hi=$ac_mid
9780else
9781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009782sed 's/^/| /' conftest.$ac_ext >&5
9783
Martin v. Löwis11437992002-04-12 09:54:03 +00009784ac_lo=`expr '(' $ac_mid ')' + 1`
9785fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009786rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009787done
9788case $ac_lo in
9789?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009790'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9791See \`config.log' for more details." >&5
9792echo "$as_me: error: cannot compute sizeof (long long), 77
9793See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 { (exit 1); exit 1; }; } ;;
9795esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009796else
9797 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009798 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
9799echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009801else
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* confdefs.h. */
9804_ACEOF
9805cat confdefs.h >>conftest.$ac_ext
9806cat >>conftest.$ac_ext <<_ACEOF
9807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808$ac_includes_default
9809long longval () { return (long) (sizeof (long long)); }
9810unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009811#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009812#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009813int
9814main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009815{
Martin v. Löwis11437992002-04-12 09:54:03 +00009816
9817 FILE *f = fopen ("conftest.val", "w");
9818 if (! f)
9819 exit (1);
9820 if (((long) (sizeof (long long))) < 0)
9821 {
9822 long i = longval ();
9823 if (i != ((long) (sizeof (long long))))
9824 exit (1);
9825 fprintf (f, "%ld\n", i);
9826 }
9827 else
9828 {
9829 unsigned long i = ulongval ();
9830 if (i != ((long) (sizeof (long long))))
9831 exit (1);
9832 fprintf (f, "%lu\n", i);
9833 }
9834 exit (ferror (f) || fclose (f) != 0);
9835
9836 ;
9837 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009838}
Martin v. Löwis11437992002-04-12 09:54:03 +00009839_ACEOF
9840rm -f conftest$ac_exeext
9841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9842 (eval $ac_link) 2>&5
9843 ac_status=$?
9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9847 (eval $ac_try) 2>&5
9848 ac_status=$?
9849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9850 (exit $ac_status); }; }; then
9851 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009852else
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 echo "$as_me: program exited with status $ac_status" >&5
9854echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009855sed 's/^/| /' conftest.$ac_ext >&5
9856
Martin v. Löwis11437992002-04-12 09:54:03 +00009857( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009858{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9859See \`config.log' for more details." >&5
9860echo "$as_me: error: cannot compute sizeof (long long), 77
9861See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 { (exit 1); exit 1; }; }
9863fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009864rm -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 +00009865fi
9866fi
9867rm -f conftest.val
9868else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009869 ac_cv_sizeof_long_long=0
9870fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009872echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9873echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9874cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009875#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009876_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009877
Michael W. Hudson54241132001-12-07 15:38:26 +00009878
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009879fi
9880
Martin v. Löwis11437992002-04-12 09:54:03 +00009881echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9882echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009883have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009885/* confdefs.h. */
9886_ACEOF
9887cat confdefs.h >>conftest.$ac_ext
9888cat >>conftest.$ac_ext <<_ACEOF
9889/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009890
Martin v. Löwis11437992002-04-12 09:54:03 +00009891int
9892main ()
9893{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009894uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ;
9896 return 0;
9897}
9898_ACEOF
9899rm -f conftest.$ac_objext
9900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009901 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009903 grep -v '^ *+' conftest.er1 >conftest.err
9904 rm -f conftest.er1
9905 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9907 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009908 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9910 (eval $ac_try) 2>&5
9911 ac_status=$?
9912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9913 (exit $ac_status); }; } &&
9914 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9916 (eval $ac_try) 2>&5
9917 ac_status=$?
9918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919 (exit $ac_status); }; }; then
9920
9921
9922cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009923#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009924_ACEOF
9925
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009926 have_uintptr_t=yes
9927
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009928else
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009930sed 's/^/| /' conftest.$ac_ext >&5
9931
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009932fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009933rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009934echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9935echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009936if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009937echo "$as_me:$LINENO: checking for uintptr_t" >&5
9938echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9939if test "${ac_cv_type_uintptr_t+set}" = set; then
9940 echo $ECHO_N "(cached) $ECHO_C" >&6
9941else
9942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009943/* confdefs.h. */
9944_ACEOF
9945cat confdefs.h >>conftest.$ac_ext
9946cat >>conftest.$ac_ext <<_ACEOF
9947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009948$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009949int
9950main ()
9951{
9952if ((uintptr_t *) 0)
9953 return 0;
9954if (sizeof (uintptr_t))
9955 return 0;
9956 ;
9957 return 0;
9958}
9959_ACEOF
9960rm -f conftest.$ac_objext
9961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009962 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009964 grep -v '^ *+' conftest.er1 >conftest.err
9965 rm -f conftest.er1
9966 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9968 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009969 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9971 (eval $ac_try) 2>&5
9972 ac_status=$?
9973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9974 (exit $ac_status); }; } &&
9975 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9977 (eval $ac_try) 2>&5
9978 ac_status=$?
9979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9980 (exit $ac_status); }; }; then
9981 ac_cv_type_uintptr_t=yes
9982else
9983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009984sed 's/^/| /' conftest.$ac_ext >&5
9985
Martin v. Löwis11437992002-04-12 09:54:03 +00009986ac_cv_type_uintptr_t=no
9987fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009988rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009989fi
9990echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9991echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9992
9993echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9994echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9995if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9996 echo $ECHO_N "(cached) $ECHO_C" >&6
9997else
9998 if test "$ac_cv_type_uintptr_t" = yes; then
9999 # The cast to unsigned long works around a bug in the HP C Compiler
10000 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10001 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10002 # This bug is HP SR number 8606223364.
10003 if test "$cross_compiling" = yes; then
10004 # Depending upon the size, compute the lo and hi bounds.
10005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010006/* confdefs.h. */
10007_ACEOF
10008cat confdefs.h >>conftest.$ac_ext
10009cat >>conftest.$ac_ext <<_ACEOF
10010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010011$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010012int
10013main ()
10014{
10015static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
10016test_array [0] = 0
10017
10018 ;
10019 return 0;
10020}
10021_ACEOF
10022rm -f conftest.$ac_objext
10023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010024 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010026 grep -v '^ *+' conftest.er1 >conftest.err
10027 rm -f conftest.er1
10028 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10030 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010031 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10033 (eval $ac_try) 2>&5
10034 ac_status=$?
10035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036 (exit $ac_status); }; } &&
10037 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10039 (eval $ac_try) 2>&5
10040 ac_status=$?
10041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10042 (exit $ac_status); }; }; then
10043 ac_lo=0 ac_mid=0
10044 while :; do
10045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* confdefs.h. */
10047_ACEOF
10048cat confdefs.h >>conftest.$ac_ext
10049cat >>conftest.$ac_ext <<_ACEOF
10050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010051$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010052int
10053main ()
10054{
10055static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
10056test_array [0] = 0
10057
10058 ;
10059 return 0;
10060}
10061_ACEOF
10062rm -f conftest.$ac_objext
10063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010064 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010066 grep -v '^ *+' conftest.er1 >conftest.err
10067 rm -f conftest.er1
10068 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10070 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010071 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10073 (eval $ac_try) 2>&5
10074 ac_status=$?
10075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10076 (exit $ac_status); }; } &&
10077 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10079 (eval $ac_try) 2>&5
10080 ac_status=$?
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); }; }; then
10083 ac_hi=$ac_mid; break
10084else
10085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010086sed 's/^/| /' conftest.$ac_ext >&5
10087
Martin v. Löwis11437992002-04-12 09:54:03 +000010088ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000010089 if test $ac_lo -le $ac_mid; then
10090 ac_lo= ac_hi=
10091 break
10092 fi
10093 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010094fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010096 done
10097else
10098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010099sed 's/^/| /' conftest.$ac_ext >&5
10100
Martin v. Löwis11437992002-04-12 09:54:03 +000010101cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010102/* confdefs.h. */
10103_ACEOF
10104cat confdefs.h >>conftest.$ac_ext
10105cat >>conftest.$ac_ext <<_ACEOF
10106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010107$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010108int
10109main ()
10110{
10111static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
10112test_array [0] = 0
10113
10114 ;
10115 return 0;
10116}
10117_ACEOF
10118rm -f conftest.$ac_objext
10119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010120 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010122 grep -v '^ *+' conftest.er1 >conftest.err
10123 rm -f conftest.er1
10124 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10126 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010127 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10129 (eval $ac_try) 2>&5
10130 ac_status=$?
10131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10132 (exit $ac_status); }; } &&
10133 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10135 (eval $ac_try) 2>&5
10136 ac_status=$?
10137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10138 (exit $ac_status); }; }; then
10139 ac_hi=-1 ac_mid=-1
10140 while :; do
10141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* confdefs.h. */
10143_ACEOF
10144cat confdefs.h >>conftest.$ac_ext
10145cat >>conftest.$ac_ext <<_ACEOF
10146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010147$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010148int
10149main ()
10150{
10151static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
10152test_array [0] = 0
10153
10154 ;
10155 return 0;
10156}
10157_ACEOF
10158rm -f conftest.$ac_objext
10159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010160 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010162 grep -v '^ *+' conftest.er1 >conftest.err
10163 rm -f conftest.er1
10164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10166 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010167 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10169 (eval $ac_try) 2>&5
10170 ac_status=$?
10171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10172 (exit $ac_status); }; } &&
10173 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10175 (eval $ac_try) 2>&5
10176 ac_status=$?
10177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10178 (exit $ac_status); }; }; then
10179 ac_lo=$ac_mid; break
10180else
10181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010182sed 's/^/| /' conftest.$ac_ext >&5
10183
Martin v. Löwis11437992002-04-12 09:54:03 +000010184ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000010185 if test $ac_mid -le $ac_hi; then
10186 ac_lo= ac_hi=
10187 break
10188 fi
10189 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010190fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010191rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 done
10193else
10194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010195sed 's/^/| /' conftest.$ac_ext >&5
10196
Martin v. Löwis11437992002-04-12 09:54:03 +000010197ac_lo= ac_hi=
10198fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010199rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010200fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010201rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010202# Binary search between lo and hi bounds.
10203while test "x$ac_lo" != "x$ac_hi"; do
10204 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010206/* confdefs.h. */
10207_ACEOF
10208cat confdefs.h >>conftest.$ac_ext
10209cat >>conftest.$ac_ext <<_ACEOF
10210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010211$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010212int
10213main ()
10214{
10215static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
10216test_array [0] = 0
10217
10218 ;
10219 return 0;
10220}
10221_ACEOF
10222rm -f conftest.$ac_objext
10223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010224 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010226 grep -v '^ *+' conftest.er1 >conftest.err
10227 rm -f conftest.er1
10228 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10230 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010231 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10233 (eval $ac_try) 2>&5
10234 ac_status=$?
10235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10236 (exit $ac_status); }; } &&
10237 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10239 (eval $ac_try) 2>&5
10240 ac_status=$?
10241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10242 (exit $ac_status); }; }; then
10243 ac_hi=$ac_mid
10244else
10245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010246sed 's/^/| /' conftest.$ac_ext >&5
10247
Martin v. Löwis11437992002-04-12 09:54:03 +000010248ac_lo=`expr '(' $ac_mid ')' + 1`
10249fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010250rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010251done
10252case $ac_lo in
10253?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000010254'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
10255See \`config.log' for more details." >&5
10256echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
10257See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 { (exit 1); exit 1; }; } ;;
10259esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010260else
10261 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010262 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
10263echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010265else
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010267/* confdefs.h. */
10268_ACEOF
10269cat confdefs.h >>conftest.$ac_ext
10270cat >>conftest.$ac_ext <<_ACEOF
10271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010272$ac_includes_default
10273long longval () { return (long) (sizeof (uintptr_t)); }
10274unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010275#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010276#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010277int
10278main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010279{
Martin v. Löwis11437992002-04-12 09:54:03 +000010280
10281 FILE *f = fopen ("conftest.val", "w");
10282 if (! f)
10283 exit (1);
10284 if (((long) (sizeof (uintptr_t))) < 0)
10285 {
10286 long i = longval ();
10287 if (i != ((long) (sizeof (uintptr_t))))
10288 exit (1);
10289 fprintf (f, "%ld\n", i);
10290 }
10291 else
10292 {
10293 unsigned long i = ulongval ();
10294 if (i != ((long) (sizeof (uintptr_t))))
10295 exit (1);
10296 fprintf (f, "%lu\n", i);
10297 }
10298 exit (ferror (f) || fclose (f) != 0);
10299
10300 ;
10301 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010302}
Martin v. Löwis11437992002-04-12 09:54:03 +000010303_ACEOF
10304rm -f conftest$ac_exeext
10305if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10306 (eval $ac_link) 2>&5
10307 ac_status=$?
10308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10309 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10311 (eval $ac_try) 2>&5
10312 ac_status=$?
10313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10314 (exit $ac_status); }; }; then
10315 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010316else
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 echo "$as_me: program exited with status $ac_status" >&5
10318echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010319sed 's/^/| /' conftest.$ac_ext >&5
10320
Martin v. Löwis11437992002-04-12 09:54:03 +000010321( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000010322{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
10323See \`config.log' for more details." >&5
10324echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
10325See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 { (exit 1); exit 1; }; }
10327fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010328rm -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 +000010329fi
10330fi
10331rm -f conftest.val
10332else
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010333 ac_cv_sizeof_uintptr_t=0
10334fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010336echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
10337echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
10338cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010339#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010340_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010341
Michael W. Hudson54241132001-12-07 15:38:26 +000010342
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010343fi
10344
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010345# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010346echo "$as_me:$LINENO: checking size of off_t" >&5
10347echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
10348if test "${ac_cv_sizeof_off_t+set}" = set; then
10349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010350else
10351 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010352 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010353else
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010355/* confdefs.h. */
10356_ACEOF
10357cat confdefs.h >>conftest.$ac_ext
10358cat >>conftest.$ac_ext <<_ACEOF
10359/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010360#include <stdio.h>
10361#include <sys/types.h>
10362main()
10363{
10364 FILE *f=fopen("conftestval", "w");
10365 if (!f) exit(1);
10366 fprintf(f, "%d\n", sizeof(off_t));
10367 exit(0);
10368}
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
10370rm -f conftest$ac_exeext
10371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10372 (eval $ac_link) 2>&5
10373 ac_status=$?
10374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10375 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10377 (eval $ac_try) 2>&5
10378 ac_status=$?
10379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10380 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010381 ac_cv_sizeof_off_t=`cat conftestval`
10382else
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 echo "$as_me: program exited with status $ac_status" >&5
10384echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010385sed 's/^/| /' conftest.$ac_ext >&5
10386
Martin v. Löwis11437992002-04-12 09:54:03 +000010387( exit $ac_status )
10388ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010389fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010390rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010391fi
10392
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010393fi
10394
Martin v. Löwis11437992002-04-12 09:54:03 +000010395echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
10396echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
10397
10398cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010399#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010400_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010401
Michael W. Hudson54241132001-12-07 15:38:26 +000010402
Martin v. Löwis11437992002-04-12 09:54:03 +000010403echo "$as_me:$LINENO: checking whether to enable large file support" >&5
10404echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010405if test "$have_long_long" = yes -a \
10406 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
10407 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010408
Martin v. Löwis11437992002-04-12 09:54:03 +000010409cat >>confdefs.h <<\_ACEOF
10410#define HAVE_LARGEFILE_SUPPORT 1
10411_ACEOF
10412
10413 echo "$as_me:$LINENO: result: yes" >&5
10414echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010415else
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 echo "$as_me:$LINENO: result: no" >&5
10417echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010418fi
10419
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010420# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010421echo "$as_me:$LINENO: checking size of time_t" >&5
10422echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
10423if test "${ac_cv_sizeof_time_t+set}" = set; then
10424 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010425else
10426 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010427 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010428else
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010430/* confdefs.h. */
10431_ACEOF
10432cat confdefs.h >>conftest.$ac_ext
10433cat >>conftest.$ac_ext <<_ACEOF
10434/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010435#include <stdio.h>
10436#include <time.h>
10437main()
10438{
10439 FILE *f=fopen("conftestval", "w");
10440 if (!f) exit(1);
10441 fprintf(f, "%d\n", sizeof(time_t));
10442 exit(0);
10443}
Martin v. Löwis11437992002-04-12 09:54:03 +000010444_ACEOF
10445rm -f conftest$ac_exeext
10446if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10447 (eval $ac_link) 2>&5
10448 ac_status=$?
10449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10450 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10452 (eval $ac_try) 2>&5
10453 ac_status=$?
10454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010456 ac_cv_sizeof_time_t=`cat conftestval`
10457else
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 echo "$as_me: program exited with status $ac_status" >&5
10459echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010460sed 's/^/| /' conftest.$ac_ext >&5
10461
Martin v. Löwis11437992002-04-12 09:54:03 +000010462( exit $ac_status )
10463ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010464fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010465rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010466fi
10467
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010468fi
10469
Martin v. Löwis11437992002-04-12 09:54:03 +000010470echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10471echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10472
10473cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010474#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010475_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010476
Michael W. Hudson54241132001-12-07 15:38:26 +000010477
10478
Trent Mick635f6fb2000-08-23 21:33:05 +000010479# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010480ac_save_cc="$CC"
10481if test "$ac_cv_kpthread" = "yes"
10482then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010483elif test "$ac_cv_kthread" = "yes"
10484then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010485elif test "$ac_cv_pthread" = "yes"
10486then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010488echo "$as_me:$LINENO: checking for pthread_t" >&5
10489echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010490have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010492/* confdefs.h. */
10493_ACEOF
10494cat confdefs.h >>conftest.$ac_ext
10495cat >>conftest.$ac_ext <<_ACEOF
10496/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010497#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010498int
10499main ()
10500{
Guido van Rossum12580492000-09-24 16:47:19 +000010501pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 ;
10503 return 0;
10504}
10505_ACEOF
10506rm -f conftest.$ac_objext
10507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010508 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010510 grep -v '^ *+' conftest.er1 >conftest.err
10511 rm -f conftest.er1
10512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010515 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10517 (eval $ac_try) 2>&5
10518 ac_status=$?
10519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10520 (exit $ac_status); }; } &&
10521 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10523 (eval $ac_try) 2>&5
10524 ac_status=$?
10525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10526 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010527 have_pthread_t=yes
10528else
Martin v. Löwis11437992002-04-12 09:54:03 +000010529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010530sed 's/^/| /' conftest.$ac_ext >&5
10531
Trent Mick635f6fb2000-08-23 21:33:05 +000010532fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010534echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10535echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010536if test "$have_pthread_t" = yes ; then
10537 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010538 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10539echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10540 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10541 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010542else
10543 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010544 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010545else
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010547/* confdefs.h. */
10548_ACEOF
10549cat confdefs.h >>conftest.$ac_ext
10550cat >>conftest.$ac_ext <<_ACEOF
10551/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010552#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010553#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010554 main()
10555 {
10556 FILE *f=fopen("conftestval", "w");
10557 if (!f) exit(1);
10558 fprintf(f, "%d\n", sizeof(pthread_t));
10559 exit(0);
10560 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010561_ACEOF
10562rm -f conftest$ac_exeext
10563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10564 (eval $ac_link) 2>&5
10565 ac_status=$?
10566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10569 (eval $ac_try) 2>&5
10570 ac_status=$?
10571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10572 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010573 ac_cv_sizeof_pthread_t=`cat conftestval`
10574else
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 echo "$as_me: program exited with status $ac_status" >&5
10576echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010577sed 's/^/| /' conftest.$ac_ext >&5
10578
Martin v. Löwis11437992002-04-12 09:54:03 +000010579( exit $ac_status )
10580ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010581fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010582rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010583fi
10584
Trent Mick635f6fb2000-08-23 21:33:05 +000010585fi
10586
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10588echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10589
10590cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010591#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010592_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010593
10594fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010595CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010596
Martin v. Löwis11437992002-04-12 09:54:03 +000010597echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10598echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010599# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10600if test "${enable_toolbox_glue+set}" = set; then
10601 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010602
Martin v. Löwis11437992002-04-12 09:54:03 +000010603fi;
Jack Jansene578a632001-08-15 01:27:14 +000010604
10605if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010606then
Jack Jansene578a632001-08-15 01:27:14 +000010607 case $ac_sys_system/$ac_sys_release in
10608 Darwin/*)
10609 enable_toolbox_glue="yes";;
10610 *)
10611 enable_toolbox_glue="no";;
10612 esac
10613fi
10614case "$enable_toolbox_glue" in
10615yes)
Jack Jansene578a632001-08-15 01:27:14 +000010616 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010617 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010618
10619cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010620#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010621_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010622
10623 ;;
10624*)
Jack Jansene578a632001-08-15 01:27:14 +000010625 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010626 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010627 ;;
10628esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010629echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10630echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010631
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010632
10633case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010634 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010635 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10636 ;;
10637 Darwin/*)
10638 OTHER_LIBTOOL_OPT=""
10639 ;;
10640esac
10641
10642
10643case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010644 Darwin/[01567]\..*)
Jack Jansen39fd2312006-02-23 15:12:19 +000010645 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000010646 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010647 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010648 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010649 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10650 if test ${gcc_version} '<' 4.0
10651 then
10652 LIBTOOL_CRUFT="-lcc_dynamic"
10653 else
10654 LIBTOOL_CRUFT=""
10655 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000010656 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000010657 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010658 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010659esac
10660
Martin v. Löwis11437992002-04-12 09:54:03 +000010661echo "$as_me:$LINENO: checking for --enable-framework" >&5
10662echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010663if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010664then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010665 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010667 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010668
Martin v. Löwis11437992002-04-12 09:54:03 +000010669cat >>confdefs.h <<\_ACEOF
10670#define WITH_NEXT_FRAMEWORK 1
10671_ACEOF
10672
10673 echo "$as_me:$LINENO: result: yes" >&5
10674echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010675else
Martin v. Löwis11437992002-04-12 09:54:03 +000010676 echo "$as_me:$LINENO: result: no" >&5
10677echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010678fi
10679
Martin v. Löwis11437992002-04-12 09:54:03 +000010680echo "$as_me:$LINENO: checking for dyld" >&5
10681echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010682case $ac_sys_system/$ac_sys_release in
10683 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010684
Martin v. Löwis11437992002-04-12 09:54:03 +000010685cat >>confdefs.h <<\_ACEOF
10686#define WITH_DYLD 1
10687_ACEOF
10688
10689 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10690echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010691 ;;
10692 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 echo "$as_me:$LINENO: result: no" >&5
10694echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010695 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010696esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010697
Guido van Rossum0a516c91994-09-12 10:58:40 +000010698# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010699
Michael W. Hudson54241132001-12-07 15:38:26 +000010700
10701
10702
10703
Guido van Rossum0a516c91994-09-12 10:58:40 +000010704# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010705# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010706echo "$as_me:$LINENO: checking SO" >&5
10707echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010708if test -z "$SO"
10709then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010710 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010711 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010712 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010713 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010714 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010715else
10716 # this might also be a termcap variable, see #610332
10717 echo
10718 echo '====================================================================='
10719 echo '+ +'
10720 echo '+ WARNING: You have set SO in your environment. +'
10721 echo '+ Do you really mean to change the extension for shared libraries? +'
10722 echo '+ Continuing in 10 seconds to let you to ponder. +'
10723 echo '+ +'
10724 echo '====================================================================='
10725 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010727echo "$as_me:$LINENO: result: $SO" >&5
10728echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010729# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010730# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010731# (Shared libraries in this instance are shared modules to be loaded into
10732# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010733echo "$as_me:$LINENO: checking LDSHARED" >&5
10734echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010735if test -z "$LDSHARED"
10736then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010737 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010738 AIX*)
10739 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010740 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010741 ;;
10742 BeOS*)
10743 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010744 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010745 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010746 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010747 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010749 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010750 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010751 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010752 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010753 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010754 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010755 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010756 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10757 if test "$enable_framework" ; then
10758 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010759 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10760 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010761 else
10762 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010763 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010764 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010765 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010766 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10767 if test "$enable_framework" ; then
10768 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010769 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10770 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010771 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010772 # No framework, use the Python app as bundle-loader
10773 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010774 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010775 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010776 Darwin/*)
10777 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10778 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010779 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010780 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010781 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010782 then
10783 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10784 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010785 else
10786 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10787 if test "$enable_framework" ; then
10788 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010789 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10790 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010791 else
10792 # No framework, use the Python app as bundle-loader
10793 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10794 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10795 fi
10796 fi
10797 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010798 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010799 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010800 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010801 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010802 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010803 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010804 else
10805 LDSHARED="ld -Bshareable ${LDFLAGS}"
10806 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010807 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010808 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010809 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010810 then LDSHARED='$(CC) -shared'
10811 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010812 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010813 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010814 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010815 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010816 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010817 *) LDSHARED="ld";;
10818 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010820echo "$as_me:$LINENO: result: $LDSHARED" >&5
10821echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010822BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010823# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010824# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010825echo "$as_me:$LINENO: checking CCSHARED" >&5
10826echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010827if test -z "$CCSHARED"
10828then
Guido van Rossum07397971997-04-29 21:49:50 +000010829 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010830 SunOS*) if test "$GCC" = yes;
10831 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000010832 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010833 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010834 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010835 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010836 else CCSHARED="+z";
10837 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010838 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010839 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010840 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010841 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010842 if test "$GCC" = "yes"
10843 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010844 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010845 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010846 SCO_SV*)
10847 if test "$GCC" = "yes"
10848 then CCSHARED="-fPIC"
10849 else CCSHARED="-Kpic -belf"
10850 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010851 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010852 IRIX*/6*) case $CC in
10853 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010854 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010855 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010856 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010857 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010858fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010859echo "$as_me:$LINENO: result: $CCSHARED" >&5
10860echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010861# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010862# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010863echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10864echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010865if test -z "$LINKFORSHARED"
10866then
Guido van Rossum07397971997-04-29 21:49:50 +000010867 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010868 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010869 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010870 LINKFORSHARED="-Wl,-E -Wl,+s";;
10871# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010872 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010873 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010874 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010876 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
10877 # which is
Jack Jansene578a632001-08-15 01:27:14 +000010878 # not used by the core itself but which needs to be in the core so
10879 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010880 # -prebind is no longer used, because it actually seems to give a
10881 # slowdown in stead of a speedup, maybe due to the large number of
10882 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010883
10884 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000010885 if test "$enable_framework"
10886 then
Jack Jansenda49e192005-01-07 13:08:22 +000010887 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010888 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010889 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010890 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010891 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010892 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010893 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010894 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10895 then
10896 LINKFORSHARED="-Wl,--export-dynamic"
10897 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010898 SunOS/5*) case $CC in
10899 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010900 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010901 then
10902 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010903 fi;;
10904 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010905 CYGWIN*)
10906 if test $enable_shared = "no"
10907 then
10908 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10909 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010910 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010912echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10913echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010914
Michael W. Hudson54241132001-12-07 15:38:26 +000010915
Martin v. Löwis11437992002-04-12 09:54:03 +000010916echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10917echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010918if test ! "$LIBRARY" = "$LDLIBRARY"
10919then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010920 case $ac_sys_system in
10921 CYGWIN*)
10922 # Cygwin needs CCSHARED when building extension DLLs
10923 # but not when building the interpreter DLL.
10924 CFLAGSFORSHARED='';;
10925 *)
10926 CFLAGSFORSHARED='$(CCSHARED)'
10927 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010928fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010929echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10930echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010931
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010932# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10933# library (with --enable-shared).
10934# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010935# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10936# if it is not required, since it creates a dependency of the shared library
10937# to LIBS. This, in turn, means that applications linking the shared libpython
10938# don't need to link LIBS explicitly. The default should be only changed
10939# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010940
10941echo "$as_me:$LINENO: checking SHLIBS" >&5
10942echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10943case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010944 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010945 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010946esac
10947echo "$as_me:$LINENO: result: $SHLIBS" >&5
10948echo "${ECHO_T}$SHLIBS" >&6
10949
10950
Guido van Rossum627b2d71993-12-24 10:39:16 +000010951# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010952
10953echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10954echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10955if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10956 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957else
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010959LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010961/* confdefs.h. */
10962_ACEOF
10963cat confdefs.h >>conftest.$ac_ext
10964cat >>conftest.$ac_ext <<_ACEOF
10965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010966
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010967/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010968#ifdef __cplusplus
10969extern "C"
10970#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010971/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 builtin and then its argument prototype would still apply. */
10973char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010974int
10975main ()
10976{
10977dlopen ();
10978 ;
10979 return 0;
10980}
10981_ACEOF
10982rm -f conftest.$ac_objext conftest$ac_exeext
10983if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010984 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010986 grep -v '^ *+' conftest.er1 >conftest.err
10987 rm -f conftest.er1
10988 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10990 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010991 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10993 (eval $ac_try) 2>&5
10994 ac_status=$?
10995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10996 (exit $ac_status); }; } &&
10997 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10999 (eval $ac_try) 2>&5
11000 ac_status=$?
11001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11002 (exit $ac_status); }; }; then
11003 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011004else
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011006sed 's/^/| /' conftest.$ac_ext >&5
11007
Martin v. Löwis11437992002-04-12 09:54:03 +000011008ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011009fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011010rm -f conftest.err conftest.$ac_objext \
11011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011012LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011013fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011014echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11015echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
11016if test $ac_cv_lib_dl_dlopen = yes; then
11017 cat >>confdefs.h <<_ACEOF
11018#define HAVE_LIBDL 1
11019_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011020
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011021 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011022
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011023fi
11024 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000011025
11026echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
11027echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
11028if test "${ac_cv_lib_dld_shl_load+set}" = set; then
11029 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030else
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011032LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011034/* confdefs.h. */
11035_ACEOF
11036cat confdefs.h >>conftest.$ac_ext
11037cat >>conftest.$ac_ext <<_ACEOF
11038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011040/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011041#ifdef __cplusplus
11042extern "C"
11043#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011044/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 builtin and then its argument prototype would still apply. */
11046char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011047int
11048main ()
11049{
11050shl_load ();
11051 ;
11052 return 0;
11053}
11054_ACEOF
11055rm -f conftest.$ac_objext conftest$ac_exeext
11056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011057 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011059 grep -v '^ *+' conftest.er1 >conftest.err
11060 rm -f conftest.er1
11061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11063 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011064 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11066 (eval $ac_try) 2>&5
11067 ac_status=$?
11068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11069 (exit $ac_status); }; } &&
11070 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11072 (eval $ac_try) 2>&5
11073 ac_status=$?
11074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075 (exit $ac_status); }; }; then
11076 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011077else
Martin v. Löwis11437992002-04-12 09:54:03 +000011078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011079sed 's/^/| /' conftest.$ac_ext >&5
11080
Martin v. Löwis11437992002-04-12 09:54:03 +000011081ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011082fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011083rm -f conftest.err conftest.$ac_objext \
11084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011085LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011086fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011087echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
11088echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
11089if test $ac_cv_lib_dld_shl_load = yes; then
11090 cat >>confdefs.h <<_ACEOF
11091#define HAVE_LIBDLD 1
11092_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011093
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011094 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011095
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011096fi
11097 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000011098
11099# only check for sem_ini if thread support is requested
11100if test "$with_threads" = "yes" -o -z "$with_threads"; then
11101 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011102echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
11103if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011105else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011106 ac_func_search_save_LIBS=$LIBS
11107ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011109/* confdefs.h. */
11110_ACEOF
11111cat confdefs.h >>conftest.$ac_ext
11112cat >>conftest.$ac_ext <<_ACEOF
11113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011114
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011115/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011116#ifdef __cplusplus
11117extern "C"
11118#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011119/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 builtin and then its argument prototype would still apply. */
11121char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011122int
11123main ()
11124{
11125sem_init ();
11126 ;
11127 return 0;
11128}
11129_ACEOF
11130rm -f conftest.$ac_objext conftest$ac_exeext
11131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011132 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011134 grep -v '^ *+' conftest.er1 >conftest.err
11135 rm -f conftest.er1
11136 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11138 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011139 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11141 (eval $ac_try) 2>&5
11142 ac_status=$?
11143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11144 (exit $ac_status); }; } &&
11145 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11147 (eval $ac_try) 2>&5
11148 ac_status=$?
11149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11150 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011151 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011152else
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011154sed 's/^/| /' conftest.$ac_ext >&5
11155
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011156fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011157rm -f conftest.err conftest.$ac_objext \
11158 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011159if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000011160 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011161 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011163/* confdefs.h. */
11164_ACEOF
11165cat confdefs.h >>conftest.$ac_ext
11166cat >>conftest.$ac_ext <<_ACEOF
11167/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011168
11169/* Override any gcc2 internal prototype to avoid an error. */
11170#ifdef __cplusplus
11171extern "C"
11172#endif
11173/* We use char because int might match the return type of a gcc2
11174 builtin and then its argument prototype would still apply. */
11175char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011176int
11177main ()
11178{
11179sem_init ();
11180 ;
11181 return 0;
11182}
Martin v. Löwis11437992002-04-12 09:54:03 +000011183_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011184rm -f conftest.$ac_objext conftest$ac_exeext
11185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011186 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011188 grep -v '^ *+' conftest.er1 >conftest.err
11189 rm -f conftest.er1
11190 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11192 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011193 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11195 (eval $ac_try) 2>&5
11196 ac_status=$?
11197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11198 (exit $ac_status); }; } &&
11199 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11201 (eval $ac_try) 2>&5
11202 ac_status=$?
11203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11204 (exit $ac_status); }; }; then
11205 ac_cv_search_sem_init="-l$ac_lib"
11206break
11207else
11208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011209sed 's/^/| /' conftest.$ac_ext >&5
11210
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011211fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011212rm -f conftest.err conftest.$ac_objext \
11213 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011214 done
11215fi
11216LIBS=$ac_func_search_save_LIBS
11217fi
11218echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
11219echo "${ECHO_T}$ac_cv_search_sem_init" >&6
11220if test "$ac_cv_search_sem_init" != no; then
11221 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011222
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011223fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000011224 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000011225 # posix4 on Solaris 2.6
11226 # pthread (first!) on Linux
11227fi
11228
Martin v. Löwis19d17342003-06-14 21:03:05 +000011229# check if we need libintl for locale functions
11230echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
11231echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
11232if test "${ac_cv_lib_intl_textdomain+set}" = set; then
11233 echo $ECHO_N "(cached) $ECHO_C" >&6
11234else
11235 ac_check_lib_save_LIBS=$LIBS
11236LIBS="-lintl $LIBS"
11237cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011238/* confdefs.h. */
11239_ACEOF
11240cat confdefs.h >>conftest.$ac_ext
11241cat >>conftest.$ac_ext <<_ACEOF
11242/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011243
11244/* Override any gcc2 internal prototype to avoid an error. */
11245#ifdef __cplusplus
11246extern "C"
11247#endif
11248/* We use char because int might match the return type of a gcc2
11249 builtin and then its argument prototype would still apply. */
11250char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011251int
11252main ()
11253{
11254textdomain ();
11255 ;
11256 return 0;
11257}
11258_ACEOF
11259rm -f conftest.$ac_objext conftest$ac_exeext
11260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011261 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000011262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011263 grep -v '^ *+' conftest.er1 >conftest.err
11264 rm -f conftest.er1
11265 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000011266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11267 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011268 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11270 (eval $ac_try) 2>&5
11271 ac_status=$?
11272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11273 (exit $ac_status); }; } &&
11274 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000011275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11276 (eval $ac_try) 2>&5
11277 ac_status=$?
11278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11279 (exit $ac_status); }; }; then
11280 ac_cv_lib_intl_textdomain=yes
11281else
11282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011283sed 's/^/| /' conftest.$ac_ext >&5
11284
Martin v. Löwis19d17342003-06-14 21:03:05 +000011285ac_cv_lib_intl_textdomain=no
11286fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011287rm -f conftest.err conftest.$ac_objext \
11288 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000011289LIBS=$ac_check_lib_save_LIBS
11290fi
11291echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
11292echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
11293if test $ac_cv_lib_intl_textdomain = yes; then
11294
11295cat >>confdefs.h <<\_ACEOF
11296#define WITH_LIBINTL 1
11297_ACEOF
11298
11299fi
11300
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011301
11302# checks for system dependent C++ extensions support
11303case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
11305echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
11306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011307/* confdefs.h. */
11308_ACEOF
11309cat confdefs.h >>conftest.$ac_ext
11310cat >>conftest.$ac_ext <<_ACEOF
11311/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011312#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011313int
11314main ()
11315{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011316loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 ;
11318 return 0;
11319}
11320_ACEOF
11321rm -f conftest.$ac_objext conftest$ac_exeext
11322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011323 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011325 grep -v '^ *+' conftest.er1 >conftest.err
11326 rm -f conftest.er1
11327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11329 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011330 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11332 (eval $ac_try) 2>&5
11333 ac_status=$?
11334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11335 (exit $ac_status); }; } &&
11336 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11338 (eval $ac_try) 2>&5
11339 ac_status=$?
11340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11341 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011342
Martin v. Löwis11437992002-04-12 09:54:03 +000011343cat >>confdefs.h <<\_ACEOF
11344#define AIX_GENUINE_CPLUSPLUS 1
11345_ACEOF
11346
11347 echo "$as_me:$LINENO: result: yes" >&5
11348echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011349else
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011351sed 's/^/| /' conftest.$ac_ext >&5
11352
Martin v. Löwis11437992002-04-12 09:54:03 +000011353echo "$as_me:$LINENO: result: no" >&5
11354echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011355fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011356rm -f conftest.err conftest.$ac_objext \
11357 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011358 *) ;;
11359esac
11360
Guido van Rossum70c7f481998-03-26 18:44:10 +000011361# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011362# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000011363echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
11364echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
11365if test "${ac_cv_lib_nsl_t_open+set}" = set; then
11366 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011367else
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011369LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011370cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011371/* confdefs.h. */
11372_ACEOF
11373cat confdefs.h >>conftest.$ac_ext
11374cat >>conftest.$ac_ext <<_ACEOF
11375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011377/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011378#ifdef __cplusplus
11379extern "C"
11380#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011381/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 builtin and then its argument prototype would still apply. */
11383char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011384int
11385main ()
11386{
11387t_open ();
11388 ;
11389 return 0;
11390}
11391_ACEOF
11392rm -f conftest.$ac_objext conftest$ac_exeext
11393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011394 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011396 grep -v '^ *+' conftest.er1 >conftest.err
11397 rm -f conftest.er1
11398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11400 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011401 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11403 (eval $ac_try) 2>&5
11404 ac_status=$?
11405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11406 (exit $ac_status); }; } &&
11407 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11409 (eval $ac_try) 2>&5
11410 ac_status=$?
11411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11412 (exit $ac_status); }; }; then
11413 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011414else
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011416sed 's/^/| /' conftest.$ac_ext >&5
11417
Martin v. Löwis11437992002-04-12 09:54:03 +000011418ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011419fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011420rm -f conftest.err conftest.$ac_objext \
11421 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011422LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011424echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11425echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11426if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011427 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011428fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011429 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011430echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11431echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11432if test "${ac_cv_lib_socket_socket+set}" = set; then
11433 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434else
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011436LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011438/* confdefs.h. */
11439_ACEOF
11440cat confdefs.h >>conftest.$ac_ext
11441cat >>conftest.$ac_ext <<_ACEOF
11442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011443
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011444/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011445#ifdef __cplusplus
11446extern "C"
11447#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011448/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 builtin and then its argument prototype would still apply. */
11450char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011451int
11452main ()
11453{
11454socket ();
11455 ;
11456 return 0;
11457}
11458_ACEOF
11459rm -f conftest.$ac_objext conftest$ac_exeext
11460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011461 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011463 grep -v '^ *+' conftest.er1 >conftest.err
11464 rm -f conftest.er1
11465 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11467 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011468 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11470 (eval $ac_try) 2>&5
11471 ac_status=$?
11472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11473 (exit $ac_status); }; } &&
11474 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11476 (eval $ac_try) 2>&5
11477 ac_status=$?
11478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11479 (exit $ac_status); }; }; then
11480 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011481else
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011483sed 's/^/| /' conftest.$ac_ext >&5
11484
Martin v. Löwis11437992002-04-12 09:54:03 +000011485ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011486fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011487rm -f conftest.err conftest.$ac_objext \
11488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011489LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011491echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11492echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11493if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011494 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011495fi
11496 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011497
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011498case "$ac_sys_system" in
11499BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011500echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11501echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11502if test "${ac_cv_lib_net_socket+set}" = set; then
11503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011504else
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011506LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011508/* confdefs.h. */
11509_ACEOF
11510cat confdefs.h >>conftest.$ac_ext
11511cat >>conftest.$ac_ext <<_ACEOF
11512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
Guido van Rossumad678af1998-10-02 14:42:15 +000011514/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011515#ifdef __cplusplus
11516extern "C"
11517#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011518/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 builtin and then its argument prototype would still apply. */
11520char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011521int
11522main ()
11523{
11524socket ();
11525 ;
11526 return 0;
11527}
11528_ACEOF
11529rm -f conftest.$ac_objext conftest$ac_exeext
11530if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011531 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011533 grep -v '^ *+' conftest.er1 >conftest.err
11534 rm -f conftest.er1
11535 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11537 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011538 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11540 (eval $ac_try) 2>&5
11541 ac_status=$?
11542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11543 (exit $ac_status); }; } &&
11544 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11546 (eval $ac_try) 2>&5
11547 ac_status=$?
11548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11549 (exit $ac_status); }; }; then
11550 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011551else
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011553sed 's/^/| /' conftest.$ac_ext >&5
11554
Martin v. Löwis11437992002-04-12 09:54:03 +000011555ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011556fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011557rm -f conftest.err conftest.$ac_objext \
11558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011559LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011561echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11562echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11563if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011564 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011565fi
11566 # BeOS
11567;;
11568esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011569
Martin v. Löwis11437992002-04-12 09:54:03 +000011570echo "$as_me:$LINENO: checking for --with-libs" >&5
11571echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11572
Guido van Rossuma68acba1996-07-31 17:36:39 +000011573# Check whether --with-libs or --without-libs was given.
11574if test "${with_libs+set}" = set; then
11575 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011576
11577echo "$as_me:$LINENO: result: $withval" >&5
11578echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011579LIBS="$withval $LIBS"
11580
11581else
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 echo "$as_me:$LINENO: result: no" >&5
11583echo "${ECHO_T}no" >&6
11584fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011585
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011586# Check for use of the system libffi library
11587echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
11588echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6
11589
11590# Check whether --with-system_ffi or --without-system_ffi was given.
11591if test "${with_system_ffi+set}" = set; then
11592 withval="$with_system_ffi"
11593
11594fi;
11595
11596if test -z "$with_system_ffi"
11597then with_system_ffi="no"
11598fi
11599echo "$as_me:$LINENO: result: $with_system_ffi" >&5
11600echo "${ECHO_T}$with_system_ffi" >&6
11601
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011602# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011603
11604
Martin v. Löwis11437992002-04-12 09:54:03 +000011605echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11606echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11607
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011608# Check whether --with-signal-module or --without-signal-module was given.
11609if test "${with_signal_module+set}" = set; then
11610 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011611
Martin v. Löwis11437992002-04-12 09:54:03 +000011612fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011613
11614if test -z "$with_signal_module"
11615then with_signal_module="yes"
11616fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011617echo "$as_me:$LINENO: result: $with_signal_module" >&5
11618echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011619
11620if test "${with_signal_module}" = "yes"; then
11621 USE_SIGNAL_MODULE=""
11622 SIGNAL_OBJS=""
11623else
11624 USE_SIGNAL_MODULE="#"
11625 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11626fi
11627
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011628# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011629
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011630USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011631
Martin v. Löwis11437992002-04-12 09:54:03 +000011632echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11633echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11634
Guido van Rossumec2f0731997-01-22 20:54:01 +000011635
11636# Check whether --with-dec-threads or --without-dec-threads was given.
11637if test "${with_dec_threads+set}" = set; then
11638 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011639
11640echo "$as_me:$LINENO: result: $withval" >&5
11641echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011642LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011643if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011644 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011645fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011646else
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 echo "$as_me:$LINENO: result: no" >&5
11648echo "${ECHO_T}no" >&6
11649fi;
11650
11651# Templates for things AC_DEFINEd more than once.
11652# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011653
11654
Martin v. Löwis11437992002-04-12 09:54:03 +000011655
11656
11657
11658
11659
11660echo "$as_me:$LINENO: checking for --with-threads" >&5
11661echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11662
Guido van Rossumec2f0731997-01-22 20:54:01 +000011663# Check whether --with-threads or --without-threads was given.
11664if test "${with_threads+set}" = set; then
11665 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011666
Martin v. Löwis11437992002-04-12 09:54:03 +000011667fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011668
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011669# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011670
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011671# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011672if test "${with_thread+set}" = set; then
11673 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011674 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011675fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011676
11677if test -z "$with_threads"
11678then with_threads="yes"
11679fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011680echo "$as_me:$LINENO: result: $with_threads" >&5
11681echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011682
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011683
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011684if test "$with_threads" = "no"
11685then
11686 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011687elif test "$ac_cv_pthread_is_default" = yes
11688then
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011690#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011691_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011692
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011693 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011695#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011696_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011697
11698 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011699 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011700elif test "$ac_cv_kpthread" = "yes"
11701then
11702 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011703 if test "$ac_cv_cxx_thread" = "yes"; then
11704 CXX="$CXX -Kpthread"
11705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011707#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011708_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011709
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011710 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011711 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011712elif test "$ac_cv_kthread" = "yes"
11713then
11714 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011715 if test "$ac_cv_cxx_thread" = "yes"; then
11716 CXX="$CXX -Kthread"
11717 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011718 cat >>confdefs.h <<\_ACEOF
11719#define WITH_THREAD 1
11720_ACEOF
11721
11722 posix_threads=yes
11723 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011724elif test "$ac_cv_pthread" = "yes"
11725then
11726 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011727 if test "$ac_cv_cxx_thread" = "yes"; then
11728 CXX="$CXX -pthread"
11729 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011730 cat >>confdefs.h <<\_ACEOF
11731#define WITH_THREAD 1
11732_ACEOF
11733
11734 posix_threads=yes
11735 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011736else
11737 if test ! -z "$with_threads" -a -d "$with_threads"
11738 then LDFLAGS="$LDFLAGS -L$with_threads"
11739 fi
11740 if test ! -z "$withval" -a -d "$withval"
11741 then LDFLAGS="$LDFLAGS -L$withval"
11742 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011743
11744 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011745 # define _POSIX_THREADS in unistd.h. Some apparently don't
11746 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11748echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011750/* confdefs.h. */
11751_ACEOF
11752cat confdefs.h >>conftest.$ac_ext
11753cat >>conftest.$ac_ext <<_ACEOF
11754/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011755
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011756#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011757#ifdef _POSIX_THREADS
11758yes
11759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011760
11761_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011763 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011764 unistd_defines_pthreads=yes
11765else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011766 unistd_defines_pthreads=no
11767fi
11768rm -f conftest*
11769
Martin v. Löwis11437992002-04-12 09:54:03 +000011770 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11771echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011772
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011774#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011775_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011776
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 if test "${ac_cv_header_cthreads_h+set}" = set; then
11778 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11779echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11780if test "${ac_cv_header_cthreads_h+set}" = set; then
11781 echo $ECHO_N "(cached) $ECHO_C" >&6
11782fi
11783echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11784echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011785else
Martin v. Löwis11437992002-04-12 09:54:03 +000011786 # Is the header compilable?
11787echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11788echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011790/* confdefs.h. */
11791_ACEOF
11792cat confdefs.h >>conftest.$ac_ext
11793cat >>conftest.$ac_ext <<_ACEOF
11794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011795$ac_includes_default
11796#include <cthreads.h>
11797_ACEOF
11798rm -f conftest.$ac_objext
11799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011800 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011802 grep -v '^ *+' conftest.er1 >conftest.err
11803 rm -f conftest.er1
11804 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11806 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011807 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11809 (eval $ac_try) 2>&5
11810 ac_status=$?
11811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812 (exit $ac_status); }; } &&
11813 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11815 (eval $ac_try) 2>&5
11816 ac_status=$?
11817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11818 (exit $ac_status); }; }; then
11819 ac_header_compiler=yes
11820else
11821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011822sed 's/^/| /' conftest.$ac_ext >&5
11823
Martin v. Löwis11437992002-04-12 09:54:03 +000011824ac_header_compiler=no
11825fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011826rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011827echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11828echo "${ECHO_T}$ac_header_compiler" >&6
11829
11830# Is the header present?
11831echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11832echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011834/* confdefs.h. */
11835_ACEOF
11836cat confdefs.h >>conftest.$ac_ext
11837cat >>conftest.$ac_ext <<_ACEOF
11838/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011839#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011840_ACEOF
11841if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11842 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11843 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011844 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011845 rm -f conftest.er1
11846 cat conftest.err >&5
11847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11848 (exit $ac_status); } >/dev/null; then
11849 if test -s conftest.err; then
11850 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011851 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 else
11853 ac_cpp_err=
11854 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011855else
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 ac_cpp_err=yes
11857fi
11858if test -z "$ac_cpp_err"; then
11859 ac_header_preproc=yes
11860else
11861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011862sed 's/^/| /' conftest.$ac_ext >&5
11863
Martin v. Löwis11437992002-04-12 09:54:03 +000011864 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011866rm -f conftest.err conftest.$ac_ext
11867echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11868echo "${ECHO_T}$ac_header_preproc" >&6
11869
11870# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011871case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11872 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011873 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11874echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011875 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11876echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11877 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011878 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011879 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011880 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11881echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011882 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11883echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11884 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11885echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11886 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11887echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011888 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11889echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011890 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11891echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011892 (
11893 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011894## ------------------------------------------------ ##
11895## Report this to http://www.python.org/python-bugs ##
11896## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011897_ASBOX
11898 ) |
11899 sed "s/^/$as_me: WARNING: /" >&2
11900 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011901esac
11902echo "$as_me:$LINENO: checking for cthreads.h" >&5
11903echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11904if test "${ac_cv_header_cthreads_h+set}" = set; then
11905 echo $ECHO_N "(cached) $ECHO_C" >&6
11906else
11907 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011908fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011909echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11910echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11911
11912fi
11913if test $ac_cv_header_cthreads_h = yes; then
11914 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011915#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011916_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011917
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011919#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011920_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011921
Martin v. Löwis11437992002-04-12 09:54:03 +000011922
11923cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011924#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011925_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011926
11927 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011928 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011929else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011930
Martin v. Löwis11437992002-04-12 09:54:03 +000011931 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11932 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11933echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11934if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11935 echo $ECHO_N "(cached) $ECHO_C" >&6
11936fi
11937echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11938echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011939else
Martin v. Löwis11437992002-04-12 09:54:03 +000011940 # Is the header compilable?
11941echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11942echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11943cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011944/* confdefs.h. */
11945_ACEOF
11946cat confdefs.h >>conftest.$ac_ext
11947cat >>conftest.$ac_ext <<_ACEOF
11948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011949$ac_includes_default
11950#include <mach/cthreads.h>
11951_ACEOF
11952rm -f conftest.$ac_objext
11953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011954 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011956 grep -v '^ *+' conftest.er1 >conftest.err
11957 rm -f conftest.er1
11958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11960 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011961 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11963 (eval $ac_try) 2>&5
11964 ac_status=$?
11965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11966 (exit $ac_status); }; } &&
11967 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11969 (eval $ac_try) 2>&5
11970 ac_status=$?
11971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11972 (exit $ac_status); }; }; then
11973 ac_header_compiler=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öwis11437992002-04-12 09:54:03 +000011978ac_header_compiler=no
11979fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011980rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011981echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11982echo "${ECHO_T}$ac_header_compiler" >&6
11983
11984# Is the header present?
11985echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11986echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011988/* confdefs.h. */
11989_ACEOF
11990cat confdefs.h >>conftest.$ac_ext
11991cat >>conftest.$ac_ext <<_ACEOF
11992/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011993#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011994_ACEOF
11995if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11996 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11997 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011998 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011999 rm -f conftest.er1
12000 cat conftest.err >&5
12001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12002 (exit $ac_status); } >/dev/null; then
12003 if test -s conftest.err; then
12004 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012005 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 else
12007 ac_cpp_err=
12008 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012009else
Martin v. Löwis11437992002-04-12 09:54:03 +000012010 ac_cpp_err=yes
12011fi
12012if test -z "$ac_cpp_err"; then
12013 ac_header_preproc=yes
12014else
12015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012016sed 's/^/| /' conftest.$ac_ext >&5
12017
Martin v. Löwis11437992002-04-12 09:54:03 +000012018 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012020rm -f conftest.err conftest.$ac_ext
12021echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12022echo "${ECHO_T}$ac_header_preproc" >&6
12023
12024# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012025case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12026 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012027 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12028echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012029 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
12030echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
12031 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012032 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012033 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012034 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
12035echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012036 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
12037echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
12038 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
12039echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
12040 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12041echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012042 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
12043echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012044 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
12045echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012046 (
12047 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012048## ------------------------------------------------ ##
12049## Report this to http://www.python.org/python-bugs ##
12050## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012051_ASBOX
12052 ) |
12053 sed "s/^/$as_me: WARNING: /" >&2
12054 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012055esac
12056echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12057echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
12058if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12059 echo $ECHO_N "(cached) $ECHO_C" >&6
12060else
12061 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012063echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12064echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
12065
12066fi
12067if test $ac_cv_header_mach_cthreads_h = yes; then
12068 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012069#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012070_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012071
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012073#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012074_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012075
Martin v. Löwis11437992002-04-12 09:54:03 +000012076
12077cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012078#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012079_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012080
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012081 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012082else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012083
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 echo "$as_me:$LINENO: checking for --with-pth" >&5
12085echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
12086
12087# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012088if test "${with_pth+set}" = set; then
12089 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012090 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012091echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012092 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000012093#define WITH_THREAD 1
12094_ACEOF
12095
12096
12097cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012098#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012099_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012100
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012101 LIBS="-lpth $LIBS"
12102 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012103else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012104 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012105echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012106
12107 # Just looking for pthread_create in libpthread is not enough:
12108 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
12109 # So we really have to include pthread.h, and then link.
12110 _libs=$LIBS
12111 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000012112 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
12113echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
12114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012115/* confdefs.h. */
12116_ACEOF
12117cat confdefs.h >>conftest.$ac_ext
12118cat >>conftest.$ac_ext <<_ACEOF
12119/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012120#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000012121
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012122void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000012123int
12124main ()
12125{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012126
12127pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 ;
12129 return 0;
12130}
12131_ACEOF
12132rm -f conftest.$ac_objext conftest$ac_exeext
12133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012134 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012136 grep -v '^ *+' conftest.er1 >conftest.err
12137 rm -f conftest.er1
12138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12140 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012141 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12143 (eval $ac_try) 2>&5
12144 ac_status=$?
12145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12146 (exit $ac_status); }; } &&
12147 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12149 (eval $ac_try) 2>&5
12150 ac_status=$?
12151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12152 (exit $ac_status); }; }; then
12153
12154 echo "$as_me:$LINENO: result: yes" >&5
12155echo "${ECHO_T}yes" >&6
12156 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012157#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012158_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012159
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012160 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012161 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000012162else
Martin v. Löwis11437992002-04-12 09:54:03 +000012163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012164sed 's/^/| /' conftest.$ac_ext >&5
12165
Martin v. Löwis11437992002-04-12 09:54:03 +000012166
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012167 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 echo "$as_me:$LINENO: checking for pthread_detach" >&5
12169echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
12170if test "${ac_cv_func_pthread_detach+set}" = set; then
12171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012172else
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012174/* confdefs.h. */
12175_ACEOF
12176cat confdefs.h >>conftest.$ac_ext
12177cat >>conftest.$ac_ext <<_ACEOF
12178/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012179/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
12180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12181#define pthread_detach innocuous_pthread_detach
12182
Guido van Rossumad678af1998-10-02 14:42:15 +000012183/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012184 which can conflict with char pthread_detach (); below.
12185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012186 <limits.h> exists even on freestanding compilers. */
12187
12188#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000012189# include <limits.h>
12190#else
12191# include <assert.h>
12192#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012193
12194#undef pthread_detach
12195
Guido van Rossumad678af1998-10-02 14:42:15 +000012196/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012197#ifdef __cplusplus
12198extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012199{
Martin v. Löwis11437992002-04-12 09:54:03 +000012200#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000012201/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 builtin and then its argument prototype would still apply. */
12203char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000012204/* The GNU C library defines this for functions which it implements
12205 to always fail with ENOSYS. Some functions are actually named
12206 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000012207#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000012208choke me
12209#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012210char (*f) () = pthread_detach;
12211#endif
12212#ifdef __cplusplus
12213}
Guido van Rossumad678af1998-10-02 14:42:15 +000012214#endif
12215
Skip Montanaro6dead952003-09-25 14:50:04 +000012216int
12217main ()
12218{
12219return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 ;
12221 return 0;
12222}
12223_ACEOF
12224rm -f conftest.$ac_objext conftest$ac_exeext
12225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012226 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012228 grep -v '^ *+' conftest.er1 >conftest.err
12229 rm -f conftest.er1
12230 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12232 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012233 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12235 (eval $ac_try) 2>&5
12236 ac_status=$?
12237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12238 (exit $ac_status); }; } &&
12239 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12241 (eval $ac_try) 2>&5
12242 ac_status=$?
12243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12244 (exit $ac_status); }; }; then
12245 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012246else
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012248sed 's/^/| /' conftest.$ac_ext >&5
12249
Martin v. Löwis11437992002-04-12 09:54:03 +000012250ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012251fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012252rm -f conftest.err conftest.$ac_objext \
12253 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000012254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012255echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
12256echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
12257if test $ac_cv_func_pthread_detach = yes; then
12258 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012259#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012260_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012261
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012262 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012263 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000012264else
Guido van Rossumad678af1998-10-02 14:42:15 +000012265
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012266 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12267 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12268echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12269if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12270 echo $ECHO_N "(cached) $ECHO_C" >&6
12271fi
12272echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12273echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12274else
12275 # Is the header compilable?
12276echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
12277echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
12278cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012279/* confdefs.h. */
12280_ACEOF
12281cat confdefs.h >>conftest.$ac_ext
12282cat >>conftest.$ac_ext <<_ACEOF
12283/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012284$ac_includes_default
12285#include <atheos/threads.h>
12286_ACEOF
12287rm -f conftest.$ac_objext
12288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012289 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012291 grep -v '^ *+' conftest.er1 >conftest.err
12292 rm -f conftest.er1
12293 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12295 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012296 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12298 (eval $ac_try) 2>&5
12299 ac_status=$?
12300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12301 (exit $ac_status); }; } &&
12302 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12304 (eval $ac_try) 2>&5
12305 ac_status=$?
12306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12307 (exit $ac_status); }; }; then
12308 ac_header_compiler=yes
12309else
12310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012311sed 's/^/| /' conftest.$ac_ext >&5
12312
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012313ac_header_compiler=no
12314fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012315rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012316echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12317echo "${ECHO_T}$ac_header_compiler" >&6
12318
12319# Is the header present?
12320echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
12321echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
12322cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012323/* confdefs.h. */
12324_ACEOF
12325cat confdefs.h >>conftest.$ac_ext
12326cat >>conftest.$ac_ext <<_ACEOF
12327/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012328#include <atheos/threads.h>
12329_ACEOF
12330if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12331 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12332 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012333 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012334 rm -f conftest.er1
12335 cat conftest.err >&5
12336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12337 (exit $ac_status); } >/dev/null; then
12338 if test -s conftest.err; then
12339 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012340 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012341 else
12342 ac_cpp_err=
12343 fi
12344else
12345 ac_cpp_err=yes
12346fi
12347if test -z "$ac_cpp_err"; then
12348 ac_header_preproc=yes
12349else
12350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012351sed 's/^/| /' conftest.$ac_ext >&5
12352
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012353 ac_header_preproc=no
12354fi
12355rm -f conftest.err conftest.$ac_ext
12356echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12357echo "${ECHO_T}$ac_header_preproc" >&6
12358
12359# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012360case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12361 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012362 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12363echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012364 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
12365echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
12366 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012367 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012368 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012369 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
12370echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012371 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
12372echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
12373 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
12374echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
12375 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
12376echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012377 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
12378echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012379 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
12380echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012381 (
12382 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012383## ------------------------------------------------ ##
12384## Report this to http://www.python.org/python-bugs ##
12385## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012386_ASBOX
12387 ) |
12388 sed "s/^/$as_me: WARNING: /" >&2
12389 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012390esac
12391echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12392echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12393if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12394 echo $ECHO_N "(cached) $ECHO_C" >&6
12395else
12396 ac_cv_header_atheos_threads_h=$ac_header_preproc
12397fi
12398echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12399echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12400
12401fi
12402if test $ac_cv_header_atheos_threads_h = yes; then
12403 cat >>confdefs.h <<\_ACEOF
12404#define WITH_THREAD 1
12405_ACEOF
12406
12407
12408cat >>confdefs.h <<\_ACEOF
12409#define ATHEOS_THREADS 1
12410_ACEOF
12411
12412 THREADOBJ="Python/thread.o"
12413else
12414
Martin v. Löwis11437992002-04-12 09:54:03 +000012415 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12416 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12417echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12418if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12419 echo $ECHO_N "(cached) $ECHO_C" >&6
12420fi
12421echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12422echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012423else
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 # Is the header compilable?
12425echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
12426echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
12427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012428/* confdefs.h. */
12429_ACEOF
12430cat confdefs.h >>conftest.$ac_ext
12431cat >>conftest.$ac_ext <<_ACEOF
12432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012433$ac_includes_default
12434#include <kernel/OS.h>
12435_ACEOF
12436rm -f conftest.$ac_objext
12437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012438 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012440 grep -v '^ *+' conftest.er1 >conftest.err
12441 rm -f conftest.er1
12442 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12444 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012445 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12447 (eval $ac_try) 2>&5
12448 ac_status=$?
12449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12450 (exit $ac_status); }; } &&
12451 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12453 (eval $ac_try) 2>&5
12454 ac_status=$?
12455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12456 (exit $ac_status); }; }; then
12457 ac_header_compiler=yes
12458else
12459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012460sed 's/^/| /' conftest.$ac_ext >&5
12461
Martin v. Löwis11437992002-04-12 09:54:03 +000012462ac_header_compiler=no
12463fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012464rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012465echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12466echo "${ECHO_T}$ac_header_compiler" >&6
12467
12468# Is the header present?
12469echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12470echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012472/* confdefs.h. */
12473_ACEOF
12474cat confdefs.h >>conftest.$ac_ext
12475cat >>conftest.$ac_ext <<_ACEOF
12476/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012477#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012478_ACEOF
12479if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12480 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12481 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012482 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 rm -f conftest.er1
12484 cat conftest.err >&5
12485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12486 (exit $ac_status); } >/dev/null; then
12487 if test -s conftest.err; then
12488 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012489 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 else
12491 ac_cpp_err=
12492 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012493else
Martin v. Löwis11437992002-04-12 09:54:03 +000012494 ac_cpp_err=yes
12495fi
12496if test -z "$ac_cpp_err"; then
12497 ac_header_preproc=yes
12498else
12499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012500sed 's/^/| /' conftest.$ac_ext >&5
12501
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012503fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012504rm -f conftest.err conftest.$ac_ext
12505echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12506echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012507
Martin v. Löwis11437992002-04-12 09:54:03 +000012508# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012509case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12510 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12512echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012513 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12514echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12515 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012516 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012517 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012518 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12519echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012520 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12521echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12522 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12523echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12524 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12525echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012526 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12527echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012528 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12529echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012530 (
12531 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012532## ------------------------------------------------ ##
12533## Report this to http://www.python.org/python-bugs ##
12534## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012535_ASBOX
12536 ) |
12537 sed "s/^/$as_me: WARNING: /" >&2
12538 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012539esac
12540echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12541echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12542if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12543 echo $ECHO_N "(cached) $ECHO_C" >&6
12544else
12545 ac_cv_header_kernel_OS_h=$ac_header_preproc
12546fi
12547echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12548echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12549
12550fi
12551if test $ac_cv_header_kernel_OS_h = yes; then
12552 cat >>confdefs.h <<\_ACEOF
12553#define WITH_THREAD 1
12554_ACEOF
12555
12556
12557cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012558#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012559_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012560
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012561 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012562else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012563
Martin v. Löwis11437992002-04-12 09:54:03 +000012564 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12565echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12566if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12567 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012568else
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012570LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012571cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012572/* confdefs.h. */
12573_ACEOF
12574cat confdefs.h >>conftest.$ac_ext
12575cat >>conftest.$ac_ext <<_ACEOF
12576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012577
Greg Steinadf63d62000-07-05 10:38:09 +000012578/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012579#ifdef __cplusplus
12580extern "C"
12581#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012582/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 builtin and then its argument prototype would still apply. */
12584char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012585int
12586main ()
12587{
12588pthread_create ();
12589 ;
12590 return 0;
12591}
12592_ACEOF
12593rm -f conftest.$ac_objext conftest$ac_exeext
12594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012595 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012597 grep -v '^ *+' conftest.er1 >conftest.err
12598 rm -f conftest.er1
12599 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12601 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012602 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12604 (eval $ac_try) 2>&5
12605 ac_status=$?
12606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12607 (exit $ac_status); }; } &&
12608 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12610 (eval $ac_try) 2>&5
12611 ac_status=$?
12612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12613 (exit $ac_status); }; }; then
12614 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012615else
Martin v. Löwis11437992002-04-12 09:54:03 +000012616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012617sed 's/^/| /' conftest.$ac_ext >&5
12618
Martin v. Löwis11437992002-04-12 09:54:03 +000012619ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012620fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012621rm -f conftest.err conftest.$ac_objext \
12622 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012623LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012625echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12626echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12627if test $ac_cv_lib_pthreads_pthread_create = yes; then
12628 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012629#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012630_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012631
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012632 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012633 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012634 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012635else
Greg Steinadf63d62000-07-05 10:38:09 +000012636
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12638echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12639if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12640 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012641else
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012643LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012645/* confdefs.h. */
12646_ACEOF
12647cat confdefs.h >>conftest.$ac_ext
12648cat >>conftest.$ac_ext <<_ACEOF
12649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012650
Guido van Rossum49545951997-12-02 19:28:29 +000012651/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012652#ifdef __cplusplus
12653extern "C"
12654#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012655/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 builtin and then its argument prototype would still apply. */
12657char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012658int
12659main ()
12660{
12661pthread_create ();
12662 ;
12663 return 0;
12664}
12665_ACEOF
12666rm -f conftest.$ac_objext conftest$ac_exeext
12667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012668 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012670 grep -v '^ *+' conftest.er1 >conftest.err
12671 rm -f conftest.er1
12672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12674 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012675 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12677 (eval $ac_try) 2>&5
12678 ac_status=$?
12679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12680 (exit $ac_status); }; } &&
12681 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12683 (eval $ac_try) 2>&5
12684 ac_status=$?
12685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12686 (exit $ac_status); }; }; then
12687 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012688else
Martin v. Löwis11437992002-04-12 09:54:03 +000012689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012690sed 's/^/| /' conftest.$ac_ext >&5
12691
Martin v. Löwis11437992002-04-12 09:54:03 +000012692ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012693fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012694rm -f conftest.err conftest.$ac_objext \
12695 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012696LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012697fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012698echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12699echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12700if test $ac_cv_lib_c_r_pthread_create = yes; then
12701 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012702#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012703_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012704
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012705 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012706 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012707 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012708else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012709
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12711echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12712if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12713 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012714else
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012716LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012717cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* confdefs.h. */
12719_ACEOF
12720cat confdefs.h >>conftest.$ac_ext
12721cat >>conftest.$ac_ext <<_ACEOF
12722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012723
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012724/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012725#ifdef __cplusplus
12726extern "C"
12727#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012728/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 builtin and then its argument prototype would still apply. */
12730char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012731int
12732main ()
12733{
12734__pthread_create_system ();
12735 ;
12736 return 0;
12737}
12738_ACEOF
12739rm -f conftest.$ac_objext conftest$ac_exeext
12740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012741 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012743 grep -v '^ *+' conftest.er1 >conftest.err
12744 rm -f conftest.er1
12745 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012748 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12750 (eval $ac_try) 2>&5
12751 ac_status=$?
12752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753 (exit $ac_status); }; } &&
12754 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12756 (eval $ac_try) 2>&5
12757 ac_status=$?
12758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12759 (exit $ac_status); }; }; then
12760 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012761else
Martin v. Löwis11437992002-04-12 09:54:03 +000012762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012763sed 's/^/| /' conftest.$ac_ext >&5
12764
Martin v. Löwis11437992002-04-12 09:54:03 +000012765ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012766fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012767rm -f conftest.err conftest.$ac_objext \
12768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012769LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012770fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012771echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12772echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12773if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12774 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012775#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012776_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012777
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012778 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012779 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012780 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012781else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012782
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12784echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12785if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12786 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012787else
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012789LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012790cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012791/* confdefs.h. */
12792_ACEOF
12793cat confdefs.h >>conftest.$ac_ext
12794cat >>conftest.$ac_ext <<_ACEOF
12795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012796
Guido van Rossumb93a8621998-05-07 13:27:32 +000012797/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012798#ifdef __cplusplus
12799extern "C"
12800#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012801/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 builtin and then its argument prototype would still apply. */
12803char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012804int
12805main ()
12806{
12807pthread_create ();
12808 ;
12809 return 0;
12810}
12811_ACEOF
12812rm -f conftest.$ac_objext conftest$ac_exeext
12813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012814 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012816 grep -v '^ *+' conftest.er1 >conftest.err
12817 rm -f conftest.er1
12818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12820 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012821 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12823 (eval $ac_try) 2>&5
12824 ac_status=$?
12825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12826 (exit $ac_status); }; } &&
12827 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12829 (eval $ac_try) 2>&5
12830 ac_status=$?
12831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12832 (exit $ac_status); }; }; then
12833 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012834else
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012836sed 's/^/| /' conftest.$ac_ext >&5
12837
Martin v. Löwis11437992002-04-12 09:54:03 +000012838ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012839fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012840rm -f conftest.err conftest.$ac_objext \
12841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012842LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012843fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012844echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12845echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12846if test $ac_cv_lib_cma_pthread_create = yes; then
12847 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012848#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012849_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012850
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012851 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012852 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012853 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012854else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012855
Martin v. Löwis130fb172001-07-19 11:00:41 +000012856 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012857fi
12858
Guido van Rossum627b2d71993-12-24 10:39:16 +000012859
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012860fi
12861
Guido van Rossum0be3e491997-05-22 20:33:33 +000012862fi
12863
Guido van Rossum49545951997-12-02 19:28:29 +000012864fi
12865
Guido van Rossumb93a8621998-05-07 13:27:32 +000012866fi
12867
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012868
Michael W. Hudson54241132001-12-07 15:38:26 +000012869fi
12870
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012871
12872fi
12873
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012874fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012875rm -f conftest.err conftest.$ac_objext \
12876 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012877fi;
12878fi
12879
12880
12881fi
12882
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012883
Michael W. Hudson54241132001-12-07 15:38:26 +000012884
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12886echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12887if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12888 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012889else
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012891LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012892cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012893/* confdefs.h. */
12894_ACEOF
12895cat confdefs.h >>conftest.$ac_ext
12896cat >>conftest.$ac_ext <<_ACEOF
12897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012899/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012900#ifdef __cplusplus
12901extern "C"
12902#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012903/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 builtin and then its argument prototype would still apply. */
12905char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012906int
12907main ()
12908{
12909usconfig ();
12910 ;
12911 return 0;
12912}
12913_ACEOF
12914rm -f conftest.$ac_objext conftest$ac_exeext
12915if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012916 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012918 grep -v '^ *+' conftest.er1 >conftest.err
12919 rm -f conftest.er1
12920 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012923 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12925 (eval $ac_try) 2>&5
12926 ac_status=$?
12927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928 (exit $ac_status); }; } &&
12929 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12931 (eval $ac_try) 2>&5
12932 ac_status=$?
12933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12934 (exit $ac_status); }; }; then
12935 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936else
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012938sed 's/^/| /' conftest.$ac_ext >&5
12939
Martin v. Löwis11437992002-04-12 09:54:03 +000012940ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012941fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012942rm -f conftest.err conftest.$ac_objext \
12943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012944LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012946echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12947echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12948if test $ac_cv_lib_mpc_usconfig = yes; then
12949 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012951_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012952
Martin v. Löwis130fb172001-07-19 11:00:41 +000012953 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012954 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012955 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012956fi
12957
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012958
Neal Norwitza978ab02002-11-02 16:58:05 +000012959 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12961echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12962if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12963 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012964else
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012966LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012968/* confdefs.h. */
12969_ACEOF
12970cat confdefs.h >>conftest.$ac_ext
12971cat >>conftest.$ac_ext <<_ACEOF
12972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012973
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012974/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012975#ifdef __cplusplus
12976extern "C"
12977#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012978/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 builtin and then its argument prototype would still apply. */
12980char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012981int
12982main ()
12983{
12984thr_create ();
12985 ;
12986 return 0;
12987}
12988_ACEOF
12989rm -f conftest.$ac_objext conftest$ac_exeext
12990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012991 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012993 grep -v '^ *+' conftest.er1 >conftest.err
12994 rm -f conftest.er1
12995 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12997 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012998 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13000 (eval $ac_try) 2>&5
13001 ac_status=$?
13002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13003 (exit $ac_status); }; } &&
13004 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13006 (eval $ac_try) 2>&5
13007 ac_status=$?
13008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13009 (exit $ac_status); }; }; then
13010 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013011else
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013013sed 's/^/| /' conftest.$ac_ext >&5
13014
Martin v. Löwis11437992002-04-12 09:54:03 +000013015ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013016fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013017rm -f conftest.err conftest.$ac_objext \
13018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013019LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013021echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
13022echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
13023if test $ac_cv_lib_thread_thr_create = yes; then
13024 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013025#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013026_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013027
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013028 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013029 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013030 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013031fi
13032
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013033 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013034
Martin v. Löwis130fb172001-07-19 11:00:41 +000013035 if test "$USE_THREAD_MODULE" != "#"
13036 then
13037 # If the above checks didn't disable threads, (at least) OSF1
13038 # needs this '-threads' argument during linking.
13039 case $ac_sys_system in
13040 OSF1) LDLAST=-threads;;
13041 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000013042 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013043fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013044
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013045if test "$posix_threads" = "yes"; then
13046 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013047
13048cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013049#define _POSIX_THREADS 1
13050_ACEOF
13051
13052 fi
13053
13054 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
13055 case $ac_sys_system/$ac_sys_release in
13056 SunOS/5.6)
13057cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013058#define HAVE_PTHREAD_DESTRUCTOR 1
13059_ACEOF
13060
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013061 ;;
13062 SunOS/5.8)
13063cat >>confdefs.h <<\_ACEOF
13064#define HAVE_BROKEN_POSIX_SEMAPHORES 1
13065_ACEOF
13066
13067 ;;
13068 esac
13069
13070 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
13071echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
13072 if test "${ac_cv_pthread_system_supported+set}" = set; then
13073 echo $ECHO_N "(cached) $ECHO_C" >&6
13074else
13075 if test "$cross_compiling" = yes; then
13076 ac_cv_pthread_system_supported=no
13077else
13078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013079/* confdefs.h. */
13080_ACEOF
13081cat confdefs.h >>conftest.$ac_ext
13082cat >>conftest.$ac_ext <<_ACEOF
13083/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013084#include <pthread.h>
13085 void *foo(void *parm) {
13086 return NULL;
13087 }
13088 main() {
13089 pthread_attr_t attr;
13090 pthread_t id;
13091 if (pthread_attr_init(&attr)) exit(-1);
13092 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
13093 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
13094 exit(0);
13095 }
13096_ACEOF
13097rm -f conftest$ac_exeext
13098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13099 (eval $ac_link) 2>&5
13100 ac_status=$?
13101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13104 (eval $ac_try) 2>&5
13105 ac_status=$?
13106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13107 (exit $ac_status); }; }; then
13108 ac_cv_pthread_system_supported=yes
13109else
13110 echo "$as_me: program exited with status $ac_status" >&5
13111echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013112sed 's/^/| /' conftest.$ac_ext >&5
13113
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013114( exit $ac_status )
13115ac_cv_pthread_system_supported=no
13116fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013117rm -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 +000013118fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013119
Guido van Rossum627b2d71993-12-24 10:39:16 +000013120fi
13121
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013122 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
13123echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
13124 if test "$ac_cv_pthread_system_supported" = "yes"; then
13125
13126cat >>confdefs.h <<\_ACEOF
13127#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
13128_ACEOF
13129
13130 fi
13131
13132for ac_func in pthread_sigmask
13133do
13134as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13135echo "$as_me:$LINENO: checking for $ac_func" >&5
13136echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13137if eval "test \"\${$as_ac_var+set}\" = set"; then
13138 echo $ECHO_N "(cached) $ECHO_C" >&6
13139else
13140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013141/* confdefs.h. */
13142_ACEOF
13143cat confdefs.h >>conftest.$ac_ext
13144cat >>conftest.$ac_ext <<_ACEOF
13145/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013146/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13147 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13148#define $ac_func innocuous_$ac_func
13149
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013150/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013151 which can conflict with char $ac_func (); below.
13152 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013153 <limits.h> exists even on freestanding compilers. */
13154
13155#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013156# include <limits.h>
13157#else
13158# include <assert.h>
13159#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013160
13161#undef $ac_func
13162
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013163/* Override any gcc2 internal prototype to avoid an error. */
13164#ifdef __cplusplus
13165extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013166{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013167#endif
13168/* We use char because int might match the return type of a gcc2
13169 builtin and then its argument prototype would still apply. */
13170char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013171/* The GNU C library defines this for functions which it implements
13172 to always fail with ENOSYS. Some functions are actually named
13173 something starting with __ and the normal name is an alias. */
13174#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13175choke me
13176#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013177char (*f) () = $ac_func;
13178#endif
13179#ifdef __cplusplus
13180}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013181#endif
13182
Skip Montanaro6dead952003-09-25 14:50:04 +000013183int
13184main ()
13185{
13186return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013187 ;
13188 return 0;
13189}
13190_ACEOF
13191rm -f conftest.$ac_objext conftest$ac_exeext
13192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013193 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013195 grep -v '^ *+' conftest.er1 >conftest.err
13196 rm -f conftest.er1
13197 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13199 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013200 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13202 (eval $ac_try) 2>&5
13203 ac_status=$?
13204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13205 (exit $ac_status); }; } &&
13206 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13208 (eval $ac_try) 2>&5
13209 ac_status=$?
13210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13211 (exit $ac_status); }; }; then
13212 eval "$as_ac_var=yes"
13213else
13214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013215sed 's/^/| /' conftest.$ac_ext >&5
13216
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013217eval "$as_ac_var=no"
13218fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013219rm -f conftest.err conftest.$ac_objext \
13220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013221fi
13222echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13223echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13224if test `eval echo '${'$as_ac_var'}'` = yes; then
13225 cat >>confdefs.h <<_ACEOF
13226#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13227_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000013228 case $ac_sys_system in
13229 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013230
Jason Tishlerfac083d2003-07-22 15:20:49 +000013231cat >>confdefs.h <<\_ACEOF
13232#define HAVE_BROKEN_PTHREAD_SIGMASK 1
13233_ACEOF
13234
13235 ;;
13236 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013237fi
13238done
13239
13240fi
13241
13242
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013243# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
13245
13246echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
13247echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013248# Check whether --enable-ipv6 or --disable-ipv6 was given.
13249if test "${enable_ipv6+set}" = set; then
13250 enableval="$enable_ipv6"
13251 case "$enableval" in
13252 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000013253 echo "$as_me:$LINENO: result: no" >&5
13254echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013255 ipv6=no
13256 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013257 *) echo "$as_me:$LINENO: result: yes" >&5
13258echo "${ECHO_T}yes" >&6
13259 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013260#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013261_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013262
13263 ipv6=yes
13264 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013266else
Martin v. Löwis11437992002-04-12 09:54:03 +000013267
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013268 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 echo "$as_me:$LINENO: result: no" >&5
13270echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013271 ipv6=no
13272
13273else
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013275/* confdefs.h. */
13276_ACEOF
13277cat confdefs.h >>conftest.$ac_ext
13278cat >>conftest.$ac_ext <<_ACEOF
13279/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013280 /* AF_INET6 available check */
13281#include <sys/types.h>
13282#include <sys/socket.h>
13283main()
13284{
13285 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
13286 exit(1);
13287 else
13288 exit(0);
13289}
13290
Martin v. Löwis11437992002-04-12 09:54:03 +000013291_ACEOF
13292rm -f conftest$ac_exeext
13293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13294 (eval $ac_link) 2>&5
13295 ac_status=$?
13296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13297 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13299 (eval $ac_try) 2>&5
13300 ac_status=$?
13301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13302 (exit $ac_status); }; }; then
13303 echo "$as_me:$LINENO: result: yes" >&5
13304echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013305 ipv6=yes
13306else
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 echo "$as_me: program exited with status $ac_status" >&5
13308echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013309sed 's/^/| /' conftest.$ac_ext >&5
13310
Martin v. Löwis11437992002-04-12 09:54:03 +000013311( exit $ac_status )
13312echo "$as_me:$LINENO: result: no" >&5
13313echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013314 ipv6=no
13315fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013316rm -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 +000013317fi
13318
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013319if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013320 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
13321echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
13322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013323/* confdefs.h. */
13324_ACEOF
13325cat confdefs.h >>conftest.$ac_ext
13326cat >>conftest.$ac_ext <<_ACEOF
13327/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013328#include <sys/types.h>
13329#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013330int
13331main ()
13332{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013333struct sockaddr_in6 x;
13334x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 ;
13336 return 0;
13337}
13338_ACEOF
13339rm -f conftest.$ac_objext
13340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013341 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013343 grep -v '^ *+' conftest.er1 >conftest.err
13344 rm -f conftest.er1
13345 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13347 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013348 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13350 (eval $ac_try) 2>&5
13351 ac_status=$?
13352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13353 (exit $ac_status); }; } &&
13354 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13356 (eval $ac_try) 2>&5
13357 ac_status=$?
13358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13359 (exit $ac_status); }; }; then
13360 echo "$as_me:$LINENO: result: yes" >&5
13361echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013362 ipv6=yes
13363else
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013365sed 's/^/| /' conftest.$ac_ext >&5
13366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367echo "$as_me:$LINENO: result: no" >&5
13368echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013369 ipv6=no
13370fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013371rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013372fi
13373
13374if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013376#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013377_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013378
13379fi
13380
Martin v. Löwis11437992002-04-12 09:54:03 +000013381fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013382
13383ipv6type=unknown
13384ipv6lib=none
13385ipv6trylibc=no
13386
13387if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
13389echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000013390 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
13391 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013392 case $i in
13393 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013395/* confdefs.h. */
13396_ACEOF
13397cat confdefs.h >>conftest.$ac_ext
13398cat >>conftest.$ac_ext <<_ACEOF
13399/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013400
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013401#include <netinet/in.h>
13402#ifdef IPV6_INRIA_VERSION
13403yes
13404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013405_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013407 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013408 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013409fi
13410rm -f conftest*
13411
13412 ;;
13413 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013415/* confdefs.h. */
13416_ACEOF
13417cat confdefs.h >>conftest.$ac_ext
13418cat >>conftest.$ac_ext <<_ACEOF
13419/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013420
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013421#include <netinet/in.h>
13422#ifdef __KAME__
13423yes
13424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013425_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013427 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013428 ipv6type=$i;
13429 ipv6lib=inet6
13430 ipv6libdir=/usr/local/v6/lib
13431 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013432fi
13433rm -f conftest*
13434
13435 ;;
13436 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013438/* confdefs.h. */
13439_ACEOF
13440cat confdefs.h >>conftest.$ac_ext
13441cat >>conftest.$ac_ext <<_ACEOF
13442/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013443
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013444#include <features.h>
13445#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
13446yes
13447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013448_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013450 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013451 ipv6type=$i;
13452 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013453fi
13454rm -f conftest*
13455
13456 ;;
13457 linux-inet6)
13458 if test -d /usr/inet6; then
13459 ipv6type=$i
13460 ipv6lib=inet6
13461 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013462 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013463 fi
13464 ;;
13465 solaris)
13466 if test -f /etc/netconfig; then
13467 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13468 ipv6type=$i
13469 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013470 fi
13471 fi
13472 ;;
13473 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013475/* confdefs.h. */
13476_ACEOF
13477cat confdefs.h >>conftest.$ac_ext
13478cat >>conftest.$ac_ext <<_ACEOF
13479/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013480
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013481#include <sys/param.h>
13482#ifdef _TOSHIBA_INET6
13483yes
13484#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013485_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013487 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013488 ipv6type=$i;
13489 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013490 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013491fi
13492rm -f conftest*
13493
13494 ;;
13495 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013497/* confdefs.h. */
13498_ACEOF
13499cat confdefs.h >>conftest.$ac_ext
13500cat >>conftest.$ac_ext <<_ACEOF
13501/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013502
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013503#include </usr/local/v6/include/sys/v6config.h>
13504#ifdef __V6D__
13505yes
13506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013507_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013509 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013510 ipv6type=$i;
13511 ipv6lib=v6;
13512 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013513 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013514fi
13515rm -f conftest*
13516
13517 ;;
13518 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013520/* confdefs.h. */
13521_ACEOF
13522cat confdefs.h >>conftest.$ac_ext
13523cat >>conftest.$ac_ext <<_ACEOF
13524/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013525
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013526#include <sys/param.h>
13527#ifdef _ZETA_MINAMI_INET6
13528yes
13529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013530_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013532 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013533 ipv6type=$i;
13534 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013535 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013536fi
13537rm -f conftest*
13538
13539 ;;
13540 esac
13541 if test "$ipv6type" != "unknown"; then
13542 break
13543 fi
13544 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 echo "$as_me:$LINENO: result: $ipv6type" >&5
13546echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013547fi
13548
13549if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13550 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13551 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13552 echo "using lib$ipv6lib"
13553 else
13554 if test $ipv6trylibc = "yes"; then
13555 echo "using libc"
13556 else
13557 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13558 echo "You need to fetch lib$ipv6lib.a from appropriate"
13559 echo 'ipv6 kit and compile beforehand.'
13560 exit 1
13561 fi
13562 fi
13563fi
13564
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013565# Check for --with-doc-strings
13566echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13567echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13568
13569# Check whether --with-doc-strings or --without-doc-strings was given.
13570if test "${with_doc_strings+set}" = set; then
13571 withval="$with_doc_strings"
13572
13573fi;
13574
13575if test -z "$with_doc_strings"
13576then with_doc_strings="yes"
13577fi
13578if test "$with_doc_strings" != "no"
13579then
13580
13581cat >>confdefs.h <<\_ACEOF
13582#define WITH_DOC_STRINGS 1
13583_ACEOF
13584
13585fi
13586echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13587echo "${ECHO_T}$with_doc_strings" >&6
13588
Neil Schemenauera35c6882001-02-27 04:45:05 +000013589# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013590echo "$as_me:$LINENO: checking for --with-tsc" >&5
13591echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13592
13593# Check whether --with-tsc or --without-tsc was given.
13594if test "${with_tsc+set}" = set; then
13595 withval="$with_tsc"
13596
13597if test "$withval" != no
13598then
13599
13600cat >>confdefs.h <<\_ACEOF
13601#define WITH_TSC 1
13602_ACEOF
13603
13604 echo "$as_me:$LINENO: result: yes" >&5
13605echo "${ECHO_T}yes" >&6
13606else echo "$as_me:$LINENO: result: no" >&5
13607echo "${ECHO_T}no" >&6
13608fi
13609else
13610 echo "$as_me:$LINENO: result: no" >&5
13611echo "${ECHO_T}no" >&6
13612fi;
13613
13614# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013615echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13616echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13617
Neil Schemenauera35c6882001-02-27 04:45:05 +000013618# Check whether --with-pymalloc or --without-pymalloc was given.
13619if test "${with_pymalloc+set}" = set; then
13620 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013621
Martin v. Löwis11437992002-04-12 09:54:03 +000013622fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013623
Neil Schemenauer16c22972002-03-22 15:34:49 +000013624if test -z "$with_pymalloc"
13625then with_pymalloc="yes"
13626fi
13627if test "$with_pymalloc" != "no"
13628then
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
13630cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013631#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013632_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013633
13634fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013635echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13636echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013637
Barry Warsawef82cd72000-06-30 16:21:01 +000013638# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013639echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13640echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13641
Barry Warsawef82cd72000-06-30 16:21:01 +000013642# Check whether --with-wctype-functions or --without-wctype-functions was given.
13643if test "${with_wctype_functions+set}" = set; then
13644 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
Barry Warsawef82cd72000-06-30 16:21:01 +000013646if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013647then
13648
13649cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013650#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013651_ACEOF
13652
13653 echo "$as_me:$LINENO: result: yes" >&5
13654echo "${ECHO_T}yes" >&6
13655else echo "$as_me:$LINENO: result: no" >&5
13656echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013657fi
13658else
Martin v. Löwis11437992002-04-12 09:54:03 +000013659 echo "$as_me:$LINENO: result: no" >&5
13660echo "${ECHO_T}no" >&6
13661fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013662
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013663# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013664
Guido van Rossum98935bf2001-09-05 19:13:16 +000013665DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013666
Guido van Rossume97ee181999-12-20 21:27:22 +000013667# the dlopen() function means we might want to use dynload_shlib.o. some
13668# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
Thomas Wouters3a584202000-08-05 23:28:51 +000013670for ac_func in dlopen
13671do
Martin v. Löwis11437992002-04-12 09:54:03 +000013672as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13673echo "$as_me:$LINENO: checking for $ac_func" >&5
13674echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13675if eval "test \"\${$as_ac_var+set}\" = set"; then
13676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013677else
Martin v. Löwis11437992002-04-12 09:54:03 +000013678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013679/* confdefs.h. */
13680_ACEOF
13681cat confdefs.h >>conftest.$ac_ext
13682cat >>conftest.$ac_ext <<_ACEOF
13683/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013684/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13685 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13686#define $ac_func innocuous_$ac_func
13687
Guido van Rossume97ee181999-12-20 21:27:22 +000013688/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013689 which can conflict with char $ac_func (); below.
13690 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013691 <limits.h> exists even on freestanding compilers. */
13692
13693#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013694# include <limits.h>
13695#else
13696# include <assert.h>
13697#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013698
13699#undef $ac_func
13700
Guido van Rossume97ee181999-12-20 21:27:22 +000013701/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013702#ifdef __cplusplus
13703extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013704{
Martin v. Löwis11437992002-04-12 09:54:03 +000013705#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013706/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 builtin and then its argument prototype would still apply. */
13708char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013709/* The GNU C library defines this for functions which it implements
13710 to always fail with ENOSYS. Some functions are actually named
13711 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013712#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013713choke me
13714#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013715char (*f) () = $ac_func;
13716#endif
13717#ifdef __cplusplus
13718}
Guido van Rossume97ee181999-12-20 21:27:22 +000013719#endif
13720
Skip Montanaro6dead952003-09-25 14:50:04 +000013721int
13722main ()
13723{
13724return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 ;
13726 return 0;
13727}
13728_ACEOF
13729rm -f conftest.$ac_objext conftest$ac_exeext
13730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013731 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013733 grep -v '^ *+' conftest.er1 >conftest.err
13734 rm -f conftest.er1
13735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13737 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013738 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13740 (eval $ac_try) 2>&5
13741 ac_status=$?
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); }; } &&
13744 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13746 (eval $ac_try) 2>&5
13747 ac_status=$?
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749 (exit $ac_status); }; }; then
13750 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013751else
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013753sed 's/^/| /' conftest.$ac_ext >&5
13754
Martin v. Löwis11437992002-04-12 09:54:03 +000013755eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013756fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013757rm -f conftest.err conftest.$ac_objext \
13758 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013760echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13761echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13762if test `eval echo '${'$as_ac_var'}'` = yes; then
13763 cat >>confdefs.h <<_ACEOF
13764#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13765_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013766
Guido van Rossume97ee181999-12-20 21:27:22 +000013767fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013768done
Guido van Rossume97ee181999-12-20 21:27:22 +000013769
Michael W. Hudson54241132001-12-07 15:38:26 +000013770
Guido van Rossume97ee181999-12-20 21:27:22 +000013771# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13772# loading of modules.
13773
Martin v. Löwis11437992002-04-12 09:54:03 +000013774echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13775echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013776if test -z "$DYNLOADFILE"
13777then
13778 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013779 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13780 if test "$ac_cv_func_dlopen" = yes
13781 then DYNLOADFILE="dynload_shlib.o"
13782 else DYNLOADFILE="dynload_aix.o"
13783 fi
13784 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013785 BeOS*) DYNLOADFILE="dynload_beos.o";;
13786 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013787 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
13788 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013789 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013790 *)
13791 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13792 # out any dynamic loading
13793 if test "$ac_cv_func_dlopen" = yes
13794 then DYNLOADFILE="dynload_shlib.o"
13795 else DYNLOADFILE="dynload_stub.o"
13796 fi
13797 ;;
13798 esac
13799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013800echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13801echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013802if test "$DYNLOADFILE" != "dynload_stub.o"
13803then
Martin v. Löwis11437992002-04-12 09:54:03 +000013804
13805cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013806#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013807_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013808
13809fi
13810
Neil Schemenauer4e425612001-06-19 15:44:15 +000013811# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13812
Michael W. Hudson54241132001-12-07 15:38:26 +000013813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13815echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013816if test -z "$MACHDEP_OBJS"
13817then
Jack Jansene578a632001-08-15 01:27:14 +000013818 MACHDEP_OBJS=$extra_machdep_objs
13819else
13820 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013821fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013822echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13823echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013824
Guido van Rossum627b2d71993-12-24 10:39:16 +000013825# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
Martin v. Löwisd6320502004-08-12 13:45:08 +000013897
Martin v. Löwisc3001752005-01-23 09:27:24 +000013898
13899
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013900
13901
Martin v. Löwisd6320502004-08-12 13:45:08 +000013902for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13903 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013904 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000013905 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013906 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013907 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013908 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013909 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013910 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013911 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013912 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013913 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013914do
Martin v. Löwis11437992002-04-12 09:54:03 +000013915as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13916echo "$as_me:$LINENO: checking for $ac_func" >&5
13917echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13918if eval "test \"\${$as_ac_var+set}\" = set"; then
13919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013920else
Martin v. Löwis11437992002-04-12 09:54:03 +000013921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013922/* confdefs.h. */
13923_ACEOF
13924cat confdefs.h >>conftest.$ac_ext
13925cat >>conftest.$ac_ext <<_ACEOF
13926/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013927/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13928 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13929#define $ac_func innocuous_$ac_func
13930
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013931/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013932 which can conflict with char $ac_func (); below.
13933 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013934 <limits.h> exists even on freestanding compilers. */
13935
13936#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013937# include <limits.h>
13938#else
13939# include <assert.h>
13940#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013941
13942#undef $ac_func
13943
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013944/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013945#ifdef __cplusplus
13946extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013947{
Martin v. Löwis11437992002-04-12 09:54:03 +000013948#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013949/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013950 builtin and then its argument prototype would still apply. */
13951char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013952/* The GNU C library defines this for functions which it implements
13953 to always fail with ENOSYS. Some functions are actually named
13954 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013955#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013956choke me
13957#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013958char (*f) () = $ac_func;
13959#endif
13960#ifdef __cplusplus
13961}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013962#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013963
Skip Montanaro6dead952003-09-25 14:50:04 +000013964int
13965main ()
13966{
13967return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013968 ;
13969 return 0;
13970}
13971_ACEOF
13972rm -f conftest.$ac_objext conftest$ac_exeext
13973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013974 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013976 grep -v '^ *+' conftest.er1 >conftest.err
13977 rm -f conftest.er1
13978 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13980 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013981 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13983 (eval $ac_try) 2>&5
13984 ac_status=$?
13985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13986 (exit $ac_status); }; } &&
13987 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13989 (eval $ac_try) 2>&5
13990 ac_status=$?
13991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13992 (exit $ac_status); }; }; then
13993 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013994else
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013996sed 's/^/| /' conftest.$ac_ext >&5
13997
Martin v. Löwis11437992002-04-12 09:54:03 +000013998eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013999fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014000rm -f conftest.err conftest.$ac_objext \
14001 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014003echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14004echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14005if test `eval echo '${'$as_ac_var'}'` = yes; then
14006 cat >>confdefs.h <<_ACEOF
14007#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14008_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014009
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014010fi
14011done
14012
Michael W. Hudson54241132001-12-07 15:38:26 +000014013
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014014# For some functions, having a definition is not sufficient, since
14015# we want to take their address.
14016echo "$as_me:$LINENO: checking for chroot" >&5
14017echo $ECHO_N "checking for chroot... $ECHO_C" >&6
14018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014019/* confdefs.h. */
14020_ACEOF
14021cat confdefs.h >>conftest.$ac_ext
14022cat >>conftest.$ac_ext <<_ACEOF
14023/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014024#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014025int
14026main ()
14027{
14028void *x=chroot
14029 ;
14030 return 0;
14031}
14032_ACEOF
14033rm -f conftest.$ac_objext
14034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014035 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014037 grep -v '^ *+' conftest.er1 >conftest.err
14038 rm -f conftest.er1
14039 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14041 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014042 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14044 (eval $ac_try) 2>&5
14045 ac_status=$?
14046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14047 (exit $ac_status); }; } &&
14048 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14050 (eval $ac_try) 2>&5
14051 ac_status=$?
14052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053 (exit $ac_status); }; }; then
14054
14055cat >>confdefs.h <<\_ACEOF
14056#define HAVE_CHROOT 1
14057_ACEOF
14058
14059 echo "$as_me:$LINENO: result: yes" >&5
14060echo "${ECHO_T}yes" >&6
14061else
14062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014063sed 's/^/| /' conftest.$ac_ext >&5
14064
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014065echo "$as_me:$LINENO: result: no" >&5
14066echo "${ECHO_T}no" >&6
14067
14068fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014069rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014070echo "$as_me:$LINENO: checking for link" >&5
14071echo $ECHO_N "checking for link... $ECHO_C" >&6
14072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014073/* confdefs.h. */
14074_ACEOF
14075cat confdefs.h >>conftest.$ac_ext
14076cat >>conftest.$ac_ext <<_ACEOF
14077/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014078#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014079int
14080main ()
14081{
14082void *x=link
14083 ;
14084 return 0;
14085}
14086_ACEOF
14087rm -f conftest.$ac_objext
14088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014089 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014091 grep -v '^ *+' conftest.er1 >conftest.err
14092 rm -f conftest.er1
14093 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14095 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014096 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14098 (eval $ac_try) 2>&5
14099 ac_status=$?
14100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14101 (exit $ac_status); }; } &&
14102 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14104 (eval $ac_try) 2>&5
14105 ac_status=$?
14106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14107 (exit $ac_status); }; }; then
14108
14109cat >>confdefs.h <<\_ACEOF
14110#define HAVE_LINK 1
14111_ACEOF
14112
14113 echo "$as_me:$LINENO: result: yes" >&5
14114echo "${ECHO_T}yes" >&6
14115else
14116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014117sed 's/^/| /' conftest.$ac_ext >&5
14118
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014119echo "$as_me:$LINENO: result: no" >&5
14120echo "${ECHO_T}no" >&6
14121
14122fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014123rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014124echo "$as_me:$LINENO: checking for symlink" >&5
14125echo $ECHO_N "checking for symlink... $ECHO_C" >&6
14126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014127/* confdefs.h. */
14128_ACEOF
14129cat confdefs.h >>conftest.$ac_ext
14130cat >>conftest.$ac_ext <<_ACEOF
14131/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014132#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014133int
14134main ()
14135{
14136void *x=symlink
14137 ;
14138 return 0;
14139}
14140_ACEOF
14141rm -f conftest.$ac_objext
14142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014143 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014145 grep -v '^ *+' conftest.er1 >conftest.err
14146 rm -f conftest.er1
14147 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14149 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014150 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14152 (eval $ac_try) 2>&5
14153 ac_status=$?
14154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14155 (exit $ac_status); }; } &&
14156 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14158 (eval $ac_try) 2>&5
14159 ac_status=$?
14160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14161 (exit $ac_status); }; }; then
14162
14163cat >>confdefs.h <<\_ACEOF
14164#define HAVE_SYMLINK 1
14165_ACEOF
14166
14167 echo "$as_me:$LINENO: result: yes" >&5
14168echo "${ECHO_T}yes" >&6
14169else
14170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014171sed 's/^/| /' conftest.$ac_ext >&5
14172
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014173echo "$as_me:$LINENO: result: no" >&5
14174echo "${ECHO_T}no" >&6
14175
14176fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014177rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014178echo "$as_me:$LINENO: checking for fchdir" >&5
14179echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
14180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014181/* confdefs.h. */
14182_ACEOF
14183cat confdefs.h >>conftest.$ac_ext
14184cat >>conftest.$ac_ext <<_ACEOF
14185/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014186#include <unistd.h>
14187int
14188main ()
14189{
14190void *x=fchdir
14191 ;
14192 return 0;
14193}
14194_ACEOF
14195rm -f conftest.$ac_objext
14196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014197 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014199 grep -v '^ *+' conftest.er1 >conftest.err
14200 rm -f conftest.er1
14201 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014204 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14206 (eval $ac_try) 2>&5
14207 ac_status=$?
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); }; } &&
14210 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14212 (eval $ac_try) 2>&5
14213 ac_status=$?
14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14215 (exit $ac_status); }; }; then
14216
14217cat >>confdefs.h <<\_ACEOF
14218#define HAVE_FCHDIR 1
14219_ACEOF
14220
14221 echo "$as_me:$LINENO: result: yes" >&5
14222echo "${ECHO_T}yes" >&6
14223else
14224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014225sed 's/^/| /' conftest.$ac_ext >&5
14226
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014227echo "$as_me:$LINENO: result: no" >&5
14228echo "${ECHO_T}no" >&6
14229
14230fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014231rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014232echo "$as_me:$LINENO: checking for fsync" >&5
14233echo $ECHO_N "checking for fsync... $ECHO_C" >&6
14234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014235/* confdefs.h. */
14236_ACEOF
14237cat confdefs.h >>conftest.$ac_ext
14238cat >>conftest.$ac_ext <<_ACEOF
14239/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014240#include <unistd.h>
14241int
14242main ()
14243{
14244void *x=fsync
14245 ;
14246 return 0;
14247}
14248_ACEOF
14249rm -f conftest.$ac_objext
14250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014251 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014253 grep -v '^ *+' conftest.er1 >conftest.err
14254 rm -f conftest.er1
14255 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014258 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14260 (eval $ac_try) 2>&5
14261 ac_status=$?
14262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14263 (exit $ac_status); }; } &&
14264 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14266 (eval $ac_try) 2>&5
14267 ac_status=$?
14268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14269 (exit $ac_status); }; }; then
14270
14271cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014272#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014273_ACEOF
14274
14275 echo "$as_me:$LINENO: result: yes" >&5
14276echo "${ECHO_T}yes" >&6
14277else
14278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014279sed 's/^/| /' conftest.$ac_ext >&5
14280
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014281echo "$as_me:$LINENO: result: no" >&5
14282echo "${ECHO_T}no" >&6
14283
14284fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014285rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014286echo "$as_me:$LINENO: checking for fdatasync" >&5
14287echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
14288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014289/* confdefs.h. */
14290_ACEOF
14291cat confdefs.h >>conftest.$ac_ext
14292cat >>conftest.$ac_ext <<_ACEOF
14293/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014294#include <unistd.h>
14295int
14296main ()
14297{
14298void *x=fdatasync
14299 ;
14300 return 0;
14301}
14302_ACEOF
14303rm -f conftest.$ac_objext
14304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014305 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014307 grep -v '^ *+' conftest.er1 >conftest.err
14308 rm -f conftest.er1
14309 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14311 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014312 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14314 (eval $ac_try) 2>&5
14315 ac_status=$?
14316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14317 (exit $ac_status); }; } &&
14318 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14320 (eval $ac_try) 2>&5
14321 ac_status=$?
14322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14323 (exit $ac_status); }; }; then
14324
14325cat >>confdefs.h <<\_ACEOF
14326#define HAVE_FDATASYNC 1
14327_ACEOF
14328
14329 echo "$as_me:$LINENO: result: yes" >&5
14330echo "${ECHO_T}yes" >&6
14331else
14332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014333sed 's/^/| /' conftest.$ac_ext >&5
14334
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014335echo "$as_me:$LINENO: result: no" >&5
14336echo "${ECHO_T}no" >&6
14337
14338fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014339rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014340
Martin v. Löwisd5843682002-11-21 20:41:28 +000014341# On some systems (eg. FreeBSD 5), we would find a definition of the
14342# functions ctermid_r, setgroups in the library, but no prototype
14343# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14344# address to avoid compiler warnings and potential miscompilations
14345# because of the missing prototypes.
14346
14347echo "$as_me:$LINENO: checking for ctermid_r" >&5
14348echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
14349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014350/* confdefs.h. */
14351_ACEOF
14352cat confdefs.h >>conftest.$ac_ext
14353cat >>conftest.$ac_ext <<_ACEOF
14354/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014355
14356#include "confdefs.h"
14357#include <stdio.h>
14358
Martin v. Löwisd5843682002-11-21 20:41:28 +000014359int
14360main ()
14361{
14362void* p = ctermid_r
14363 ;
14364 return 0;
14365}
14366_ACEOF
14367rm -f conftest.$ac_objext
14368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014369 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014371 grep -v '^ *+' conftest.er1 >conftest.err
14372 rm -f conftest.er1
14373 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14375 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014376 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14378 (eval $ac_try) 2>&5
14379 ac_status=$?
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); }; } &&
14382 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14384 (eval $ac_try) 2>&5
14385 ac_status=$?
14386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14387 (exit $ac_status); }; }; then
14388
14389cat >>confdefs.h <<\_ACEOF
14390#define HAVE_CTERMID_R 1
14391_ACEOF
14392
14393 echo "$as_me:$LINENO: result: yes" >&5
14394echo "${ECHO_T}yes" >&6
14395else
14396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014397sed 's/^/| /' conftest.$ac_ext >&5
14398
Martin v. Löwisd5843682002-11-21 20:41:28 +000014399echo "$as_me:$LINENO: result: no" >&5
14400echo "${ECHO_T}no" >&6
14401
14402fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014403rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014404
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014405echo "$as_me:$LINENO: checking for flock" >&5
14406echo $ECHO_N "checking for flock... $ECHO_C" >&6
14407cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014408/* confdefs.h. */
14409_ACEOF
14410cat confdefs.h >>conftest.$ac_ext
14411cat >>conftest.$ac_ext <<_ACEOF
14412/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014413
14414#include "confdefs.h"
14415#include <sys/file.h>
14416
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014417int
14418main ()
14419{
14420void* p = flock
14421 ;
14422 return 0;
14423}
14424_ACEOF
14425rm -f conftest.$ac_objext
14426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014427 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014429 grep -v '^ *+' conftest.er1 >conftest.err
14430 rm -f conftest.er1
14431 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014434 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14436 (eval $ac_try) 2>&5
14437 ac_status=$?
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); }; } &&
14440 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14442 (eval $ac_try) 2>&5
14443 ac_status=$?
14444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14445 (exit $ac_status); }; }; then
14446
14447cat >>confdefs.h <<\_ACEOF
14448#define HAVE_FLOCK 1
14449_ACEOF
14450
14451 echo "$as_me:$LINENO: result: yes" >&5
14452echo "${ECHO_T}yes" >&6
14453else
14454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014455sed 's/^/| /' conftest.$ac_ext >&5
14456
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014457echo "$as_me:$LINENO: result: no" >&5
14458echo "${ECHO_T}no" >&6
14459
14460fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014461rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014462
14463echo "$as_me:$LINENO: checking for getpagesize" >&5
14464echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014466/* confdefs.h. */
14467_ACEOF
14468cat confdefs.h >>conftest.$ac_ext
14469cat >>conftest.$ac_ext <<_ACEOF
14470/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014471
14472#include "confdefs.h"
14473#include <unistd.h>
14474
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014475int
14476main ()
14477{
14478void* p = getpagesize
14479 ;
14480 return 0;
14481}
14482_ACEOF
14483rm -f conftest.$ac_objext
14484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014485 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014487 grep -v '^ *+' conftest.er1 >conftest.err
14488 rm -f conftest.er1
14489 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14491 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014492 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14494 (eval $ac_try) 2>&5
14495 ac_status=$?
14496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14497 (exit $ac_status); }; } &&
14498 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14500 (eval $ac_try) 2>&5
14501 ac_status=$?
14502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14503 (exit $ac_status); }; }; then
14504
14505cat >>confdefs.h <<\_ACEOF
14506#define HAVE_GETPAGESIZE 1
14507_ACEOF
14508
14509 echo "$as_me:$LINENO: result: yes" >&5
14510echo "${ECHO_T}yes" >&6
14511else
14512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014513sed 's/^/| /' conftest.$ac_ext >&5
14514
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014515echo "$as_me:$LINENO: result: no" >&5
14516echo "${ECHO_T}no" >&6
14517
14518fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014519rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014520
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014521for ac_prog in true
14522do
14523 # Extract the first word of "$ac_prog", so it can be a program name with args.
14524set dummy $ac_prog; ac_word=$2
14525echo "$as_me:$LINENO: checking for $ac_word" >&5
14526echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14527if test "${ac_cv_prog_TRUE+set}" = set; then
14528 echo $ECHO_N "(cached) $ECHO_C" >&6
14529else
14530 if test -n "$TRUE"; then
14531 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14532else
14533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14534for as_dir in $PATH
14535do
14536 IFS=$as_save_IFS
14537 test -z "$as_dir" && as_dir=.
14538 for ac_exec_ext in '' $ac_executable_extensions; do
14539 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14540 ac_cv_prog_TRUE="$ac_prog"
14541 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14542 break 2
14543 fi
14544done
14545done
14546
14547fi
14548fi
14549TRUE=$ac_cv_prog_TRUE
14550if test -n "$TRUE"; then
14551 echo "$as_me:$LINENO: result: $TRUE" >&5
14552echo "${ECHO_T}$TRUE" >&6
14553else
14554 echo "$as_me:$LINENO: result: no" >&5
14555echo "${ECHO_T}no" >&6
14556fi
14557
14558 test -n "$TRUE" && break
14559done
14560test -n "$TRUE" || TRUE="/bin/true"
14561
14562
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014563echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14564echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14565if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14566 echo $ECHO_N "(cached) $ECHO_C" >&6
14567else
14568 ac_check_lib_save_LIBS=$LIBS
14569LIBS="-lc $LIBS"
14570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014571/* confdefs.h. */
14572_ACEOF
14573cat confdefs.h >>conftest.$ac_ext
14574cat >>conftest.$ac_ext <<_ACEOF
14575/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014576
14577/* Override any gcc2 internal prototype to avoid an error. */
14578#ifdef __cplusplus
14579extern "C"
14580#endif
14581/* We use char because int might match the return type of a gcc2
14582 builtin and then its argument prototype would still apply. */
14583char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014584int
14585main ()
14586{
14587inet_aton ();
14588 ;
14589 return 0;
14590}
14591_ACEOF
14592rm -f conftest.$ac_objext conftest$ac_exeext
14593if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014594 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014596 grep -v '^ *+' conftest.er1 >conftest.err
14597 rm -f conftest.er1
14598 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14600 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014601 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14603 (eval $ac_try) 2>&5
14604 ac_status=$?
14605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14606 (exit $ac_status); }; } &&
14607 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14609 (eval $ac_try) 2>&5
14610 ac_status=$?
14611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14612 (exit $ac_status); }; }; then
14613 ac_cv_lib_c_inet_aton=yes
14614else
14615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014616sed 's/^/| /' conftest.$ac_ext >&5
14617
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014618ac_cv_lib_c_inet_aton=no
14619fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014620rm -f conftest.err conftest.$ac_objext \
14621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014622LIBS=$ac_check_lib_save_LIBS
14623fi
14624echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14625echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14626if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014627 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014628else
14629
14630echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14631echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14632if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14633 echo $ECHO_N "(cached) $ECHO_C" >&6
14634else
14635 ac_check_lib_save_LIBS=$LIBS
14636LIBS="-lresolv $LIBS"
14637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014638/* confdefs.h. */
14639_ACEOF
14640cat confdefs.h >>conftest.$ac_ext
14641cat >>conftest.$ac_ext <<_ACEOF
14642/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014643
14644/* Override any gcc2 internal prototype to avoid an error. */
14645#ifdef __cplusplus
14646extern "C"
14647#endif
14648/* We use char because int might match the return type of a gcc2
14649 builtin and then its argument prototype would still apply. */
14650char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014651int
14652main ()
14653{
14654inet_aton ();
14655 ;
14656 return 0;
14657}
14658_ACEOF
14659rm -f conftest.$ac_objext conftest$ac_exeext
14660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014661 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014663 grep -v '^ *+' conftest.er1 >conftest.err
14664 rm -f conftest.er1
14665 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14667 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014668 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14670 (eval $ac_try) 2>&5
14671 ac_status=$?
14672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14673 (exit $ac_status); }; } &&
14674 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14676 (eval $ac_try) 2>&5
14677 ac_status=$?
14678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14679 (exit $ac_status); }; }; then
14680 ac_cv_lib_resolv_inet_aton=yes
14681else
14682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014683sed 's/^/| /' conftest.$ac_ext >&5
14684
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014685ac_cv_lib_resolv_inet_aton=no
14686fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014687rm -f conftest.err conftest.$ac_objext \
14688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014689LIBS=$ac_check_lib_save_LIBS
14690fi
14691echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14692echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14693if test $ac_cv_lib_resolv_inet_aton = yes; then
14694 cat >>confdefs.h <<_ACEOF
14695#define HAVE_LIBRESOLV 1
14696_ACEOF
14697
14698 LIBS="-lresolv $LIBS"
14699
14700fi
14701
14702
14703fi
14704
14705
Martin v. Löwise9416172003-05-03 10:12:45 +000014706echo "$as_me:$LINENO: checking for hstrerror" >&5
14707echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014709/* confdefs.h. */
14710_ACEOF
14711cat confdefs.h >>conftest.$ac_ext
14712cat >>conftest.$ac_ext <<_ACEOF
14713/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014714
14715#include "confdefs.h"
14716#include <netdb.h>
14717
Martin v. Löwise9416172003-05-03 10:12:45 +000014718int
14719main ()
14720{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014721void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014722 ;
14723 return 0;
14724}
14725_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014726rm -f conftest.$ac_objext conftest$ac_exeext
14727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014728 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014730 grep -v '^ *+' conftest.er1 >conftest.err
14731 rm -f conftest.er1
14732 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14734 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014735 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14737 (eval $ac_try) 2>&5
14738 ac_status=$?
14739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14740 (exit $ac_status); }; } &&
14741 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14743 (eval $ac_try) 2>&5
14744 ac_status=$?
14745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14746 (exit $ac_status); }; }; then
14747
14748cat >>confdefs.h <<\_ACEOF
14749#define HAVE_HSTRERROR 1
14750_ACEOF
14751
14752 echo "$as_me:$LINENO: result: yes" >&5
14753echo "${ECHO_T}yes" >&6
14754else
14755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014756sed 's/^/| /' conftest.$ac_ext >&5
14757
Martin v. Löwise9416172003-05-03 10:12:45 +000014758echo "$as_me:$LINENO: result: no" >&5
14759echo "${ECHO_T}no" >&6
14760
14761fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014762rm -f conftest.err conftest.$ac_objext \
14763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014764
14765echo "$as_me:$LINENO: checking for inet_aton" >&5
14766echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14767cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014768/* confdefs.h. */
14769_ACEOF
14770cat confdefs.h >>conftest.$ac_ext
14771cat >>conftest.$ac_ext <<_ACEOF
14772/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014773
14774#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000014775#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014776#include <sys/socket.h>
14777#include <netinet/in.h>
14778#include <arpa/inet.h>
14779
Martin v. Löwise9416172003-05-03 10:12:45 +000014780int
14781main ()
14782{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014783void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014784 ;
14785 return 0;
14786}
14787_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014788rm -f conftest.$ac_objext conftest$ac_exeext
14789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014790 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014792 grep -v '^ *+' conftest.er1 >conftest.err
14793 rm -f conftest.er1
14794 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014797 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14799 (eval $ac_try) 2>&5
14800 ac_status=$?
14801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); }; } &&
14803 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14805 (eval $ac_try) 2>&5
14806 ac_status=$?
14807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 (exit $ac_status); }; }; then
14809
14810cat >>confdefs.h <<\_ACEOF
14811#define HAVE_INET_ATON 1
14812_ACEOF
14813
14814 echo "$as_me:$LINENO: result: yes" >&5
14815echo "${ECHO_T}yes" >&6
14816else
14817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014818sed 's/^/| /' conftest.$ac_ext >&5
14819
Martin v. Löwise9416172003-05-03 10:12:45 +000014820echo "$as_me:$LINENO: result: no" >&5
14821echo "${ECHO_T}no" >&6
14822
14823fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014824rm -f conftest.err conftest.$ac_objext \
14825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014826
14827echo "$as_me:$LINENO: checking for inet_pton" >&5
14828echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014830/* confdefs.h. */
14831_ACEOF
14832cat confdefs.h >>conftest.$ac_ext
14833cat >>conftest.$ac_ext <<_ACEOF
14834/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014835
14836#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014837#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014838#include <sys/socket.h>
14839#include <netinet/in.h>
14840#include <arpa/inet.h>
14841
Martin v. Löwise9416172003-05-03 10:12:45 +000014842int
14843main ()
14844{
14845void* p = inet_pton
14846 ;
14847 return 0;
14848}
14849_ACEOF
14850rm -f conftest.$ac_objext
14851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014852 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014854 grep -v '^ *+' conftest.er1 >conftest.err
14855 rm -f conftest.er1
14856 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14858 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014859 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14861 (eval $ac_try) 2>&5
14862 ac_status=$?
14863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14864 (exit $ac_status); }; } &&
14865 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14867 (eval $ac_try) 2>&5
14868 ac_status=$?
14869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14870 (exit $ac_status); }; }; then
14871
14872cat >>confdefs.h <<\_ACEOF
14873#define HAVE_INET_PTON 1
14874_ACEOF
14875
14876 echo "$as_me:$LINENO: result: yes" >&5
14877echo "${ECHO_T}yes" >&6
14878else
14879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014880sed 's/^/| /' conftest.$ac_ext >&5
14881
Martin v. Löwise9416172003-05-03 10:12:45 +000014882echo "$as_me:$LINENO: result: no" >&5
14883echo "${ECHO_T}no" >&6
14884
14885fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014886rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014887
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014888# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014889echo "$as_me:$LINENO: checking for setgroups" >&5
14890echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014892/* confdefs.h. */
14893_ACEOF
14894cat confdefs.h >>conftest.$ac_ext
14895cat >>conftest.$ac_ext <<_ACEOF
14896/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014897
14898#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014899#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014900#ifdef HAVE_GRP_H
14901#include <grp.h>
14902#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014903
Martin v. Löwisd5843682002-11-21 20:41:28 +000014904int
14905main ()
14906{
14907void* p = setgroups
14908 ;
14909 return 0;
14910}
14911_ACEOF
14912rm -f conftest.$ac_objext
14913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014914 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014916 grep -v '^ *+' conftest.er1 >conftest.err
14917 rm -f conftest.er1
14918 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14920 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014921 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14923 (eval $ac_try) 2>&5
14924 ac_status=$?
14925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14926 (exit $ac_status); }; } &&
14927 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14929 (eval $ac_try) 2>&5
14930 ac_status=$?
14931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14932 (exit $ac_status); }; }; then
14933
14934cat >>confdefs.h <<\_ACEOF
14935#define HAVE_SETGROUPS 1
14936_ACEOF
14937
14938 echo "$as_me:$LINENO: result: yes" >&5
14939echo "${ECHO_T}yes" >&6
14940else
14941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014942sed 's/^/| /' conftest.$ac_ext >&5
14943
Martin v. Löwisd5843682002-11-21 20:41:28 +000014944echo "$as_me:$LINENO: result: no" >&5
14945echo "${ECHO_T}no" >&6
14946
14947fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014948rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014949
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014950# check for openpty and forkpty
14951
Martin v. Löwis11437992002-04-12 09:54:03 +000014952
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014953for ac_func in openpty
14954do
Martin v. Löwis11437992002-04-12 09:54:03 +000014955as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14956echo "$as_me:$LINENO: checking for $ac_func" >&5
14957echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14958if eval "test \"\${$as_ac_var+set}\" = set"; then
14959 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014960else
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014962/* confdefs.h. */
14963_ACEOF
14964cat confdefs.h >>conftest.$ac_ext
14965cat >>conftest.$ac_ext <<_ACEOF
14966/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014967/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14968 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14969#define $ac_func innocuous_$ac_func
14970
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014971/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014972 which can conflict with char $ac_func (); below.
14973 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014974 <limits.h> exists even on freestanding compilers. */
14975
14976#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014977# include <limits.h>
14978#else
14979# include <assert.h>
14980#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014981
14982#undef $ac_func
14983
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014984/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014985#ifdef __cplusplus
14986extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014987{
Martin v. Löwis11437992002-04-12 09:54:03 +000014988#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014989/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 builtin and then its argument prototype would still apply. */
14991char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014992/* The GNU C library defines this for functions which it implements
14993 to always fail with ENOSYS. Some functions are actually named
14994 something starting with __ and the normal name is an alias. */
14995#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14996choke me
14997#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014998char (*f) () = $ac_func;
14999#endif
15000#ifdef __cplusplus
15001}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015002#endif
15003
Skip Montanaro6dead952003-09-25 14:50:04 +000015004int
15005main ()
15006{
15007return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 ;
15009 return 0;
15010}
15011_ACEOF
15012rm -f conftest.$ac_objext conftest$ac_exeext
15013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015014 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015016 grep -v '^ *+' conftest.er1 >conftest.err
15017 rm -f conftest.er1
15018 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15020 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015021 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15023 (eval $ac_try) 2>&5
15024 ac_status=$?
15025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15026 (exit $ac_status); }; } &&
15027 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15029 (eval $ac_try) 2>&5
15030 ac_status=$?
15031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15032 (exit $ac_status); }; }; then
15033 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015034else
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015036sed 's/^/| /' conftest.$ac_ext >&5
15037
Martin v. Löwis11437992002-04-12 09:54:03 +000015038eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015039fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015040rm -f conftest.err conftest.$ac_objext \
15041 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015043echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15044echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15045if test `eval echo '${'$as_ac_var'}'` = yes; then
15046 cat >>confdefs.h <<_ACEOF
15047#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15048_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015049
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015050else
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
15052echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15053if test "${ac_cv_lib_util_openpty+set}" = set; then
15054 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015055else
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015057LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015059/* confdefs.h. */
15060_ACEOF
15061cat confdefs.h >>conftest.$ac_ext
15062cat >>conftest.$ac_ext <<_ACEOF
15063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015064
Fred Drake8cef4cf2000-06-28 16:40:38 +000015065/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015066#ifdef __cplusplus
15067extern "C"
15068#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015069/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 builtin and then its argument prototype would still apply. */
15071char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015072int
15073main ()
15074{
15075openpty ();
15076 ;
15077 return 0;
15078}
15079_ACEOF
15080rm -f conftest.$ac_objext conftest$ac_exeext
15081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015082 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015084 grep -v '^ *+' conftest.er1 >conftest.err
15085 rm -f conftest.er1
15086 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15088 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015089 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15091 (eval $ac_try) 2>&5
15092 ac_status=$?
15093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15094 (exit $ac_status); }; } &&
15095 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15097 (eval $ac_try) 2>&5
15098 ac_status=$?
15099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100 (exit $ac_status); }; }; then
15101 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015102else
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015104sed 's/^/| /' conftest.$ac_ext >&5
15105
Martin v. Löwis11437992002-04-12 09:54:03 +000015106ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015107fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015108rm -f conftest.err conftest.$ac_objext \
15109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015110LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015112echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
15113echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15114if test $ac_cv_lib_util_openpty = yes; then
15115 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015116#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015117_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015118 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015119else
15120 echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
15121echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6
15122if test "${ac_cv_lib_bsd_openpty+set}" = set; then
15123 echo $ECHO_N "(cached) $ECHO_C" >&6
15124else
15125 ac_check_lib_save_LIBS=$LIBS
15126LIBS="-lbsd $LIBS"
15127cat >conftest.$ac_ext <<_ACEOF
15128/* confdefs.h. */
15129_ACEOF
15130cat confdefs.h >>conftest.$ac_ext
15131cat >>conftest.$ac_ext <<_ACEOF
15132/* end confdefs.h. */
15133
15134/* Override any gcc2 internal prototype to avoid an error. */
15135#ifdef __cplusplus
15136extern "C"
15137#endif
15138/* We use char because int might match the return type of a gcc2
15139 builtin and then its argument prototype would still apply. */
15140char openpty ();
15141int
15142main ()
15143{
15144openpty ();
15145 ;
15146 return 0;
15147}
15148_ACEOF
15149rm -f conftest.$ac_objext conftest$ac_exeext
15150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15151 (eval $ac_link) 2>conftest.er1
15152 ac_status=$?
15153 grep -v '^ *+' conftest.er1 >conftest.err
15154 rm -f conftest.er1
15155 cat conftest.err >&5
15156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15157 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015158 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15160 (eval $ac_try) 2>&5
15161 ac_status=$?
15162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15163 (exit $ac_status); }; } &&
15164 { ac_try='test -s conftest$ac_exeext'
15165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15166 (eval $ac_try) 2>&5
15167 ac_status=$?
15168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169 (exit $ac_status); }; }; then
15170 ac_cv_lib_bsd_openpty=yes
15171else
15172 echo "$as_me: failed program was:" >&5
15173sed 's/^/| /' conftest.$ac_ext >&5
15174
15175ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015176fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015177rm -f conftest.err conftest.$ac_objext \
15178 conftest$ac_exeext conftest.$ac_ext
15179LIBS=$ac_check_lib_save_LIBS
15180fi
15181echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
15182echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6
15183if test $ac_cv_lib_bsd_openpty = yes; then
15184 cat >>confdefs.h <<\_ACEOF
15185#define HAVE_OPENPTY 1
15186_ACEOF
15187 LIBS="$LIBS -lbsd"
15188fi
15189
15190
15191fi
15192
Fred Drake8cef4cf2000-06-28 16:40:38 +000015193
15194fi
15195done
15196
Martin v. Löwis11437992002-04-12 09:54:03 +000015197
Fred Drake8cef4cf2000-06-28 16:40:38 +000015198for ac_func in forkpty
15199do
Martin v. Löwis11437992002-04-12 09:54:03 +000015200as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15201echo "$as_me:$LINENO: checking for $ac_func" >&5
15202echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15203if eval "test \"\${$as_ac_var+set}\" = set"; then
15204 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015205else
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015207/* confdefs.h. */
15208_ACEOF
15209cat confdefs.h >>conftest.$ac_ext
15210cat >>conftest.$ac_ext <<_ACEOF
15211/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015212/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15213 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15214#define $ac_func innocuous_$ac_func
15215
Fred Drake8cef4cf2000-06-28 16:40:38 +000015216/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015217 which can conflict with char $ac_func (); below.
15218 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015219 <limits.h> exists even on freestanding compilers. */
15220
15221#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015222# include <limits.h>
15223#else
15224# include <assert.h>
15225#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015226
15227#undef $ac_func
15228
Fred Drake8cef4cf2000-06-28 16:40:38 +000015229/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015230#ifdef __cplusplus
15231extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015232{
Martin v. Löwis11437992002-04-12 09:54:03 +000015233#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015234/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 builtin and then its argument prototype would still apply. */
15236char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000015237/* The GNU C library defines this for functions which it implements
15238 to always fail with ENOSYS. Some functions are actually named
15239 something starting with __ and the normal name is an alias. */
15240#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15241choke me
15242#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015243char (*f) () = $ac_func;
15244#endif
15245#ifdef __cplusplus
15246}
Fred Drake8cef4cf2000-06-28 16:40:38 +000015247#endif
15248
Skip Montanaro6dead952003-09-25 14:50:04 +000015249int
15250main ()
15251{
15252return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ;
15254 return 0;
15255}
15256_ACEOF
15257rm -f conftest.$ac_objext conftest$ac_exeext
15258if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015259 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015261 grep -v '^ *+' conftest.er1 >conftest.err
15262 rm -f conftest.er1
15263 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15265 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015266 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15268 (eval $ac_try) 2>&5
15269 ac_status=$?
15270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15271 (exit $ac_status); }; } &&
15272 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15274 (eval $ac_try) 2>&5
15275 ac_status=$?
15276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15277 (exit $ac_status); }; }; then
15278 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015279else
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015281sed 's/^/| /' conftest.$ac_ext >&5
15282
Martin v. Löwis11437992002-04-12 09:54:03 +000015283eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015284fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015285rm -f conftest.err conftest.$ac_objext \
15286 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015288echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15289echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15290if test `eval echo '${'$as_ac_var'}'` = yes; then
15291 cat >>confdefs.h <<_ACEOF
15292#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15293_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015294
Fred Drake8cef4cf2000-06-28 16:40:38 +000015295else
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
15297echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
15298if test "${ac_cv_lib_util_forkpty+set}" = set; then
15299 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015300else
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015302LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015303cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015304/* confdefs.h. */
15305_ACEOF
15306cat confdefs.h >>conftest.$ac_ext
15307cat >>conftest.$ac_ext <<_ACEOF
15308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015309
Fred Drake8cef4cf2000-06-28 16:40:38 +000015310/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015311#ifdef __cplusplus
15312extern "C"
15313#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015314/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 builtin and then its argument prototype would still apply. */
15316char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015317int
15318main ()
15319{
15320forkpty ();
15321 ;
15322 return 0;
15323}
15324_ACEOF
15325rm -f conftest.$ac_objext conftest$ac_exeext
15326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015327 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015329 grep -v '^ *+' conftest.er1 >conftest.err
15330 rm -f conftest.er1
15331 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15333 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015334 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15336 (eval $ac_try) 2>&5
15337 ac_status=$?
15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339 (exit $ac_status); }; } &&
15340 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15342 (eval $ac_try) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); }; }; then
15346 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015347else
Martin v. Löwis11437992002-04-12 09:54:03 +000015348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015349sed 's/^/| /' conftest.$ac_ext >&5
15350
Martin v. Löwis11437992002-04-12 09:54:03 +000015351ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015352fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015353rm -f conftest.err conftest.$ac_objext \
15354 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015355LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015357echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
15358echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
15359if test $ac_cv_lib_util_forkpty = yes; then
15360 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015361#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015362_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015363 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015364else
15365 echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
15366echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6
15367if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
15368 echo $ECHO_N "(cached) $ECHO_C" >&6
15369else
15370 ac_check_lib_save_LIBS=$LIBS
15371LIBS="-lbsd $LIBS"
15372cat >conftest.$ac_ext <<_ACEOF
15373/* confdefs.h. */
15374_ACEOF
15375cat confdefs.h >>conftest.$ac_ext
15376cat >>conftest.$ac_ext <<_ACEOF
15377/* end confdefs.h. */
15378
15379/* Override any gcc2 internal prototype to avoid an error. */
15380#ifdef __cplusplus
15381extern "C"
15382#endif
15383/* We use char because int might match the return type of a gcc2
15384 builtin and then its argument prototype would still apply. */
15385char forkpty ();
15386int
15387main ()
15388{
15389forkpty ();
15390 ;
15391 return 0;
15392}
15393_ACEOF
15394rm -f conftest.$ac_objext conftest$ac_exeext
15395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15396 (eval $ac_link) 2>conftest.er1
15397 ac_status=$?
15398 grep -v '^ *+' conftest.er1 >conftest.err
15399 rm -f conftest.er1
15400 cat conftest.err >&5
15401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15402 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015403 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15405 (eval $ac_try) 2>&5
15406 ac_status=$?
15407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15408 (exit $ac_status); }; } &&
15409 { ac_try='test -s conftest$ac_exeext'
15410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15411 (eval $ac_try) 2>&5
15412 ac_status=$?
15413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15414 (exit $ac_status); }; }; then
15415 ac_cv_lib_bsd_forkpty=yes
15416else
15417 echo "$as_me: failed program was:" >&5
15418sed 's/^/| /' conftest.$ac_ext >&5
15419
15420ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015421fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015422rm -f conftest.err conftest.$ac_objext \
15423 conftest$ac_exeext conftest.$ac_ext
15424LIBS=$ac_check_lib_save_LIBS
15425fi
15426echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
15427echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6
15428if test $ac_cv_lib_bsd_forkpty = yes; then
15429 cat >>confdefs.h <<\_ACEOF
15430#define HAVE_FORKPTY 1
15431_ACEOF
15432 LIBS="$LIBS -lbsd"
15433fi
15434
15435
15436fi
15437
Fred Drake8cef4cf2000-06-28 16:40:38 +000015438
15439fi
15440done
15441
Jack Jansendd19cf82001-12-06 22:36:17 +000015442
Michael W. Hudson54241132001-12-07 15:38:26 +000015443# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015444
15445
15446
15447
15448
15449
Fred Drake8cef4cf2000-06-28 16:40:38 +000015450for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
15451do
Martin v. Löwis11437992002-04-12 09:54:03 +000015452as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15453echo "$as_me:$LINENO: checking for $ac_func" >&5
15454echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15455if eval "test \"\${$as_ac_var+set}\" = set"; then
15456 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015457else
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015459/* confdefs.h. */
15460_ACEOF
15461cat confdefs.h >>conftest.$ac_ext
15462cat >>conftest.$ac_ext <<_ACEOF
15463/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015464/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15465 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15466#define $ac_func innocuous_$ac_func
15467
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015468/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015469 which can conflict with char $ac_func (); below.
15470 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015471 <limits.h> exists even on freestanding compilers. */
15472
15473#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015474# include <limits.h>
15475#else
15476# include <assert.h>
15477#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015478
15479#undef $ac_func
15480
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015481/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015482#ifdef __cplusplus
15483extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015484{
Martin v. Löwis11437992002-04-12 09:54:03 +000015485#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015486/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 builtin and then its argument prototype would still apply. */
15488char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015489/* The GNU C library defines this for functions which it implements
15490 to always fail with ENOSYS. Some functions are actually named
15491 something starting with __ and the normal name is an alias. */
15492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15493choke me
15494#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015495char (*f) () = $ac_func;
15496#endif
15497#ifdef __cplusplus
15498}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015499#endif
15500
Skip Montanaro6dead952003-09-25 14:50:04 +000015501int
15502main ()
15503{
15504return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015505 ;
15506 return 0;
15507}
15508_ACEOF
15509rm -f conftest.$ac_objext conftest$ac_exeext
15510if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015511 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015513 grep -v '^ *+' conftest.er1 >conftest.err
15514 rm -f conftest.er1
15515 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15517 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015518 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15520 (eval $ac_try) 2>&5
15521 ac_status=$?
15522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15523 (exit $ac_status); }; } &&
15524 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15526 (eval $ac_try) 2>&5
15527 ac_status=$?
15528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15529 (exit $ac_status); }; }; then
15530 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015531else
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015533sed 's/^/| /' conftest.$ac_ext >&5
15534
Martin v. Löwis11437992002-04-12 09:54:03 +000015535eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015536fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015537rm -f conftest.err conftest.$ac_objext \
15538 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015540echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15541echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15542if test `eval echo '${'$as_ac_var'}'` = yes; then
15543 cat >>confdefs.h <<_ACEOF
15544#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15545_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015546
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015547fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015548done
15549
Michael W. Hudson54241132001-12-07 15:38:26 +000015550
Martin v. Löwis11437992002-04-12 09:54:03 +000015551
15552
15553
15554
15555
Martin v. Löwis1142de32002-03-29 16:28:31 +000015556for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000015557do
Martin v. Löwis11437992002-04-12 09:54:03 +000015558as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15559echo "$as_me:$LINENO: checking for $ac_func" >&5
15560echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15561if eval "test \"\${$as_ac_var+set}\" = set"; then
15562 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015563else
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015565/* confdefs.h. */
15566_ACEOF
15567cat confdefs.h >>conftest.$ac_ext
15568cat >>conftest.$ac_ext <<_ACEOF
15569/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015570/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15571 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15572#define $ac_func innocuous_$ac_func
15573
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015574/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015575 which can conflict with char $ac_func (); below.
15576 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015577 <limits.h> exists even on freestanding compilers. */
15578
15579#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015580# include <limits.h>
15581#else
15582# include <assert.h>
15583#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015584
15585#undef $ac_func
15586
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015587/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015588#ifdef __cplusplus
15589extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015590{
Martin v. Löwis11437992002-04-12 09:54:03 +000015591#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015592/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 builtin and then its argument prototype would still apply. */
15594char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015595/* The GNU C library defines this for functions which it implements
15596 to always fail with ENOSYS. Some functions are actually named
15597 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015598#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015599choke me
15600#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015601char (*f) () = $ac_func;
15602#endif
15603#ifdef __cplusplus
15604}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015605#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015606
Skip Montanaro6dead952003-09-25 14:50:04 +000015607int
15608main ()
15609{
15610return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 ;
15612 return 0;
15613}
15614_ACEOF
15615rm -f conftest.$ac_objext conftest$ac_exeext
15616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015617 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015619 grep -v '^ *+' conftest.er1 >conftest.err
15620 rm -f conftest.er1
15621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15623 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015624 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15626 (eval $ac_try) 2>&5
15627 ac_status=$?
15628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15629 (exit $ac_status); }; } &&
15630 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15632 (eval $ac_try) 2>&5
15633 ac_status=$?
15634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15635 (exit $ac_status); }; }; then
15636 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015637else
Martin v. Löwis11437992002-04-12 09:54:03 +000015638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015639sed 's/^/| /' conftest.$ac_ext >&5
15640
Martin v. Löwis11437992002-04-12 09:54:03 +000015641eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015642fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015643rm -f conftest.err conftest.$ac_objext \
15644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015645fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015646echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15647echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15648if test `eval echo '${'$as_ac_var'}'` = yes; then
15649 cat >>confdefs.h <<_ACEOF
15650#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15651_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015652
Martin v. Löwis1142de32002-03-29 16:28:31 +000015653else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015654 case $LIBOBJS in
15655 "$ac_func.$ac_objext" | \
15656 *" $ac_func.$ac_objext" | \
15657 "$ac_func.$ac_objext "* | \
15658 *" $ac_func.$ac_objext "* ) ;;
15659 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15660esac
15661
Martin v. Löwis1142de32002-03-29 16:28:31 +000015662fi
15663done
15664
15665
Martin v. Löwis11437992002-04-12 09:54:03 +000015666
Martin v. Löwis1142de32002-03-29 16:28:31 +000015667for ac_func in getpgrp
15668do
Martin v. Löwis11437992002-04-12 09:54:03 +000015669as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15670echo "$as_me:$LINENO: checking for $ac_func" >&5
15671echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15672if eval "test \"\${$as_ac_var+set}\" = set"; then
15673 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015674else
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015676/* confdefs.h. */
15677_ACEOF
15678cat confdefs.h >>conftest.$ac_ext
15679cat >>conftest.$ac_ext <<_ACEOF
15680/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015681/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15682 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15683#define $ac_func innocuous_$ac_func
15684
Martin v. Löwis1142de32002-03-29 16:28:31 +000015685/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015686 which can conflict with char $ac_func (); below.
15687 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015688 <limits.h> exists even on freestanding compilers. */
15689
15690#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015691# include <limits.h>
15692#else
15693# include <assert.h>
15694#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015695
15696#undef $ac_func
15697
Martin v. Löwis1142de32002-03-29 16:28:31 +000015698/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015699#ifdef __cplusplus
15700extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015701{
Martin v. Löwis11437992002-04-12 09:54:03 +000015702#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015703/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 builtin and then its argument prototype would still apply. */
15705char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015706/* The GNU C library defines this for functions which it implements
15707 to always fail with ENOSYS. Some functions are actually named
15708 something starting with __ and the normal name is an alias. */
15709#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15710choke me
15711#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015712char (*f) () = $ac_func;
15713#endif
15714#ifdef __cplusplus
15715}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015716#endif
15717
Skip Montanaro6dead952003-09-25 14:50:04 +000015718int
15719main ()
15720{
15721return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015722 ;
15723 return 0;
15724}
15725_ACEOF
15726rm -f conftest.$ac_objext conftest$ac_exeext
15727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015728 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015730 grep -v '^ *+' conftest.er1 >conftest.err
15731 rm -f conftest.er1
15732 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15734 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015735 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15737 (eval $ac_try) 2>&5
15738 ac_status=$?
15739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15740 (exit $ac_status); }; } &&
15741 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15743 (eval $ac_try) 2>&5
15744 ac_status=$?
15745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15746 (exit $ac_status); }; }; then
15747 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015748else
Martin v. Löwis11437992002-04-12 09:54:03 +000015749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015750sed 's/^/| /' conftest.$ac_ext >&5
15751
Martin v. Löwis11437992002-04-12 09:54:03 +000015752eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015753fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015754rm -f conftest.err conftest.$ac_objext \
15755 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015757echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15758echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15759if test `eval echo '${'$as_ac_var'}'` = yes; then
15760 cat >>confdefs.h <<_ACEOF
15761#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15762_ACEOF
15763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015764/* confdefs.h. */
15765_ACEOF
15766cat confdefs.h >>conftest.$ac_ext
15767cat >>conftest.$ac_ext <<_ACEOF
15768/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015769#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015770int
15771main ()
15772{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015773getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015774 ;
15775 return 0;
15776}
15777_ACEOF
15778rm -f conftest.$ac_objext
15779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015780 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015782 grep -v '^ *+' conftest.er1 >conftest.err
15783 rm -f conftest.er1
15784 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15786 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015787 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15789 (eval $ac_try) 2>&5
15790 ac_status=$?
15791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15792 (exit $ac_status); }; } &&
15793 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15795 (eval $ac_try) 2>&5
15796 ac_status=$?
15797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15798 (exit $ac_status); }; }; then
15799
15800cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015801#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015802_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015803
Martin v. Löwis11437992002-04-12 09:54:03 +000015804
Guido van Rossumf78abae1997-01-21 22:02:36 +000015805else
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015807sed 's/^/| /' conftest.$ac_ext >&5
15808
Guido van Rossum627b2d71993-12-24 10:39:16 +000015809fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015810rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015811
Guido van Rossum627b2d71993-12-24 10:39:16 +000015812fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015813done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015814
Jack Jansen150753c2003-03-29 22:07:47 +000015815
15816for ac_func in setpgrp
15817do
15818as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15819echo "$as_me:$LINENO: checking for $ac_func" >&5
15820echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15821if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015823else
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015825/* confdefs.h. */
15826_ACEOF
15827cat confdefs.h >>conftest.$ac_ext
15828cat >>conftest.$ac_ext <<_ACEOF
15829/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015830/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15831 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15832#define $ac_func innocuous_$ac_func
15833
Jack Jansen150753c2003-03-29 22:07:47 +000015834/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015835 which can conflict with char $ac_func (); below.
15836 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015837 <limits.h> exists even on freestanding compilers. */
15838
15839#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015840# include <limits.h>
15841#else
15842# include <assert.h>
15843#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015844
15845#undef $ac_func
15846
Jack Jansen150753c2003-03-29 22:07:47 +000015847/* Override any gcc2 internal prototype to avoid an error. */
15848#ifdef __cplusplus
15849extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015850{
Martin v. Löwis11437992002-04-12 09:54:03 +000015851#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015852/* We use char because int might match the return type of a gcc2
15853 builtin and then its argument prototype would still apply. */
15854char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015855/* The GNU C library defines this for functions which it implements
15856 to always fail with ENOSYS. Some functions are actually named
15857 something starting with __ and the normal name is an alias. */
15858#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15859choke me
15860#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015861char (*f) () = $ac_func;
15862#endif
15863#ifdef __cplusplus
15864}
Jack Jansen150753c2003-03-29 22:07:47 +000015865#endif
15866
Skip Montanaro6dead952003-09-25 14:50:04 +000015867int
15868main ()
15869{
15870return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 ;
15872 return 0;
15873}
15874_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015875rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015877 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015879 grep -v '^ *+' conftest.er1 >conftest.err
15880 rm -f conftest.er1
15881 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015883 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015884 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15886 (eval $ac_try) 2>&5
15887 ac_status=$?
15888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15889 (exit $ac_status); }; } &&
15890 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15892 (eval $ac_try) 2>&5
15893 ac_status=$?
15894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15895 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015896 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015897else
Jack Jansen150753c2003-03-29 22:07:47 +000015898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015899sed 's/^/| /' conftest.$ac_ext >&5
15900
Jack Jansen150753c2003-03-29 22:07:47 +000015901eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015902fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015903rm -f conftest.err conftest.$ac_objext \
15904 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015905fi
Jack Jansen150753c2003-03-29 22:07:47 +000015906echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15907echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15908if test `eval echo '${'$as_ac_var'}'` = yes; then
15909 cat >>confdefs.h <<_ACEOF
15910#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15911_ACEOF
15912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015913/* confdefs.h. */
15914_ACEOF
15915cat confdefs.h >>conftest.$ac_ext
15916cat >>conftest.$ac_ext <<_ACEOF
15917/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015918#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015919int
15920main ()
15921{
15922setpgrp(0,0);
15923 ;
15924 return 0;
15925}
15926_ACEOF
15927rm -f conftest.$ac_objext
15928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015929 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015931 grep -v '^ *+' conftest.er1 >conftest.err
15932 rm -f conftest.er1
15933 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15935 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015936 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15938 (eval $ac_try) 2>&5
15939 ac_status=$?
15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15941 (exit $ac_status); }; } &&
15942 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000015943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15944 (eval $ac_try) 2>&5
15945 ac_status=$?
15946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15947 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015948
15949cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015950#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015951_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015952
Jack Jansen150753c2003-03-29 22:07:47 +000015953
15954else
15955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015956sed 's/^/| /' conftest.$ac_ext >&5
15957
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015958fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015959rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015960
15961fi
15962done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964
Thomas Wouters3a584202000-08-05 23:28:51 +000015965for ac_func in gettimeofday
15966do
Martin v. Löwis11437992002-04-12 09:54:03 +000015967as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15968echo "$as_me:$LINENO: checking for $ac_func" >&5
15969echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15970if eval "test \"\${$as_ac_var+set}\" = set"; then
15971 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015972else
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015974/* confdefs.h. */
15975_ACEOF
15976cat confdefs.h >>conftest.$ac_ext
15977cat >>conftest.$ac_ext <<_ACEOF
15978/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015979/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15980 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15981#define $ac_func innocuous_$ac_func
15982
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015983/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015984 which can conflict with char $ac_func (); below.
15985 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015986 <limits.h> exists even on freestanding compilers. */
15987
15988#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015989# include <limits.h>
15990#else
15991# include <assert.h>
15992#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015993
15994#undef $ac_func
15995
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015996/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015997#ifdef __cplusplus
15998extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015999{
Martin v. Löwis11437992002-04-12 09:54:03 +000016000#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016002 builtin and then its argument prototype would still apply. */
16003char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016004/* The GNU C library defines this for functions which it implements
16005 to always fail with ENOSYS. Some functions are actually named
16006 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016007#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016008choke me
16009#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016010char (*f) () = $ac_func;
16011#endif
16012#ifdef __cplusplus
16013}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016014#endif
16015
Skip Montanaro6dead952003-09-25 14:50:04 +000016016int
16017main ()
16018{
16019return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 ;
16021 return 0;
16022}
16023_ACEOF
16024rm -f conftest.$ac_objext conftest$ac_exeext
16025if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016026 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016028 grep -v '^ *+' conftest.er1 >conftest.err
16029 rm -f conftest.er1
16030 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16032 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016033 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16035 (eval $ac_try) 2>&5
16036 ac_status=$?
16037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16038 (exit $ac_status); }; } &&
16039 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16041 (eval $ac_try) 2>&5
16042 ac_status=$?
16043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16044 (exit $ac_status); }; }; then
16045 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016046else
Martin v. Löwis11437992002-04-12 09:54:03 +000016047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016048sed 's/^/| /' conftest.$ac_ext >&5
16049
Martin v. Löwis11437992002-04-12 09:54:03 +000016050eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016051fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016052rm -f conftest.err conftest.$ac_objext \
16053 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016055echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16056echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16057if test `eval echo '${'$as_ac_var'}'` = yes; then
16058 cat >>confdefs.h <<_ACEOF
16059#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16060_ACEOF
16061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016062/* confdefs.h. */
16063_ACEOF
16064cat confdefs.h >>conftest.$ac_ext
16065cat >>conftest.$ac_ext <<_ACEOF
16066/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016067#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016068int
16069main ()
16070{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016071gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 ;
16073 return 0;
16074}
16075_ACEOF
16076rm -f conftest.$ac_objext
16077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016078 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016080 grep -v '^ *+' conftest.er1 >conftest.err
16081 rm -f conftest.er1
16082 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16084 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016085 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16087 (eval $ac_try) 2>&5
16088 ac_status=$?
16089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16090 (exit $ac_status); }; } &&
16091 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16093 (eval $ac_try) 2>&5
16094 ac_status=$?
16095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16096 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016097 :
16098else
Martin v. Löwis11437992002-04-12 09:54:03 +000016099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016100sed 's/^/| /' conftest.$ac_ext >&5
16101
Martin v. Löwis11437992002-04-12 09:54:03 +000016102
16103cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016104#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016105_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016106
Martin v. Löwis11437992002-04-12 09:54:03 +000016107
Guido van Rossum627b2d71993-12-24 10:39:16 +000016108fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016109rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016110
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016111fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016112done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016113
Michael W. Hudson54241132001-12-07 15:38:26 +000016114
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016115echo "$as_me:$LINENO: checking for major" >&5
16116echo $ECHO_N "checking for major... $ECHO_C" >&6
16117cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016118/* confdefs.h. */
16119_ACEOF
16120cat confdefs.h >>conftest.$ac_ext
16121cat >>conftest.$ac_ext <<_ACEOF
16122/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016123
Neal Norwitz6eb37f02003-02-23 23:28:15 +000016124#if defined(MAJOR_IN_MKDEV)
16125#include <sys/mkdev.h>
16126#elif defined(MAJOR_IN_SYSMACROS)
16127#include <sys/sysmacros.h>
16128#else
16129#include <sys/types.h>
16130#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016131
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016132int
16133main ()
16134{
16135
16136 makedev(major(0),minor(0));
16137
16138 ;
16139 return 0;
16140}
16141_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000016142rm -f conftest.$ac_objext conftest$ac_exeext
16143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016144 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016146 grep -v '^ *+' conftest.er1 >conftest.err
16147 rm -f conftest.er1
16148 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16150 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016151 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16153 (eval $ac_try) 2>&5
16154 ac_status=$?
16155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16156 (exit $ac_status); }; } &&
16157 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16159 (eval $ac_try) 2>&5
16160 ac_status=$?
16161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16162 (exit $ac_status); }; }; then
16163
16164
16165cat >>confdefs.h <<\_ACEOF
16166#define HAVE_DEVICE_MACROS 1
16167_ACEOF
16168
16169 echo "$as_me:$LINENO: result: yes" >&5
16170echo "${ECHO_T}yes" >&6
16171
16172else
16173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016174sed 's/^/| /' conftest.$ac_ext >&5
16175
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016176
16177 echo "$as_me:$LINENO: result: no" >&5
16178echo "${ECHO_T}no" >&6
16179
16180fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016181rm -f conftest.err conftest.$ac_objext \
16182 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016183
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016184# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000016185# for [no]getaddrinfo in netdb.h.
16186echo "$as_me:$LINENO: checking for getaddrinfo" >&5
16187echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
16188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016189/* confdefs.h. */
16190_ACEOF
16191cat confdefs.h >>conftest.$ac_ext
16192cat >>conftest.$ac_ext <<_ACEOF
16193/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016194
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016195#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016196#include <sys/socket.h>
16197#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016198#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016199
Martin v. Löwis11437992002-04-12 09:54:03 +000016200int
16201main ()
16202{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016203
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016204getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016205
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 ;
16207 return 0;
16208}
16209_ACEOF
16210rm -f conftest.$ac_objext conftest$ac_exeext
16211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016212 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016214 grep -v '^ *+' conftest.er1 >conftest.err
16215 rm -f conftest.er1
16216 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16218 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016219 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16221 (eval $ac_try) 2>&5
16222 ac_status=$?
16223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16224 (exit $ac_status); }; } &&
16225 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16227 (eval $ac_try) 2>&5
16228 ac_status=$?
16229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16230 (exit $ac_status); }; }; then
16231
16232echo "$as_me:$LINENO: result: yes" >&5
16233echo "${ECHO_T}yes" >&6
16234echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
16235echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016236if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 echo "$as_me:$LINENO: result: buggy" >&5
16238echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016239buggygetaddrinfo=yes
16240else
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016242/* confdefs.h. */
16243_ACEOF
16244cat confdefs.h >>conftest.$ac_ext
16245cat >>conftest.$ac_ext <<_ACEOF
16246/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016247
16248#include <sys/types.h>
16249#include <netdb.h>
16250#include <string.h>
16251#include <sys/socket.h>
16252#include <netinet/in.h>
16253
16254main()
16255{
16256 int passive, gaierr, inet4 = 0, inet6 = 0;
16257 struct addrinfo hints, *ai, *aitop;
16258 char straddr[INET6_ADDRSTRLEN], strport[16];
16259
16260 for (passive = 0; passive <= 1; passive++) {
16261 memset(&hints, 0, sizeof(hints));
16262 hints.ai_family = AF_UNSPEC;
16263 hints.ai_flags = passive ? AI_PASSIVE : 0;
16264 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000016265 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016266 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
16267 (void)gai_strerror(gaierr);
16268 goto bad;
16269 }
16270 for (ai = aitop; ai; ai = ai->ai_next) {
16271 if (ai->ai_addr == NULL ||
16272 ai->ai_addrlen == 0 ||
16273 getnameinfo(ai->ai_addr, ai->ai_addrlen,
16274 straddr, sizeof(straddr), strport, sizeof(strport),
16275 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
16276 goto bad;
16277 }
16278 switch (ai->ai_family) {
16279 case AF_INET:
16280 if (strcmp(strport, "54321") != 0) {
16281 goto bad;
16282 }
16283 if (passive) {
16284 if (strcmp(straddr, "0.0.0.0") != 0) {
16285 goto bad;
16286 }
16287 } else {
16288 if (strcmp(straddr, "127.0.0.1") != 0) {
16289 goto bad;
16290 }
16291 }
16292 inet4++;
16293 break;
16294 case AF_INET6:
16295 if (strcmp(strport, "54321") != 0) {
16296 goto bad;
16297 }
16298 if (passive) {
16299 if (strcmp(straddr, "::") != 0) {
16300 goto bad;
16301 }
16302 } else {
16303 if (strcmp(straddr, "::1") != 0) {
16304 goto bad;
16305 }
16306 }
16307 inet6++;
16308 break;
16309 case AF_UNSPEC:
16310 goto bad;
16311 break;
16312 default:
16313 /* another family support? */
16314 break;
16315 }
16316 }
16317 }
16318
16319 if (!(inet4 == 0 || inet4 == 2))
16320 goto bad;
16321 if (!(inet6 == 0 || inet6 == 2))
16322 goto bad;
16323
16324 if (aitop)
16325 freeaddrinfo(aitop);
16326 exit(0);
16327
16328 bad:
16329 if (aitop)
16330 freeaddrinfo(aitop);
16331 exit(1);
16332}
16333
Martin v. Löwis11437992002-04-12 09:54:03 +000016334_ACEOF
16335rm -f conftest$ac_exeext
16336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16337 (eval $ac_link) 2>&5
16338 ac_status=$?
16339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16340 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16342 (eval $ac_try) 2>&5
16343 ac_status=$?
16344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16345 (exit $ac_status); }; }; then
16346 echo "$as_me:$LINENO: result: good" >&5
16347echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016348buggygetaddrinfo=no
16349else
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 echo "$as_me: program exited with status $ac_status" >&5
16351echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016352sed 's/^/| /' conftest.$ac_ext >&5
16353
Martin v. Löwis11437992002-04-12 09:54:03 +000016354( exit $ac_status )
16355echo "$as_me:$LINENO: result: buggy" >&5
16356echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016357buggygetaddrinfo=yes
16358fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016359rm -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 +000016360fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016361else
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016363sed 's/^/| /' conftest.$ac_ext >&5
16364
Martin v. Löwis11437992002-04-12 09:54:03 +000016365
16366echo "$as_me:$LINENO: result: no" >&5
16367echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016368buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016369
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016370fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016371rm -f conftest.err conftest.$ac_objext \
16372 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016373
16374if test "$buggygetaddrinfo" = "yes"; then
16375 if test "$ipv6" = "yes"; then
16376 echo 'Fatal: You must get working getaddrinfo() function.'
16377 echo ' or you can specify "--disable-ipv6"'.
16378 exit 1
16379 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016380else
Martin v. Löwis11437992002-04-12 09:54:03 +000016381
16382cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016383#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016384_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016385
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016387
Jack Jansen9a66b6d2001-08-08 13:56:14 +000016388for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016389do
Martin v. Löwis11437992002-04-12 09:54:03 +000016390as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16391echo "$as_me:$LINENO: checking for $ac_func" >&5
16392echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16393if eval "test \"\${$as_ac_var+set}\" = set"; then
16394 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016395else
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016397/* confdefs.h. */
16398_ACEOF
16399cat confdefs.h >>conftest.$ac_ext
16400cat >>conftest.$ac_ext <<_ACEOF
16401/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016402/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16403 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16404#define $ac_func innocuous_$ac_func
16405
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016406/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016407 which can conflict with char $ac_func (); below.
16408 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016409 <limits.h> exists even on freestanding compilers. */
16410
16411#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016412# include <limits.h>
16413#else
16414# include <assert.h>
16415#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016416
16417#undef $ac_func
16418
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016419/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016420#ifdef __cplusplus
16421extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016422{
Martin v. Löwis11437992002-04-12 09:54:03 +000016423#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016424/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016425 builtin and then its argument prototype would still apply. */
16426char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016427/* The GNU C library defines this for functions which it implements
16428 to always fail with ENOSYS. Some functions are actually named
16429 something starting with __ and the normal name is an alias. */
16430#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16431choke me
16432#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016433char (*f) () = $ac_func;
16434#endif
16435#ifdef __cplusplus
16436}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016437#endif
16438
Skip Montanaro6dead952003-09-25 14:50:04 +000016439int
16440main ()
16441{
16442return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016443 ;
16444 return 0;
16445}
16446_ACEOF
16447rm -f conftest.$ac_objext conftest$ac_exeext
16448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016449 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016451 grep -v '^ *+' conftest.er1 >conftest.err
16452 rm -f conftest.er1
16453 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16455 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016456 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16458 (eval $ac_try) 2>&5
16459 ac_status=$?
16460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16461 (exit $ac_status); }; } &&
16462 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16464 (eval $ac_try) 2>&5
16465 ac_status=$?
16466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16467 (exit $ac_status); }; }; then
16468 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016469else
Martin v. Löwis11437992002-04-12 09:54:03 +000016470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016471sed 's/^/| /' conftest.$ac_ext >&5
16472
Martin v. Löwis11437992002-04-12 09:54:03 +000016473eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016474fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016475rm -f conftest.err conftest.$ac_objext \
16476 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016478echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16479echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16480if test `eval echo '${'$as_ac_var'}'` = yes; then
16481 cat >>confdefs.h <<_ACEOF
16482#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16483_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016484
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016485fi
16486done
16487
Michael W. Hudson54241132001-12-07 15:38:26 +000016488
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016489# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000016490echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
16491echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16492if test "${ac_cv_header_time+set}" = set; then
16493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016494else
Martin v. Löwis11437992002-04-12 09:54:03 +000016495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016496/* confdefs.h. */
16497_ACEOF
16498cat confdefs.h >>conftest.$ac_ext
16499cat >>conftest.$ac_ext <<_ACEOF
16500/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016501#include <sys/types.h>
16502#include <sys/time.h>
16503#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016504
Martin v. Löwis11437992002-04-12 09:54:03 +000016505int
16506main ()
16507{
16508if ((struct tm *) 0)
16509return 0;
16510 ;
16511 return 0;
16512}
16513_ACEOF
16514rm -f conftest.$ac_objext
16515if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016516 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016518 grep -v '^ *+' conftest.er1 >conftest.err
16519 rm -f conftest.er1
16520 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16522 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016523 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16525 (eval $ac_try) 2>&5
16526 ac_status=$?
16527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16528 (exit $ac_status); }; } &&
16529 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16531 (eval $ac_try) 2>&5
16532 ac_status=$?
16533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16534 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016535 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016536else
Martin v. Löwis11437992002-04-12 09:54:03 +000016537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016538sed 's/^/| /' conftest.$ac_ext >&5
16539
Martin v. Löwis11437992002-04-12 09:54:03 +000016540ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016541fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016542rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016543fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016544echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
16545echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016546if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016547
16548cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016549#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016550_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016551
16552fi
16553
Martin v. Löwis11437992002-04-12 09:54:03 +000016554echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
16555echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
16556if test "${ac_cv_struct_tm+set}" = set; then
16557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016558else
Martin v. Löwis11437992002-04-12 09:54:03 +000016559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016560/* confdefs.h. */
16561_ACEOF
16562cat confdefs.h >>conftest.$ac_ext
16563cat >>conftest.$ac_ext <<_ACEOF
16564/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016565#include <sys/types.h>
16566#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016567
Martin v. Löwis11437992002-04-12 09:54:03 +000016568int
16569main ()
16570{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016571struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000016572 ;
16573 return 0;
16574}
16575_ACEOF
16576rm -f conftest.$ac_objext
16577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016578 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016580 grep -v '^ *+' conftest.er1 >conftest.err
16581 rm -f conftest.er1
16582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16584 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016585 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16587 (eval $ac_try) 2>&5
16588 ac_status=$?
16589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16590 (exit $ac_status); }; } &&
16591 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16593 (eval $ac_try) 2>&5
16594 ac_status=$?
16595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16596 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016597 ac_cv_struct_tm=time.h
16598else
Martin v. Löwis11437992002-04-12 09:54:03 +000016599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016600sed 's/^/| /' conftest.$ac_ext >&5
16601
Martin v. Löwis11437992002-04-12 09:54:03 +000016602ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016603fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016604rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016606echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16607echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016608if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016609
16610cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016611#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016612_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016613
16614fi
16615
Martin v. Löwis11437992002-04-12 09:54:03 +000016616echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16617echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16618if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16619 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016620else
Martin v. Löwis11437992002-04-12 09:54:03 +000016621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016622/* confdefs.h. */
16623_ACEOF
16624cat confdefs.h >>conftest.$ac_ext
16625cat >>conftest.$ac_ext <<_ACEOF
16626/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016627#include <sys/types.h>
16628#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016629
16630
Martin v. Löwis11437992002-04-12 09:54:03 +000016631int
16632main ()
16633{
16634static struct tm ac_aggr;
16635if (ac_aggr.tm_zone)
16636return 0;
16637 ;
16638 return 0;
16639}
16640_ACEOF
16641rm -f conftest.$ac_objext
16642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016643 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016645 grep -v '^ *+' conftest.er1 >conftest.err
16646 rm -f conftest.er1
16647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16649 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016650 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16652 (eval $ac_try) 2>&5
16653 ac_status=$?
16654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16655 (exit $ac_status); }; } &&
16656 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16658 (eval $ac_try) 2>&5
16659 ac_status=$?
16660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16661 (exit $ac_status); }; }; then
16662 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016663else
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016665sed 's/^/| /' conftest.$ac_ext >&5
16666
16667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016668/* confdefs.h. */
16669_ACEOF
16670cat confdefs.h >>conftest.$ac_ext
16671cat >>conftest.$ac_ext <<_ACEOF
16672/* end confdefs.h. */
16673#include <sys/types.h>
16674#include <$ac_cv_struct_tm>
16675
16676
16677int
16678main ()
16679{
16680static struct tm ac_aggr;
16681if (sizeof ac_aggr.tm_zone)
16682return 0;
16683 ;
16684 return 0;
16685}
16686_ACEOF
16687rm -f conftest.$ac_objext
16688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016689 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016691 grep -v '^ *+' conftest.er1 >conftest.err
16692 rm -f conftest.er1
16693 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16695 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016696 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16698 (eval $ac_try) 2>&5
16699 ac_status=$?
16700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16701 (exit $ac_status); }; } &&
16702 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016703 { (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); }; }; then
16708 ac_cv_member_struct_tm_tm_zone=yes
16709else
16710 echo "$as_me: failed program was:" >&5
16711sed 's/^/| /' conftest.$ac_ext >&5
16712
Martin v. Löwis11437992002-04-12 09:54:03 +000016713ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016714fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016715rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016716fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016717rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016719echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16720echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16721if test $ac_cv_member_struct_tm_tm_zone = yes; then
16722
16723cat >>confdefs.h <<_ACEOF
16724#define HAVE_STRUCT_TM_TM_ZONE 1
16725_ACEOF
16726
16727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016728fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016729
Martin v. Löwis11437992002-04-12 09:54:03 +000016730if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16731
16732cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016733#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016734_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016735
16736else
Martin v. Löwis11437992002-04-12 09:54:03 +000016737 echo "$as_me:$LINENO: checking for tzname" >&5
16738echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16739if test "${ac_cv_var_tzname+set}" = set; then
16740 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016741else
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016743/* confdefs.h. */
16744_ACEOF
16745cat confdefs.h >>conftest.$ac_ext
16746cat >>conftest.$ac_ext <<_ACEOF
16747/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016748#include <time.h>
16749#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016750extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016752
Martin v. Löwis11437992002-04-12 09:54:03 +000016753int
16754main ()
16755{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016756atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016757 ;
16758 return 0;
16759}
16760_ACEOF
16761rm -f conftest.$ac_objext conftest$ac_exeext
16762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016763 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016765 grep -v '^ *+' conftest.er1 >conftest.err
16766 rm -f conftest.er1
16767 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16769 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016770 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16772 (eval $ac_try) 2>&5
16773 ac_status=$?
16774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16775 (exit $ac_status); }; } &&
16776 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16778 (eval $ac_try) 2>&5
16779 ac_status=$?
16780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16781 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016782 ac_cv_var_tzname=yes
16783else
Martin v. Löwis11437992002-04-12 09:54:03 +000016784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016785sed 's/^/| /' conftest.$ac_ext >&5
16786
Martin v. Löwis11437992002-04-12 09:54:03 +000016787ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016788fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016789rm -f conftest.err conftest.$ac_objext \
16790 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016792echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16793echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016794 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016795
16796cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016797#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016798_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016799
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016800 fi
16801fi
16802
Martin v. Löwis11437992002-04-12 09:54:03 +000016803echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16804echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16805if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16806 echo $ECHO_N "(cached) $ECHO_C" >&6
16807else
16808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016809/* confdefs.h. */
16810_ACEOF
16811cat confdefs.h >>conftest.$ac_ext
16812cat >>conftest.$ac_ext <<_ACEOF
16813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016814$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016815int
16816main ()
16817{
16818static struct stat ac_aggr;
16819if (ac_aggr.st_rdev)
16820return 0;
16821 ;
16822 return 0;
16823}
16824_ACEOF
16825rm -f conftest.$ac_objext
16826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016827 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016829 grep -v '^ *+' conftest.er1 >conftest.err
16830 rm -f conftest.er1
16831 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16833 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016834 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16836 (eval $ac_try) 2>&5
16837 ac_status=$?
16838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16839 (exit $ac_status); }; } &&
16840 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16842 (eval $ac_try) 2>&5
16843 ac_status=$?
16844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16845 (exit $ac_status); }; }; then
16846 ac_cv_member_struct_stat_st_rdev=yes
16847else
16848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016849sed 's/^/| /' conftest.$ac_ext >&5
16850
16851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016852/* confdefs.h. */
16853_ACEOF
16854cat confdefs.h >>conftest.$ac_ext
16855cat >>conftest.$ac_ext <<_ACEOF
16856/* end confdefs.h. */
16857$ac_includes_default
16858int
16859main ()
16860{
16861static struct stat ac_aggr;
16862if (sizeof ac_aggr.st_rdev)
16863return 0;
16864 ;
16865 return 0;
16866}
16867_ACEOF
16868rm -f conftest.$ac_objext
16869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016870 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016872 grep -v '^ *+' conftest.er1 >conftest.err
16873 rm -f conftest.er1
16874 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16876 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016877 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16879 (eval $ac_try) 2>&5
16880 ac_status=$?
16881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16882 (exit $ac_status); }; } &&
16883 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16885 (eval $ac_try) 2>&5
16886 ac_status=$?
16887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16888 (exit $ac_status); }; }; then
16889 ac_cv_member_struct_stat_st_rdev=yes
16890else
16891 echo "$as_me: failed program was:" >&5
16892sed 's/^/| /' conftest.$ac_ext >&5
16893
Martin v. Löwis11437992002-04-12 09:54:03 +000016894ac_cv_member_struct_stat_st_rdev=no
16895fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016896rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016897fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016899fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016900echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16901echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16902if test $ac_cv_member_struct_stat_st_rdev = yes; then
16903
16904cat >>confdefs.h <<_ACEOF
16905#define HAVE_STRUCT_STAT_ST_RDEV 1
16906_ACEOF
16907
16908
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016909fi
16910
Martin v. Löwis11437992002-04-12 09:54:03 +000016911echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16912echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16913if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016915else
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016917/* confdefs.h. */
16918_ACEOF
16919cat confdefs.h >>conftest.$ac_ext
16920cat >>conftest.$ac_ext <<_ACEOF
16921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016922$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016923int
16924main ()
16925{
16926static struct stat ac_aggr;
16927if (ac_aggr.st_blksize)
16928return 0;
16929 ;
16930 return 0;
16931}
16932_ACEOF
16933rm -f conftest.$ac_objext
16934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016935 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016937 grep -v '^ *+' conftest.er1 >conftest.err
16938 rm -f conftest.er1
16939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16941 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016942 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16944 (eval $ac_try) 2>&5
16945 ac_status=$?
16946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16947 (exit $ac_status); }; } &&
16948 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16950 (eval $ac_try) 2>&5
16951 ac_status=$?
16952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16953 (exit $ac_status); }; }; then
16954 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016955else
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016957sed 's/^/| /' conftest.$ac_ext >&5
16958
16959cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016960/* confdefs.h. */
16961_ACEOF
16962cat confdefs.h >>conftest.$ac_ext
16963cat >>conftest.$ac_ext <<_ACEOF
16964/* end confdefs.h. */
16965$ac_includes_default
16966int
16967main ()
16968{
16969static struct stat ac_aggr;
16970if (sizeof ac_aggr.st_blksize)
16971return 0;
16972 ;
16973 return 0;
16974}
16975_ACEOF
16976rm -f conftest.$ac_objext
16977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016978 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016980 grep -v '^ *+' conftest.er1 >conftest.err
16981 rm -f conftest.er1
16982 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16984 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016985 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16987 (eval $ac_try) 2>&5
16988 ac_status=$?
16989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16990 (exit $ac_status); }; } &&
16991 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16993 (eval $ac_try) 2>&5
16994 ac_status=$?
16995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16996 (exit $ac_status); }; }; then
16997 ac_cv_member_struct_stat_st_blksize=yes
16998else
16999 echo "$as_me: failed program was:" >&5
17000sed 's/^/| /' conftest.$ac_ext >&5
17001
Martin v. Löwis11437992002-04-12 09:54:03 +000017002ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017003fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017004rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017005fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017006rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017008echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
17009echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
17010if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017011
Martin v. Löwis11437992002-04-12 09:54:03 +000017012cat >>confdefs.h <<_ACEOF
17013#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
17014_ACEOF
17015
17016
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017017fi
17018
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017019echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
17020echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
17021if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
17022 echo $ECHO_N "(cached) $ECHO_C" >&6
17023else
17024 cat >conftest.$ac_ext <<_ACEOF
17025/* confdefs.h. */
17026_ACEOF
17027cat confdefs.h >>conftest.$ac_ext
17028cat >>conftest.$ac_ext <<_ACEOF
17029/* end confdefs.h. */
17030$ac_includes_default
17031int
17032main ()
17033{
17034static struct stat ac_aggr;
17035if (ac_aggr.st_flags)
17036return 0;
17037 ;
17038 return 0;
17039}
17040_ACEOF
17041rm -f conftest.$ac_objext
17042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17043 (eval $ac_compile) 2>conftest.er1
17044 ac_status=$?
17045 grep -v '^ *+' conftest.er1 >conftest.err
17046 rm -f conftest.er1
17047 cat conftest.err >&5
17048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17049 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017050 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17052 (eval $ac_try) 2>&5
17053 ac_status=$?
17054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17055 (exit $ac_status); }; } &&
17056 { ac_try='test -s conftest.$ac_objext'
17057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17058 (eval $ac_try) 2>&5
17059 ac_status=$?
17060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17061 (exit $ac_status); }; }; then
17062 ac_cv_member_struct_stat_st_flags=yes
17063else
17064 echo "$as_me: failed program was:" >&5
17065sed 's/^/| /' conftest.$ac_ext >&5
17066
17067cat >conftest.$ac_ext <<_ACEOF
17068/* confdefs.h. */
17069_ACEOF
17070cat confdefs.h >>conftest.$ac_ext
17071cat >>conftest.$ac_ext <<_ACEOF
17072/* end confdefs.h. */
17073$ac_includes_default
17074int
17075main ()
17076{
17077static struct stat ac_aggr;
17078if (sizeof ac_aggr.st_flags)
17079return 0;
17080 ;
17081 return 0;
17082}
17083_ACEOF
17084rm -f conftest.$ac_objext
17085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17086 (eval $ac_compile) 2>conftest.er1
17087 ac_status=$?
17088 grep -v '^ *+' conftest.er1 >conftest.err
17089 rm -f conftest.er1
17090 cat conftest.err >&5
17091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17092 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017093 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17095 (eval $ac_try) 2>&5
17096 ac_status=$?
17097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17098 (exit $ac_status); }; } &&
17099 { ac_try='test -s conftest.$ac_objext'
17100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17101 (eval $ac_try) 2>&5
17102 ac_status=$?
17103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17104 (exit $ac_status); }; }; then
17105 ac_cv_member_struct_stat_st_flags=yes
17106else
17107 echo "$as_me: failed program was:" >&5
17108sed 's/^/| /' conftest.$ac_ext >&5
17109
17110ac_cv_member_struct_stat_st_flags=no
17111fi
17112rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17113fi
17114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17115fi
17116echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
17117echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
17118if test $ac_cv_member_struct_stat_st_flags = yes; then
17119
17120cat >>confdefs.h <<_ACEOF
17121#define HAVE_STRUCT_STAT_ST_FLAGS 1
17122_ACEOF
17123
17124
17125fi
17126
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017127echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
17128echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
17129if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
17130 echo $ECHO_N "(cached) $ECHO_C" >&6
17131else
17132 cat >conftest.$ac_ext <<_ACEOF
17133/* confdefs.h. */
17134_ACEOF
17135cat confdefs.h >>conftest.$ac_ext
17136cat >>conftest.$ac_ext <<_ACEOF
17137/* end confdefs.h. */
17138$ac_includes_default
17139int
17140main ()
17141{
17142static struct stat ac_aggr;
17143if (ac_aggr.st_gen)
17144return 0;
17145 ;
17146 return 0;
17147}
17148_ACEOF
17149rm -f conftest.$ac_objext
17150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17151 (eval $ac_compile) 2>conftest.er1
17152 ac_status=$?
17153 grep -v '^ *+' conftest.er1 >conftest.err
17154 rm -f conftest.er1
17155 cat conftest.err >&5
17156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17157 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017158 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17160 (eval $ac_try) 2>&5
17161 ac_status=$?
17162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17163 (exit $ac_status); }; } &&
17164 { ac_try='test -s conftest.$ac_objext'
17165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17166 (eval $ac_try) 2>&5
17167 ac_status=$?
17168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17169 (exit $ac_status); }; }; then
17170 ac_cv_member_struct_stat_st_gen=yes
17171else
17172 echo "$as_me: failed program was:" >&5
17173sed 's/^/| /' conftest.$ac_ext >&5
17174
17175cat >conftest.$ac_ext <<_ACEOF
17176/* confdefs.h. */
17177_ACEOF
17178cat confdefs.h >>conftest.$ac_ext
17179cat >>conftest.$ac_ext <<_ACEOF
17180/* end confdefs.h. */
17181$ac_includes_default
17182int
17183main ()
17184{
17185static struct stat ac_aggr;
17186if (sizeof ac_aggr.st_gen)
17187return 0;
17188 ;
17189 return 0;
17190}
17191_ACEOF
17192rm -f conftest.$ac_objext
17193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17194 (eval $ac_compile) 2>conftest.er1
17195 ac_status=$?
17196 grep -v '^ *+' conftest.er1 >conftest.err
17197 rm -f conftest.er1
17198 cat conftest.err >&5
17199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17200 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017201 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17203 (eval $ac_try) 2>&5
17204 ac_status=$?
17205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17206 (exit $ac_status); }; } &&
17207 { ac_try='test -s conftest.$ac_objext'
17208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17209 (eval $ac_try) 2>&5
17210 ac_status=$?
17211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17212 (exit $ac_status); }; }; then
17213 ac_cv_member_struct_stat_st_gen=yes
17214else
17215 echo "$as_me: failed program was:" >&5
17216sed 's/^/| /' conftest.$ac_ext >&5
17217
17218ac_cv_member_struct_stat_st_gen=no
17219fi
17220rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17221fi
17222rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17223fi
17224echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
17225echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
17226if test $ac_cv_member_struct_stat_st_gen = yes; then
17227
17228cat >>confdefs.h <<_ACEOF
17229#define HAVE_STRUCT_STAT_ST_GEN 1
17230_ACEOF
17231
17232
17233fi
17234
17235echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
17236echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
17237if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
17238 echo $ECHO_N "(cached) $ECHO_C" >&6
17239else
17240 cat >conftest.$ac_ext <<_ACEOF
17241/* confdefs.h. */
17242_ACEOF
17243cat confdefs.h >>conftest.$ac_ext
17244cat >>conftest.$ac_ext <<_ACEOF
17245/* end confdefs.h. */
17246$ac_includes_default
17247int
17248main ()
17249{
17250static struct stat ac_aggr;
17251if (ac_aggr.st_birthtime)
17252return 0;
17253 ;
17254 return 0;
17255}
17256_ACEOF
17257rm -f conftest.$ac_objext
17258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17259 (eval $ac_compile) 2>conftest.er1
17260 ac_status=$?
17261 grep -v '^ *+' conftest.er1 >conftest.err
17262 rm -f conftest.er1
17263 cat conftest.err >&5
17264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017266 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17268 (eval $ac_try) 2>&5
17269 ac_status=$?
17270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17271 (exit $ac_status); }; } &&
17272 { ac_try='test -s conftest.$ac_objext'
17273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17274 (eval $ac_try) 2>&5
17275 ac_status=$?
17276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17277 (exit $ac_status); }; }; then
17278 ac_cv_member_struct_stat_st_birthtime=yes
17279else
17280 echo "$as_me: failed program was:" >&5
17281sed 's/^/| /' conftest.$ac_ext >&5
17282
17283cat >conftest.$ac_ext <<_ACEOF
17284/* confdefs.h. */
17285_ACEOF
17286cat confdefs.h >>conftest.$ac_ext
17287cat >>conftest.$ac_ext <<_ACEOF
17288/* end confdefs.h. */
17289$ac_includes_default
17290int
17291main ()
17292{
17293static struct stat ac_aggr;
17294if (sizeof ac_aggr.st_birthtime)
17295return 0;
17296 ;
17297 return 0;
17298}
17299_ACEOF
17300rm -f conftest.$ac_objext
17301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17302 (eval $ac_compile) 2>conftest.er1
17303 ac_status=$?
17304 grep -v '^ *+' conftest.er1 >conftest.err
17305 rm -f conftest.er1
17306 cat conftest.err >&5
17307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17308 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017309 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17311 (eval $ac_try) 2>&5
17312 ac_status=$?
17313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17314 (exit $ac_status); }; } &&
17315 { ac_try='test -s conftest.$ac_objext'
17316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17317 (eval $ac_try) 2>&5
17318 ac_status=$?
17319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17320 (exit $ac_status); }; }; then
17321 ac_cv_member_struct_stat_st_birthtime=yes
17322else
17323 echo "$as_me: failed program was:" >&5
17324sed 's/^/| /' conftest.$ac_ext >&5
17325
17326ac_cv_member_struct_stat_st_birthtime=no
17327fi
17328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17329fi
17330rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17331fi
17332echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
17333echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
17334if test $ac_cv_member_struct_stat_st_birthtime = yes; then
17335
17336cat >>confdefs.h <<_ACEOF
17337#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
17338_ACEOF
17339
17340
17341fi
17342
Martin v. Löwis11437992002-04-12 09:54:03 +000017343echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
17344echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
17345if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
17346 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017347else
Martin v. Löwis11437992002-04-12 09:54:03 +000017348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017349/* confdefs.h. */
17350_ACEOF
17351cat confdefs.h >>conftest.$ac_ext
17352cat >>conftest.$ac_ext <<_ACEOF
17353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017354$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017355int
17356main ()
17357{
17358static struct stat ac_aggr;
17359if (ac_aggr.st_blocks)
17360return 0;
17361 ;
17362 return 0;
17363}
17364_ACEOF
17365rm -f conftest.$ac_objext
17366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017367 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017369 grep -v '^ *+' conftest.er1 >conftest.err
17370 rm -f conftest.er1
17371 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17373 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017374 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17376 (eval $ac_try) 2>&5
17377 ac_status=$?
17378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17379 (exit $ac_status); }; } &&
17380 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17382 (eval $ac_try) 2>&5
17383 ac_status=$?
17384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17385 (exit $ac_status); }; }; then
17386 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017387else
Martin v. Löwis11437992002-04-12 09:54:03 +000017388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017389sed 's/^/| /' conftest.$ac_ext >&5
17390
17391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017392/* confdefs.h. */
17393_ACEOF
17394cat confdefs.h >>conftest.$ac_ext
17395cat >>conftest.$ac_ext <<_ACEOF
17396/* end confdefs.h. */
17397$ac_includes_default
17398int
17399main ()
17400{
17401static struct stat ac_aggr;
17402if (sizeof ac_aggr.st_blocks)
17403return 0;
17404 ;
17405 return 0;
17406}
17407_ACEOF
17408rm -f conftest.$ac_objext
17409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017410 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017412 grep -v '^ *+' conftest.er1 >conftest.err
17413 rm -f conftest.er1
17414 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17416 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17419 (eval $ac_try) 2>&5
17420 ac_status=$?
17421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422 (exit $ac_status); }; } &&
17423 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17425 (eval $ac_try) 2>&5
17426 ac_status=$?
17427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17428 (exit $ac_status); }; }; then
17429 ac_cv_member_struct_stat_st_blocks=yes
17430else
17431 echo "$as_me: failed program was:" >&5
17432sed 's/^/| /' conftest.$ac_ext >&5
17433
Martin v. Löwis11437992002-04-12 09:54:03 +000017434ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017435fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017436rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017437fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017438rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017440echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
17441echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
17442if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017443
Martin v. Löwis11437992002-04-12 09:54:03 +000017444cat >>confdefs.h <<_ACEOF
17445#define HAVE_STRUCT_STAT_ST_BLOCKS 1
17446_ACEOF
17447
17448
17449cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017450#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017451_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017452
17453else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017454 case $LIBOBJS in
17455 "fileblocks.$ac_objext" | \
17456 *" fileblocks.$ac_objext" | \
17457 "fileblocks.$ac_objext "* | \
17458 *" fileblocks.$ac_objext "* ) ;;
17459 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
17460esac
17461
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017462fi
17463
Michael W. Hudson54241132001-12-07 15:38:26 +000017464
Martin v. Löwis11437992002-04-12 09:54:03 +000017465
17466echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
17467echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
17468if test "${ac_cv_header_time_altzone+set}" = set; then
17469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017470else
Martin v. Löwis11437992002-04-12 09:54:03 +000017471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017472/* confdefs.h. */
17473_ACEOF
17474cat confdefs.h >>conftest.$ac_ext
17475cat >>conftest.$ac_ext <<_ACEOF
17476/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017477#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017478int
17479main ()
17480{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017481return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 ;
17483 return 0;
17484}
17485_ACEOF
17486rm -f conftest.$ac_objext
17487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017488 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017490 grep -v '^ *+' conftest.er1 >conftest.err
17491 rm -f conftest.er1
17492 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17494 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017495 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17497 (eval $ac_try) 2>&5
17498 ac_status=$?
17499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17500 (exit $ac_status); }; } &&
17501 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17503 (eval $ac_try) 2>&5
17504 ac_status=$?
17505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17506 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017507 ac_cv_header_time_altzone=yes
17508else
Martin v. Löwis11437992002-04-12 09:54:03 +000017509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017510sed 's/^/| /' conftest.$ac_ext >&5
17511
Martin v. Löwis11437992002-04-12 09:54:03 +000017512ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000017513fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017515fi
17516
Martin v. Löwis11437992002-04-12 09:54:03 +000017517echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
17518echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017519if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017520
17521cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017522#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017524
17525fi
17526
Guido van Rossumda88dad1995-01-26 00:46:29 +000017527was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017528echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
17529echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
17530cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017531/* confdefs.h. */
17532_ACEOF
17533cat confdefs.h >>conftest.$ac_ext
17534cat >>conftest.$ac_ext <<_ACEOF
17535/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017536
17537#include <sys/types.h>
17538#include <sys/select.h>
17539#include <sys/time.h>
17540
Martin v. Löwis11437992002-04-12 09:54:03 +000017541int
17542main ()
17543{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017544;
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 ;
17546 return 0;
17547}
17548_ACEOF
17549rm -f conftest.$ac_objext
17550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017551 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017553 grep -v '^ *+' conftest.er1 >conftest.err
17554 rm -f conftest.er1
17555 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17557 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017558 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17560 (eval $ac_try) 2>&5
17561 ac_status=$?
17562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17563 (exit $ac_status); }; } &&
17564 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17566 (eval $ac_try) 2>&5
17567 ac_status=$?
17568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17569 (exit $ac_status); }; }; then
17570
17571
17572cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017573#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017574_ACEOF
17575
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017576 was_it_defined=yes
17577
Guido van Rossumf78abae1997-01-21 22:02:36 +000017578else
Martin v. Löwis11437992002-04-12 09:54:03 +000017579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017580sed 's/^/| /' conftest.$ac_ext >&5
17581
Guido van Rossum7f43da71994-08-01 12:15:30 +000017582fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017584echo "$as_me:$LINENO: result: $was_it_defined" >&5
17585echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000017586
Martin v. Löwis11437992002-04-12 09:54:03 +000017587echo "$as_me:$LINENO: checking for addrinfo" >&5
17588echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
17589if test "${ac_cv_struct_addrinfo+set}" = set; then
17590 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017591else
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017593/* confdefs.h. */
17594_ACEOF
17595cat confdefs.h >>conftest.$ac_ext
17596cat >>conftest.$ac_ext <<_ACEOF
17597/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017598
17599# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017600int
17601main ()
17602{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017603struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000017604 ;
17605 return 0;
17606}
17607_ACEOF
17608rm -f conftest.$ac_objext
17609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017610 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017612 grep -v '^ *+' conftest.er1 >conftest.err
17613 rm -f conftest.er1
17614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17616 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017617 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17619 (eval $ac_try) 2>&5
17620 ac_status=$?
17621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17622 (exit $ac_status); }; } &&
17623 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17625 (eval $ac_try) 2>&5
17626 ac_status=$?
17627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17628 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017629 ac_cv_struct_addrinfo=yes
17630else
Martin v. Löwis11437992002-04-12 09:54:03 +000017631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017632sed 's/^/| /' conftest.$ac_ext >&5
17633
Martin v. Löwis11437992002-04-12 09:54:03 +000017634ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017635fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017636rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017637fi
17638
Martin v. Löwis11437992002-04-12 09:54:03 +000017639echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
17640echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017641if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017642
17643cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017644#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017645_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017646
17647fi
17648
Martin v. Löwis11437992002-04-12 09:54:03 +000017649echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
17650echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
17651if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
17652 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017653else
Martin v. Löwis11437992002-04-12 09:54:03 +000017654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017655/* confdefs.h. */
17656_ACEOF
17657cat confdefs.h >>conftest.$ac_ext
17658cat >>conftest.$ac_ext <<_ACEOF
17659/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017660
17661# include <sys/types.h>
17662# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017663int
17664main ()
17665{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017666struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 ;
17668 return 0;
17669}
17670_ACEOF
17671rm -f conftest.$ac_objext
17672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017673 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017675 grep -v '^ *+' conftest.er1 >conftest.err
17676 rm -f conftest.er1
17677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17679 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017680 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17682 (eval $ac_try) 2>&5
17683 ac_status=$?
17684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17685 (exit $ac_status); }; } &&
17686 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17688 (eval $ac_try) 2>&5
17689 ac_status=$?
17690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17691 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017692 ac_cv_struct_sockaddr_storage=yes
17693else
Martin v. Löwis11437992002-04-12 09:54:03 +000017694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017695sed 's/^/| /' conftest.$ac_ext >&5
17696
Martin v. Löwis11437992002-04-12 09:54:03 +000017697ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017698fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017700fi
17701
Martin v. Löwis11437992002-04-12 09:54:03 +000017702echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
17703echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017704if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017705
17706cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017707#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017708_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017709
17710fi
17711
Guido van Rossum627b2d71993-12-24 10:39:16 +000017712# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000017713
Michael W. Hudson54241132001-12-07 15:38:26 +000017714
Martin v. Löwis11437992002-04-12 09:54:03 +000017715echo "$as_me:$LINENO: checking whether char is unsigned" >&5
17716echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
17717if test "${ac_cv_c_char_unsigned+set}" = set; then
17718 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000017719else
Martin v. Löwis11437992002-04-12 09:54:03 +000017720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017721/* confdefs.h. */
17722_ACEOF
17723cat confdefs.h >>conftest.$ac_ext
17724cat >>conftest.$ac_ext <<_ACEOF
17725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017726$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017727int
17728main ()
17729{
17730static int test_array [1 - 2 * !(((char) -1) < 0)];
17731test_array [0] = 0
17732
17733 ;
17734 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000017735}
Martin v. Löwis11437992002-04-12 09:54:03 +000017736_ACEOF
17737rm -f conftest.$ac_objext
17738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017739 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017741 grep -v '^ *+' conftest.er1 >conftest.err
17742 rm -f conftest.er1
17743 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17745 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017746 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17748 (eval $ac_try) 2>&5
17749 ac_status=$?
17750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17751 (exit $ac_status); }; } &&
17752 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17754 (eval $ac_try) 2>&5
17755 ac_status=$?
17756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017758 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017759else
17760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017761sed 's/^/| /' conftest.$ac_ext >&5
17762
Martin v. Löwis11437992002-04-12 09:54:03 +000017763ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017764fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017765rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017767echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
17768echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017769if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017770 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017771#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017772_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017773
17774fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000017775
Martin v. Löwis11437992002-04-12 09:54:03 +000017776echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
17777echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17778if test "${ac_cv_c_const+set}" = set; then
17779 echo $ECHO_N "(cached) $ECHO_C" >&6
17780else
17781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017782/* confdefs.h. */
17783_ACEOF
17784cat confdefs.h >>conftest.$ac_ext
17785cat >>conftest.$ac_ext <<_ACEOF
17786/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017787
Martin v. Löwis11437992002-04-12 09:54:03 +000017788int
17789main ()
17790{
17791/* FIXME: Include the comments suggested by Paul. */
17792#ifndef __cplusplus
17793 /* Ultrix mips cc rejects this. */
17794 typedef int charset[2];
17795 const charset x;
17796 /* SunOS 4.1.1 cc rejects this. */
17797 char const *const *ccp;
17798 char **p;
17799 /* NEC SVR4.0.2 mips cc rejects this. */
17800 struct point {int x, y;};
17801 static struct point const zero = {0,0};
17802 /* AIX XL C 1.02.0.0 rejects this.
17803 It does not let you subtract one const X* pointer from another in
17804 an arm of an if-expression whose if-part is not a constant
17805 expression */
17806 const char *g = "string";
17807 ccp = &g + (g ? g-g : 0);
17808 /* HPUX 7.0 cc rejects these. */
17809 ++ccp;
17810 p = (char**) ccp;
17811 ccp = (char const *const *) p;
17812 { /* SCO 3.2v4 cc rejects this. */
17813 char *t;
17814 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017815
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 *t++ = 0;
17817 }
17818 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17819 int x[] = {25, 17};
17820 const int *foo = &x[0];
17821 ++foo;
17822 }
17823 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17824 typedef const int *iptr;
17825 iptr p = 0;
17826 ++p;
17827 }
17828 { /* AIX XL C 1.02.0.0 rejects this saying
17829 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17830 struct s { int j; const int *ap[3]; };
17831 struct s *b; b->j = 5;
17832 }
17833 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17834 const int foo = 10;
17835 }
17836#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000017837
Martin v. Löwis11437992002-04-12 09:54:03 +000017838 ;
17839 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000017840}
Martin v. Löwis11437992002-04-12 09:54:03 +000017841_ACEOF
17842rm -f conftest.$ac_objext
17843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017844 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017846 grep -v '^ *+' conftest.er1 >conftest.err
17847 rm -f conftest.er1
17848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17850 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017851 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17853 (eval $ac_try) 2>&5
17854 ac_status=$?
17855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17856 (exit $ac_status); }; } &&
17857 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17859 (eval $ac_try) 2>&5
17860 ac_status=$?
17861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17862 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017863 ac_cv_c_const=yes
17864else
Martin v. Löwis11437992002-04-12 09:54:03 +000017865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017866sed 's/^/| /' conftest.$ac_ext >&5
17867
Martin v. Löwis11437992002-04-12 09:54:03 +000017868ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017869fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017870rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017872echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
17873echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017874if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017875
17876cat >>confdefs.h <<\_ACEOF
17877#define const
17878_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017879
17880fi
17881
Michael W. Hudson54241132001-12-07 15:38:26 +000017882
Guido van Rossumda88dad1995-01-26 00:46:29 +000017883works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017884echo "$as_me:$LINENO: checking for working volatile" >&5
17885echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
17886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017887/* confdefs.h. */
17888_ACEOF
17889cat confdefs.h >>conftest.$ac_ext
17890cat >>conftest.$ac_ext <<_ACEOF
17891/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017892
Martin v. Löwis11437992002-04-12 09:54:03 +000017893int
17894main ()
17895{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017896volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 ;
17898 return 0;
17899}
17900_ACEOF
17901rm -f conftest.$ac_objext
17902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017903 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017905 grep -v '^ *+' conftest.er1 >conftest.err
17906 rm -f conftest.er1
17907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17909 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017910 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17912 (eval $ac_try) 2>&5
17913 ac_status=$?
17914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17915 (exit $ac_status); }; } &&
17916 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17918 (eval $ac_try) 2>&5
17919 ac_status=$?
17920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17921 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017922 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017923else
Martin v. Löwis11437992002-04-12 09:54:03 +000017924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017925sed 's/^/| /' conftest.$ac_ext >&5
17926
Martin v. Löwis11437992002-04-12 09:54:03 +000017927
17928cat >>confdefs.h <<\_ACEOF
17929#define volatile
17930_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017931
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017932
Guido van Rossum627b2d71993-12-24 10:39:16 +000017933fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017935echo "$as_me:$LINENO: result: $works" >&5
17936echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017937
Guido van Rossumda88dad1995-01-26 00:46:29 +000017938works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017939echo "$as_me:$LINENO: checking for working signed char" >&5
17940echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
17941cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017942/* confdefs.h. */
17943_ACEOF
17944cat confdefs.h >>conftest.$ac_ext
17945cat >>conftest.$ac_ext <<_ACEOF
17946/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017947
Martin v. Löwis11437992002-04-12 09:54:03 +000017948int
17949main ()
17950{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017951signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017952 ;
17953 return 0;
17954}
17955_ACEOF
17956rm -f conftest.$ac_objext
17957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017958 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017960 grep -v '^ *+' conftest.er1 >conftest.err
17961 rm -f conftest.er1
17962 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17964 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017965 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17967 (eval $ac_try) 2>&5
17968 ac_status=$?
17969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17970 (exit $ac_status); }; } &&
17971 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17973 (eval $ac_try) 2>&5
17974 ac_status=$?
17975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17976 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017977 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017978else
Martin v. Löwis11437992002-04-12 09:54:03 +000017979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017980sed 's/^/| /' conftest.$ac_ext >&5
17981
Martin v. Löwis11437992002-04-12 09:54:03 +000017982
17983cat >>confdefs.h <<\_ACEOF
17984#define signed
17985_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017986
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017987
Guido van Rossum7f43da71994-08-01 12:15:30 +000017988fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017989rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017990echo "$as_me:$LINENO: result: $works" >&5
17991echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017992
Guido van Rossumda88dad1995-01-26 00:46:29 +000017993have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017994echo "$as_me:$LINENO: checking for prototypes" >&5
17995echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
17996cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017997/* confdefs.h. */
17998_ACEOF
17999cat confdefs.h >>conftest.$ac_ext
18000cat >>conftest.$ac_ext <<_ACEOF
18001/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018002int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018003int
18004main ()
18005{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018006return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 ;
18008 return 0;
18009}
18010_ACEOF
18011rm -f conftest.$ac_objext
18012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018013 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018015 grep -v '^ *+' conftest.er1 >conftest.err
18016 rm -f conftest.er1
18017 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18019 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018020 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18022 (eval $ac_try) 2>&5
18023 ac_status=$?
18024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18025 (exit $ac_status); }; } &&
18026 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18028 (eval $ac_try) 2>&5
18029 ac_status=$?
18030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18031 (exit $ac_status); }; }; then
18032
18033
18034cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018035#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018036_ACEOF
18037
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018038 have_prototypes=yes
18039
Guido van Rossumf78abae1997-01-21 22:02:36 +000018040else
Martin v. Löwis11437992002-04-12 09:54:03 +000018041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018042sed 's/^/| /' conftest.$ac_ext >&5
18043
Guido van Rossum7f43da71994-08-01 12:15:30 +000018044fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018045rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018046echo "$as_me:$LINENO: result: $have_prototypes" >&5
18047echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018048
Guido van Rossumda88dad1995-01-26 00:46:29 +000018049works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018050echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
18051echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
18052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018053/* confdefs.h. */
18054_ACEOF
18055cat confdefs.h >>conftest.$ac_ext
18056cat >>conftest.$ac_ext <<_ACEOF
18057/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018058
18059#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000018060int foo(int x, ...) {
18061 va_list va;
18062 va_start(va, x);
18063 va_arg(va, int);
18064 va_arg(va, char *);
18065 va_arg(va, double);
18066 return 0;
18067}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018068
Martin v. Löwis11437992002-04-12 09:54:03 +000018069int
18070main ()
18071{
Guido van Rossum90eea071996-08-30 20:58:57 +000018072return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000018073 ;
18074 return 0;
18075}
18076_ACEOF
18077rm -f conftest.$ac_objext
18078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018079 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018081 grep -v '^ *+' conftest.er1 >conftest.err
18082 rm -f conftest.er1
18083 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18085 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018086 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18088 (eval $ac_try) 2>&5
18089 ac_status=$?
18090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18091 (exit $ac_status); }; } &&
18092 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18094 (eval $ac_try) 2>&5
18095 ac_status=$?
18096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18097 (exit $ac_status); }; }; then
18098
18099
18100cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018101#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018102_ACEOF
18103
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018104 works=yes
18105
Guido van Rossumf78abae1997-01-21 22:02:36 +000018106else
Martin v. Löwis11437992002-04-12 09:54:03 +000018107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018108sed 's/^/| /' conftest.$ac_ext >&5
18109
Guido van Rossum627b2d71993-12-24 10:39:16 +000018110fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018111rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018112echo "$as_me:$LINENO: result: $works" >&5
18113echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018114
Martin v. Löwisd6320502004-08-12 13:45:08 +000018115# check for socketpair
18116echo "$as_me:$LINENO: checking for socketpair" >&5
18117echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
18118cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000018119/* confdefs.h. */
18120_ACEOF
18121cat confdefs.h >>conftest.$ac_ext
18122cat >>conftest.$ac_ext <<_ACEOF
18123/* end confdefs.h. */
18124
18125#include <sys/types.h>
18126#include <sys/socket.h>
18127
18128int
18129main ()
18130{
18131void *x=socketpair
18132 ;
18133 return 0;
18134}
18135_ACEOF
18136rm -f conftest.$ac_objext
18137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018138 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000018139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018140 grep -v '^ *+' conftest.er1 >conftest.err
18141 rm -f conftest.er1
18142 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000018143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18144 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018145 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18147 (eval $ac_try) 2>&5
18148 ac_status=$?
18149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18150 (exit $ac_status); }; } &&
18151 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000018152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18153 (eval $ac_try) 2>&5
18154 ac_status=$?
18155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18156 (exit $ac_status); }; }; then
18157
18158cat >>confdefs.h <<\_ACEOF
18159#define HAVE_SOCKETPAIR 1
18160_ACEOF
18161
18162 echo "$as_me:$LINENO: result: yes" >&5
18163echo "${ECHO_T}yes" >&6
18164else
18165 echo "$as_me: failed program was:" >&5
18166sed 's/^/| /' conftest.$ac_ext >&5
18167
18168echo "$as_me:$LINENO: result: no" >&5
18169echo "${ECHO_T}no" >&6
18170
18171fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018172rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000018173
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018174# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000018175echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
18176echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
18177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018178/* confdefs.h. */
18179_ACEOF
18180cat confdefs.h >>conftest.$ac_ext
18181cat >>conftest.$ac_ext <<_ACEOF
18182/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018183#include <sys/types.h>
18184#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018185int
18186main ()
18187{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018188struct sockaddr x;
18189x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 ;
18191 return 0;
18192}
18193_ACEOF
18194rm -f conftest.$ac_objext
18195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018196 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018198 grep -v '^ *+' conftest.er1 >conftest.err
18199 rm -f conftest.er1
18200 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18202 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018203 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18205 (eval $ac_try) 2>&5
18206 ac_status=$?
18207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18208 (exit $ac_status); }; } &&
18209 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18211 (eval $ac_try) 2>&5
18212 ac_status=$?
18213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18214 (exit $ac_status); }; }; then
18215 echo "$as_me:$LINENO: result: yes" >&5
18216echo "${ECHO_T}yes" >&6
18217
18218cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018219#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018220_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018221
18222else
Martin v. Löwis11437992002-04-12 09:54:03 +000018223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018224sed 's/^/| /' conftest.$ac_ext >&5
18225
Martin v. Löwis11437992002-04-12 09:54:03 +000018226echo "$as_me:$LINENO: result: no" >&5
18227echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018228fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018229rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018230
Guido van Rossumda88dad1995-01-26 00:46:29 +000018231va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018232echo "$as_me:$LINENO: checking whether va_list is an array" >&5
18233echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
18234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018235/* confdefs.h. */
18236_ACEOF
18237cat confdefs.h >>conftest.$ac_ext
18238cat >>conftest.$ac_ext <<_ACEOF
18239/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018240
18241#ifdef HAVE_STDARG_PROTOTYPES
18242#include <stdarg.h>
18243#else
18244#include <varargs.h>
18245#endif
18246
Martin v. Löwis11437992002-04-12 09:54:03 +000018247int
18248main ()
18249{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018250va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000018251 ;
18252 return 0;
18253}
18254_ACEOF
18255rm -f conftest.$ac_objext
18256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018257 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018259 grep -v '^ *+' conftest.er1 >conftest.err
18260 rm -f conftest.er1
18261 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18263 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018264 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18266 (eval $ac_try) 2>&5
18267 ac_status=$?
18268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18269 (exit $ac_status); }; } &&
18270 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18272 (eval $ac_try) 2>&5
18273 ac_status=$?
18274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18275 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018276 :
18277else
Martin v. Löwis11437992002-04-12 09:54:03 +000018278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018279sed 's/^/| /' conftest.$ac_ext >&5
18280
Martin v. Löwis11437992002-04-12 09:54:03 +000018281
18282
18283cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018284#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018285_ACEOF
18286
Guido van Rossumda88dad1995-01-26 00:46:29 +000018287 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018289fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018290rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018291echo "$as_me:$LINENO: result: $va_list_is_array" >&5
18292echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018293
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018294# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000018295
18296
18297
18298echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
18299echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
18300if test "${ac_cv_func_gethostbyname_r+set}" = set; then
18301 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018302else
Martin v. Löwis11437992002-04-12 09:54:03 +000018303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018304/* confdefs.h. */
18305_ACEOF
18306cat confdefs.h >>conftest.$ac_ext
18307cat >>conftest.$ac_ext <<_ACEOF
18308/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018309/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
18310 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18311#define gethostbyname_r innocuous_gethostbyname_r
18312
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018313/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018314 which can conflict with char gethostbyname_r (); below.
18315 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018316 <limits.h> exists even on freestanding compilers. */
18317
18318#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018319# include <limits.h>
18320#else
18321# include <assert.h>
18322#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018323
18324#undef gethostbyname_r
18325
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018326/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018327#ifdef __cplusplus
18328extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018329{
Martin v. Löwis11437992002-04-12 09:54:03 +000018330#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018331/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018332 builtin and then its argument prototype would still apply. */
18333char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018334/* The GNU C library defines this for functions which it implements
18335 to always fail with ENOSYS. Some functions are actually named
18336 something starting with __ and the normal name is an alias. */
18337#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
18338choke me
18339#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018340char (*f) () = gethostbyname_r;
18341#endif
18342#ifdef __cplusplus
18343}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018344#endif
18345
Skip Montanaro6dead952003-09-25 14:50:04 +000018346int
18347main ()
18348{
18349return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000018350 ;
18351 return 0;
18352}
18353_ACEOF
18354rm -f conftest.$ac_objext conftest$ac_exeext
18355if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018356 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018358 grep -v '^ *+' conftest.er1 >conftest.err
18359 rm -f conftest.er1
18360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18362 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018363 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18365 (eval $ac_try) 2>&5
18366 ac_status=$?
18367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18368 (exit $ac_status); }; } &&
18369 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18371 (eval $ac_try) 2>&5
18372 ac_status=$?
18373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18374 (exit $ac_status); }; }; then
18375 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018376else
Martin v. Löwis11437992002-04-12 09:54:03 +000018377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018378sed 's/^/| /' conftest.$ac_ext >&5
18379
Martin v. Löwis11437992002-04-12 09:54:03 +000018380ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018381fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018382rm -f conftest.err conftest.$ac_objext \
18383 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018385echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
18386echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
18387if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018388
Martin v. Löwis11437992002-04-12 09:54:03 +000018389 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018390#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018391_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018392
Martin v. Löwis11437992002-04-12 09:54:03 +000018393 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
18394echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018395 OLD_CFLAGS=$CFLAGS
18396 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018398/* confdefs.h. */
18399_ACEOF
18400cat confdefs.h >>conftest.$ac_ext
18401cat >>conftest.$ac_ext <<_ACEOF
18402/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018403
18404# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018405
Martin v. Löwis11437992002-04-12 09:54:03 +000018406int
18407main ()
18408{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018409
18410 char *name;
18411 struct hostent *he, *res;
18412 char buffer[2048];
18413 int buflen = 2048;
18414 int h_errnop;
18415
18416 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018417
18418 ;
18419 return 0;
18420}
18421_ACEOF
18422rm -f conftest.$ac_objext
18423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018424 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018426 grep -v '^ *+' conftest.er1 >conftest.err
18427 rm -f conftest.er1
18428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18430 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018431 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18433 (eval $ac_try) 2>&5
18434 ac_status=$?
18435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18436 (exit $ac_status); }; } &&
18437 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18439 (eval $ac_try) 2>&5
18440 ac_status=$?
18441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18442 (exit $ac_status); }; }; then
18443
18444 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018445#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018446_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018447
Martin v. Löwis11437992002-04-12 09:54:03 +000018448
18449cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018450#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018451_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018452
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 echo "$as_me:$LINENO: result: yes" >&5
18454echo "${ECHO_T}yes" >&6
18455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018456else
Martin v. Löwis11437992002-04-12 09:54:03 +000018457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018458sed 's/^/| /' conftest.$ac_ext >&5
18459
Martin v. Löwis11437992002-04-12 09:54:03 +000018460
18461 echo "$as_me:$LINENO: result: no" >&5
18462echo "${ECHO_T}no" >&6
18463 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
18464echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
18465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018466/* confdefs.h. */
18467_ACEOF
18468cat confdefs.h >>conftest.$ac_ext
18469cat >>conftest.$ac_ext <<_ACEOF
18470/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018471
18472# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018473
Martin v. Löwis11437992002-04-12 09:54:03 +000018474int
18475main ()
18476{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018477
18478 char *name;
18479 struct hostent *he;
18480 char buffer[2048];
18481 int buflen = 2048;
18482 int h_errnop;
18483
18484 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018485
18486 ;
18487 return 0;
18488}
18489_ACEOF
18490rm -f conftest.$ac_objext
18491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018492 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018494 grep -v '^ *+' conftest.er1 >conftest.err
18495 rm -f conftest.er1
18496 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18498 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018499 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18501 (eval $ac_try) 2>&5
18502 ac_status=$?
18503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18504 (exit $ac_status); }; } &&
18505 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18507 (eval $ac_try) 2>&5
18508 ac_status=$?
18509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18510 (exit $ac_status); }; }; then
18511
18512 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018513#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018514_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018515
Martin v. Löwis11437992002-04-12 09:54:03 +000018516
18517cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018518#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018519_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018520
Martin v. Löwis11437992002-04-12 09:54:03 +000018521 echo "$as_me:$LINENO: result: yes" >&5
18522echo "${ECHO_T}yes" >&6
18523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018524else
Martin v. Löwis11437992002-04-12 09:54:03 +000018525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018526sed 's/^/| /' conftest.$ac_ext >&5
18527
Martin v. Löwis11437992002-04-12 09:54:03 +000018528
18529 echo "$as_me:$LINENO: result: no" >&5
18530echo "${ECHO_T}no" >&6
18531 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
18532echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
18533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018534/* confdefs.h. */
18535_ACEOF
18536cat confdefs.h >>conftest.$ac_ext
18537cat >>conftest.$ac_ext <<_ACEOF
18538/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018539
18540# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018541
Martin v. Löwis11437992002-04-12 09:54:03 +000018542int
18543main ()
18544{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018545
18546 char *name;
18547 struct hostent *he;
18548 struct hostent_data data;
18549
18550 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000018551
18552 ;
18553 return 0;
18554}
18555_ACEOF
18556rm -f conftest.$ac_objext
18557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018558 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018560 grep -v '^ *+' conftest.er1 >conftest.err
18561 rm -f conftest.er1
18562 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18564 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018565 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18567 (eval $ac_try) 2>&5
18568 ac_status=$?
18569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18570 (exit $ac_status); }; } &&
18571 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18573 (eval $ac_try) 2>&5
18574 ac_status=$?
18575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18576 (exit $ac_status); }; }; then
18577
18578 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018579#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018580_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018581
Martin v. Löwis11437992002-04-12 09:54:03 +000018582
18583cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018584#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018585_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018586
Martin v. Löwis11437992002-04-12 09:54:03 +000018587 echo "$as_me:$LINENO: result: yes" >&5
18588echo "${ECHO_T}yes" >&6
18589
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018590else
Martin v. Löwis11437992002-04-12 09:54:03 +000018591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018592sed 's/^/| /' conftest.$ac_ext >&5
18593
Martin v. Löwis11437992002-04-12 09:54:03 +000018594
18595 echo "$as_me:$LINENO: result: no" >&5
18596echo "${ECHO_T}no" >&6
18597
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018598fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018599rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018600
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018601fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018603
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018604fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018605rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018606 CFLAGS=$OLD_CFLAGS
18607
18608else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018609
Martin v. Löwis11437992002-04-12 09:54:03 +000018610
18611for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000018612do
Martin v. Löwis11437992002-04-12 09:54:03 +000018613as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18614echo "$as_me:$LINENO: checking for $ac_func" >&5
18615echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18616if eval "test \"\${$as_ac_var+set}\" = set"; then
18617 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018618else
Martin v. Löwis11437992002-04-12 09:54:03 +000018619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018620/* confdefs.h. */
18621_ACEOF
18622cat confdefs.h >>conftest.$ac_ext
18623cat >>conftest.$ac_ext <<_ACEOF
18624/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018625/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18626 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18627#define $ac_func innocuous_$ac_func
18628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018629/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018630 which can conflict with char $ac_func (); below.
18631 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018632 <limits.h> exists even on freestanding compilers. */
18633
18634#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018635# include <limits.h>
18636#else
18637# include <assert.h>
18638#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018639
18640#undef $ac_func
18641
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018642/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018643#ifdef __cplusplus
18644extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018645{
Martin v. Löwis11437992002-04-12 09:54:03 +000018646#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018647/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018648 builtin and then its argument prototype would still apply. */
18649char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018650/* The GNU C library defines this for functions which it implements
18651 to always fail with ENOSYS. Some functions are actually named
18652 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000018653#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018654choke me
18655#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018656char (*f) () = $ac_func;
18657#endif
18658#ifdef __cplusplus
18659}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018660#endif
18661
Skip Montanaro6dead952003-09-25 14:50:04 +000018662int
18663main ()
18664{
18665return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018666 ;
18667 return 0;
18668}
18669_ACEOF
18670rm -f conftest.$ac_objext conftest$ac_exeext
18671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018672 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018674 grep -v '^ *+' conftest.er1 >conftest.err
18675 rm -f conftest.er1
18676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18678 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018679 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18681 (eval $ac_try) 2>&5
18682 ac_status=$?
18683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18684 (exit $ac_status); }; } &&
18685 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18687 (eval $ac_try) 2>&5
18688 ac_status=$?
18689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18690 (exit $ac_status); }; }; then
18691 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018692else
Martin v. Löwis11437992002-04-12 09:54:03 +000018693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018694sed 's/^/| /' conftest.$ac_ext >&5
18695
Martin v. Löwis11437992002-04-12 09:54:03 +000018696eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018697fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018698rm -f conftest.err conftest.$ac_objext \
18699 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018700fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018701echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18702echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18703if test `eval echo '${'$as_ac_var'}'` = yes; then
18704 cat >>confdefs.h <<_ACEOF
18705#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18706_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018707
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018708fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018709done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018710
Michael W. Hudson54241132001-12-07 15:38:26 +000018711
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018712fi
18713
Michael W. Hudson54241132001-12-07 15:38:26 +000018714
18715
18716
18717
18718
18719
Guido van Rossum627b2d71993-12-24 10:39:16 +000018720# checks for system services
18721# (none yet)
18722
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018723# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000018724echo "$as_me:$LINENO: checking for __fpu_control" >&5
18725echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
18726if test "${ac_cv_func___fpu_control+set}" = set; then
18727 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018728else
Martin v. Löwis11437992002-04-12 09:54:03 +000018729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018730/* confdefs.h. */
18731_ACEOF
18732cat confdefs.h >>conftest.$ac_ext
18733cat >>conftest.$ac_ext <<_ACEOF
18734/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018735/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
18736 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18737#define __fpu_control innocuous___fpu_control
18738
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018739/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018740 which can conflict with char __fpu_control (); below.
18741 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018742 <limits.h> exists even on freestanding compilers. */
18743
18744#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018745# include <limits.h>
18746#else
18747# include <assert.h>
18748#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018749
18750#undef __fpu_control
18751
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018752/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018753#ifdef __cplusplus
18754extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018755{
Martin v. Löwis11437992002-04-12 09:54:03 +000018756#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018757/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018758 builtin and then its argument prototype would still apply. */
18759char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018760/* The GNU C library defines this for functions which it implements
18761 to always fail with ENOSYS. Some functions are actually named
18762 something starting with __ and the normal name is an alias. */
18763#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
18764choke me
18765#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018766char (*f) () = __fpu_control;
18767#endif
18768#ifdef __cplusplus
18769}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018770#endif
18771
Skip Montanaro6dead952003-09-25 14:50:04 +000018772int
18773main ()
18774{
18775return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000018776 ;
18777 return 0;
18778}
18779_ACEOF
18780rm -f conftest.$ac_objext conftest$ac_exeext
18781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018782 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018784 grep -v '^ *+' conftest.er1 >conftest.err
18785 rm -f conftest.er1
18786 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18788 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018789 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18791 (eval $ac_try) 2>&5
18792 ac_status=$?
18793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18794 (exit $ac_status); }; } &&
18795 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18797 (eval $ac_try) 2>&5
18798 ac_status=$?
18799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18800 (exit $ac_status); }; }; then
18801 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018802else
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018804sed 's/^/| /' conftest.$ac_ext >&5
18805
Martin v. Löwis11437992002-04-12 09:54:03 +000018806ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018807fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018808rm -f conftest.err conftest.$ac_objext \
18809 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018811echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
18812echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
18813if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018814 :
18815else
Martin v. Löwis11437992002-04-12 09:54:03 +000018816
18817echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
18818echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
18819if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
18820 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018821else
Martin v. Löwis11437992002-04-12 09:54:03 +000018822 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018823LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018825/* confdefs.h. */
18826_ACEOF
18827cat confdefs.h >>conftest.$ac_ext
18828cat >>conftest.$ac_ext <<_ACEOF
18829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018830
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018831/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018832#ifdef __cplusplus
18833extern "C"
18834#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018835/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018836 builtin and then its argument prototype would still apply. */
18837char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018838int
18839main ()
18840{
18841__fpu_control ();
18842 ;
18843 return 0;
18844}
18845_ACEOF
18846rm -f conftest.$ac_objext conftest$ac_exeext
18847if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018848 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018850 grep -v '^ *+' conftest.er1 >conftest.err
18851 rm -f conftest.er1
18852 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18854 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018855 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18857 (eval $ac_try) 2>&5
18858 ac_status=$?
18859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18860 (exit $ac_status); }; } &&
18861 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18863 (eval $ac_try) 2>&5
18864 ac_status=$?
18865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18866 (exit $ac_status); }; }; then
18867 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018868else
Martin v. Löwis11437992002-04-12 09:54:03 +000018869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018870sed 's/^/| /' conftest.$ac_ext >&5
18871
Martin v. Löwis11437992002-04-12 09:54:03 +000018872ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018873fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018874rm -f conftest.err conftest.$ac_objext \
18875 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018876LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018878echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
18879echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
18880if test $ac_cv_lib_ieee___fpu_control = yes; then
18881 cat >>confdefs.h <<_ACEOF
18882#define HAVE_LIBIEEE 1
18883_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018884
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018885 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018886
Guido van Rossum627b2d71993-12-24 10:39:16 +000018887fi
18888
Michael W. Hudson54241132001-12-07 15:38:26 +000018889
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018890fi
18891
Michael W. Hudson54241132001-12-07 15:38:26 +000018892
Guido van Rossum7f253911997-05-09 02:42:48 +000018893# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000018894echo "$as_me:$LINENO: checking for --with-fpectl" >&5
18895echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
18896
Guido van Rossum7f253911997-05-09 02:42:48 +000018897# Check whether --with-fpectl or --without-fpectl was given.
18898if test "${with_fpectl+set}" = set; then
18899 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000018900
Guido van Rossum7f253911997-05-09 02:42:48 +000018901if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018902then
18903
18904cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000018905#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018906_ACEOF
18907
18908 echo "$as_me:$LINENO: result: yes" >&5
18909echo "${ECHO_T}yes" >&6
18910else echo "$as_me:$LINENO: result: no" >&5
18911echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018912fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018913else
Martin v. Löwis11437992002-04-12 09:54:03 +000018914 echo "$as_me:$LINENO: result: no" >&5
18915echo "${ECHO_T}no" >&6
18916fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000018917
Guido van Rossum7f43da71994-08-01 12:15:30 +000018918# check for --with-libm=...
18919
Guido van Rossum563e7081996-09-10 18:20:48 +000018920case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000018921Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000018922BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000018923*) LIBM=-lm
18924esac
Martin v. Löwis11437992002-04-12 09:54:03 +000018925echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
18926echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
18927
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018928# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018929if test "${with_libm+set}" = set; then
18930 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000018931
Guido van Rossum7f253911997-05-09 02:42:48 +000018932if test "$withval" = no
18933then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000018934 echo "$as_me:$LINENO: result: force LIBM empty" >&5
18935echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018936elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018937then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018938 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
18939echo "${ECHO_T}set LIBM=\"$withval\"" >&6
18940else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
18941echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
18942 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018943fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018944else
Martin v. Löwis11437992002-04-12 09:54:03 +000018945 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
18946echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
18947fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018948
18949# check for --with-libc=...
18950
Martin v. Löwis11437992002-04-12 09:54:03 +000018951echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18952echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18953
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018954# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018955if test "${with_libc+set}" = set; then
18956 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018957
Guido van Rossum7f253911997-05-09 02:42:48 +000018958if test "$withval" = no
18959then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018960 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18961echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018962elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018963then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018964 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18965echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18966else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18967echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18968 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018969fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018970else
Martin v. Löwis11437992002-04-12 09:54:03 +000018971 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18972echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18973fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018974
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018975# check for hypot() in math library
18976LIBS_SAVE=$LIBS
18977LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018978
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018979for ac_func in hypot
18980do
Martin v. Löwis11437992002-04-12 09:54:03 +000018981as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18982echo "$as_me:$LINENO: checking for $ac_func" >&5
18983echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18984if eval "test \"\${$as_ac_var+set}\" = set"; then
18985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018986else
Martin v. Löwis11437992002-04-12 09:54:03 +000018987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018988/* confdefs.h. */
18989_ACEOF
18990cat confdefs.h >>conftest.$ac_ext
18991cat >>conftest.$ac_ext <<_ACEOF
18992/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018993/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18994 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18995#define $ac_func innocuous_$ac_func
18996
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018997/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018998 which can conflict with char $ac_func (); below.
18999 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019000 <limits.h> exists even on freestanding compilers. */
19001
19002#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019003# include <limits.h>
19004#else
19005# include <assert.h>
19006#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019007
19008#undef $ac_func
19009
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019010/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019011#ifdef __cplusplus
19012extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000019013{
Martin v. Löwis11437992002-04-12 09:54:03 +000019014#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019015/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019016 builtin and then its argument prototype would still apply. */
19017char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019018/* The GNU C library defines this for functions which it implements
19019 to always fail with ENOSYS. Some functions are actually named
19020 something starting with __ and the normal name is an alias. */
19021#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19022choke me
19023#else
Skip Montanaro6dead952003-09-25 14:50:04 +000019024char (*f) () = $ac_func;
19025#endif
19026#ifdef __cplusplus
19027}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019028#endif
19029
Skip Montanaro6dead952003-09-25 14:50:04 +000019030int
19031main ()
19032{
19033return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000019034 ;
19035 return 0;
19036}
19037_ACEOF
19038rm -f conftest.$ac_objext conftest$ac_exeext
19039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019040 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019042 grep -v '^ *+' conftest.er1 >conftest.err
19043 rm -f conftest.er1
19044 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19046 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019047 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19049 (eval $ac_try) 2>&5
19050 ac_status=$?
19051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19052 (exit $ac_status); }; } &&
19053 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19055 (eval $ac_try) 2>&5
19056 ac_status=$?
19057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19058 (exit $ac_status); }; }; then
19059 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019060else
Martin v. Löwis11437992002-04-12 09:54:03 +000019061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019062sed 's/^/| /' conftest.$ac_ext >&5
19063
Martin v. Löwis11437992002-04-12 09:54:03 +000019064eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019065fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019066rm -f conftest.err conftest.$ac_objext \
19067 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019069echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19070echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19071if test `eval echo '${'$as_ac_var'}'` = yes; then
19072 cat >>confdefs.h <<_ACEOF
19073#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19074_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019075
Michael W. Hudson54241132001-12-07 15:38:26 +000019076else
Skip Montanarof0d5f792004-08-15 14:08:23 +000019077 case $LIBOBJS in
19078 "$ac_func.$ac_objext" | \
19079 *" $ac_func.$ac_objext" | \
19080 "$ac_func.$ac_objext "* | \
19081 *" $ac_func.$ac_objext "* ) ;;
19082 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
19083esac
19084
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019085fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019086done
19087
Michael W. Hudson54241132001-12-07 15:38:26 +000019088
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019089LIBS=$LIBS_SAVE
19090
Guido van Rossumef2255b2000-03-10 22:30:29 +000019091# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000019092if test "${ac_cv_header_wchar_h+set}" = set; then
19093 echo "$as_me:$LINENO: checking for wchar.h" >&5
19094echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
19095if test "${ac_cv_header_wchar_h+set}" = set; then
19096 echo $ECHO_N "(cached) $ECHO_C" >&6
19097fi
19098echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19099echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019100else
Martin v. Löwis11437992002-04-12 09:54:03 +000019101 # Is the header compilable?
19102echo "$as_me:$LINENO: checking wchar.h usability" >&5
19103echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
19104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019105/* confdefs.h. */
19106_ACEOF
19107cat confdefs.h >>conftest.$ac_ext
19108cat >>conftest.$ac_ext <<_ACEOF
19109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019110$ac_includes_default
19111#include <wchar.h>
19112_ACEOF
19113rm -f conftest.$ac_objext
19114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019115 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019117 grep -v '^ *+' conftest.er1 >conftest.err
19118 rm -f conftest.er1
19119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19121 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019122 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19124 (eval $ac_try) 2>&5
19125 ac_status=$?
19126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19127 (exit $ac_status); }; } &&
19128 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19130 (eval $ac_try) 2>&5
19131 ac_status=$?
19132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19133 (exit $ac_status); }; }; then
19134 ac_header_compiler=yes
19135else
19136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019137sed 's/^/| /' conftest.$ac_ext >&5
19138
Martin v. Löwis11437992002-04-12 09:54:03 +000019139ac_header_compiler=no
19140fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019141rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019142echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19143echo "${ECHO_T}$ac_header_compiler" >&6
19144
19145# Is the header present?
19146echo "$as_me:$LINENO: checking wchar.h presence" >&5
19147echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
19148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019149/* confdefs.h. */
19150_ACEOF
19151cat confdefs.h >>conftest.$ac_ext
19152cat >>conftest.$ac_ext <<_ACEOF
19153/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019154#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019155_ACEOF
19156if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19157 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19158 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019159 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000019160 rm -f conftest.er1
19161 cat conftest.err >&5
19162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19163 (exit $ac_status); } >/dev/null; then
19164 if test -s conftest.err; then
19165 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019166 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000019167 else
19168 ac_cpp_err=
19169 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019170else
Martin v. Löwis11437992002-04-12 09:54:03 +000019171 ac_cpp_err=yes
19172fi
19173if test -z "$ac_cpp_err"; then
19174 ac_header_preproc=yes
19175else
19176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019177sed 's/^/| /' conftest.$ac_ext >&5
19178
Martin v. Löwis11437992002-04-12 09:54:03 +000019179 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019180fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019181rm -f conftest.err conftest.$ac_ext
19182echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19183echo "${ECHO_T}$ac_header_preproc" >&6
19184
19185# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019186case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19187 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000019188 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
19189echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019190 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
19191echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
19192 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019193 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019194 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019195 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
19196echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019197 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
19198echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
19199 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
19200echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
19201 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
19202echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019203 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
19204echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019205 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
19206echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019207 (
19208 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000019209## ------------------------------------------------ ##
19210## Report this to http://www.python.org/python-bugs ##
19211## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000019212_ASBOX
19213 ) |
19214 sed "s/^/$as_me: WARNING: /" >&2
19215 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019216esac
19217echo "$as_me:$LINENO: checking for wchar.h" >&5
19218echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
19219if test "${ac_cv_header_wchar_h+set}" = set; then
19220 echo $ECHO_N "(cached) $ECHO_C" >&6
19221else
19222 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000019223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019224echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19225echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
19226
19227fi
19228if test $ac_cv_header_wchar_h = yes; then
19229
19230
19231cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019232#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019233_ACEOF
19234
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019235 wchar_h="yes"
19236
Guido van Rossumef2255b2000-03-10 22:30:29 +000019237else
Martin v. Löwis11437992002-04-12 09:54:03 +000019238 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000019239
19240fi
19241
Michael W. Hudson54241132001-12-07 15:38:26 +000019242
Martin v. Löwis11437992002-04-12 09:54:03 +000019243
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019244# determine wchar_t size
19245if test "$wchar_h" = yes
19246then
Martin v. Löwis11437992002-04-12 09:54:03 +000019247 echo "$as_me:$LINENO: checking for wchar_t" >&5
19248echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19249if test "${ac_cv_type_wchar_t+set}" = set; then
19250 echo $ECHO_N "(cached) $ECHO_C" >&6
19251else
19252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019253/* confdefs.h. */
19254_ACEOF
19255cat confdefs.h >>conftest.$ac_ext
19256cat >>conftest.$ac_ext <<_ACEOF
19257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019258#include <wchar.h>
19259
Martin v. Löwis11437992002-04-12 09:54:03 +000019260int
19261main ()
19262{
19263if ((wchar_t *) 0)
19264 return 0;
19265if (sizeof (wchar_t))
19266 return 0;
19267 ;
19268 return 0;
19269}
19270_ACEOF
19271rm -f conftest.$ac_objext
19272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019273 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019275 grep -v '^ *+' conftest.er1 >conftest.err
19276 rm -f conftest.er1
19277 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19279 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019280 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19282 (eval $ac_try) 2>&5
19283 ac_status=$?
19284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19285 (exit $ac_status); }; } &&
19286 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19288 (eval $ac_try) 2>&5
19289 ac_status=$?
19290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19291 (exit $ac_status); }; }; then
19292 ac_cv_type_wchar_t=yes
19293else
19294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019295sed 's/^/| /' conftest.$ac_ext >&5
19296
Martin v. Löwis11437992002-04-12 09:54:03 +000019297ac_cv_type_wchar_t=no
19298fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019299rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019300fi
19301echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
19302echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19303
19304echo "$as_me:$LINENO: checking size of wchar_t" >&5
19305echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19306if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19307 echo $ECHO_N "(cached) $ECHO_C" >&6
19308else
19309 if test "$ac_cv_type_wchar_t" = yes; then
19310 # The cast to unsigned long works around a bug in the HP C Compiler
19311 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19312 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19313 # This bug is HP SR number 8606223364.
19314 if test "$cross_compiling" = yes; then
19315 # Depending upon the size, compute the lo and hi bounds.
19316cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019317/* confdefs.h. */
19318_ACEOF
19319cat confdefs.h >>conftest.$ac_ext
19320cat >>conftest.$ac_ext <<_ACEOF
19321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019322#include <wchar.h>
19323
Martin v. Löwis11437992002-04-12 09:54:03 +000019324int
19325main ()
19326{
19327static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
19328test_array [0] = 0
19329
19330 ;
19331 return 0;
19332}
19333_ACEOF
19334rm -f conftest.$ac_objext
19335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019336 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019338 grep -v '^ *+' conftest.er1 >conftest.err
19339 rm -f conftest.er1
19340 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19342 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019343 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19345 (eval $ac_try) 2>&5
19346 ac_status=$?
19347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19348 (exit $ac_status); }; } &&
19349 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19351 (eval $ac_try) 2>&5
19352 ac_status=$?
19353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19354 (exit $ac_status); }; }; then
19355 ac_lo=0 ac_mid=0
19356 while :; do
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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019363#include <wchar.h>
19364
Martin v. Löwis11437992002-04-12 09:54:03 +000019365int
19366main ()
19367{
19368static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19369test_array [0] = 0
19370
19371 ;
19372 return 0;
19373}
19374_ACEOF
19375rm -f conftest.$ac_objext
19376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019377 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019379 grep -v '^ *+' conftest.er1 >conftest.err
19380 rm -f conftest.er1
19381 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19383 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019384 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19386 (eval $ac_try) 2>&5
19387 ac_status=$?
19388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19389 (exit $ac_status); }; } &&
19390 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19392 (eval $ac_try) 2>&5
19393 ac_status=$?
19394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19395 (exit $ac_status); }; }; then
19396 ac_hi=$ac_mid; break
19397else
19398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019399sed 's/^/| /' conftest.$ac_ext >&5
19400
Martin v. Löwis11437992002-04-12 09:54:03 +000019401ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019402 if test $ac_lo -le $ac_mid; then
19403 ac_lo= ac_hi=
19404 break
19405 fi
19406 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000019407fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019408rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019409 done
19410else
19411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019412sed 's/^/| /' conftest.$ac_ext >&5
19413
Martin v. Löwis11437992002-04-12 09:54:03 +000019414cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019415/* confdefs.h. */
19416_ACEOF
19417cat confdefs.h >>conftest.$ac_ext
19418cat >>conftest.$ac_ext <<_ACEOF
19419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019420#include <wchar.h>
19421
Martin v. Löwis11437992002-04-12 09:54:03 +000019422int
19423main ()
19424{
19425static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
19426test_array [0] = 0
19427
19428 ;
19429 return 0;
19430}
19431_ACEOF
19432rm -f conftest.$ac_objext
19433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019434 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019436 grep -v '^ *+' conftest.er1 >conftest.err
19437 rm -f conftest.er1
19438 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19440 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019441 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19443 (eval $ac_try) 2>&5
19444 ac_status=$?
19445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19446 (exit $ac_status); }; } &&
19447 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19449 (eval $ac_try) 2>&5
19450 ac_status=$?
19451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19452 (exit $ac_status); }; }; then
19453 ac_hi=-1 ac_mid=-1
19454 while :; do
19455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019456/* confdefs.h. */
19457_ACEOF
19458cat confdefs.h >>conftest.$ac_ext
19459cat >>conftest.$ac_ext <<_ACEOF
19460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019461#include <wchar.h>
19462
Martin v. Löwis11437992002-04-12 09:54:03 +000019463int
19464main ()
19465{
19466static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
19467test_array [0] = 0
19468
19469 ;
19470 return 0;
19471}
19472_ACEOF
19473rm -f conftest.$ac_objext
19474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019475 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019477 grep -v '^ *+' conftest.er1 >conftest.err
19478 rm -f conftest.er1
19479 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19481 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019482 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19484 (eval $ac_try) 2>&5
19485 ac_status=$?
19486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19487 (exit $ac_status); }; } &&
19488 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19490 (eval $ac_try) 2>&5
19491 ac_status=$?
19492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19493 (exit $ac_status); }; }; then
19494 ac_lo=$ac_mid; break
19495else
19496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019497sed 's/^/| /' conftest.$ac_ext >&5
19498
Martin v. Löwis11437992002-04-12 09:54:03 +000019499ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019500 if test $ac_mid -le $ac_hi; then
19501 ac_lo= ac_hi=
19502 break
19503 fi
19504 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000019505fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019506rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019507 done
19508else
19509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019510sed 's/^/| /' conftest.$ac_ext >&5
19511
Martin v. Löwis11437992002-04-12 09:54:03 +000019512ac_lo= ac_hi=
19513fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019515fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019517# Binary search between lo and hi bounds.
19518while test "x$ac_lo" != "x$ac_hi"; do
19519 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019521/* confdefs.h. */
19522_ACEOF
19523cat confdefs.h >>conftest.$ac_ext
19524cat >>conftest.$ac_ext <<_ACEOF
19525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019526#include <wchar.h>
19527
Martin v. Löwis11437992002-04-12 09:54:03 +000019528int
19529main ()
19530{
19531static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19532test_array [0] = 0
19533
19534 ;
19535 return 0;
19536}
19537_ACEOF
19538rm -f conftest.$ac_objext
19539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019540 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019542 grep -v '^ *+' conftest.er1 >conftest.err
19543 rm -f conftest.er1
19544 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19546 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019547 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19549 (eval $ac_try) 2>&5
19550 ac_status=$?
19551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19552 (exit $ac_status); }; } &&
19553 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19555 (eval $ac_try) 2>&5
19556 ac_status=$?
19557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19558 (exit $ac_status); }; }; then
19559 ac_hi=$ac_mid
19560else
19561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019562sed 's/^/| /' conftest.$ac_ext >&5
19563
Martin v. Löwis11437992002-04-12 09:54:03 +000019564ac_lo=`expr '(' $ac_mid ')' + 1`
19565fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019566rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019567done
19568case $ac_lo in
19569?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019570'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19571See \`config.log' for more details." >&5
19572echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19573See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019574 { (exit 1); exit 1; }; } ;;
19575esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019576else
19577 if test "$cross_compiling" = yes; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019578 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
19579echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019580 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000019581else
Martin v. Löwis11437992002-04-12 09:54:03 +000019582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019583/* confdefs.h. */
19584_ACEOF
19585cat confdefs.h >>conftest.$ac_ext
19586cat >>conftest.$ac_ext <<_ACEOF
19587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019588#include <wchar.h>
19589
19590long longval () { return (long) (sizeof (wchar_t)); }
19591unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000019592#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019593#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019594int
19595main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019596{
Martin v. Löwis11437992002-04-12 09:54:03 +000019597
19598 FILE *f = fopen ("conftest.val", "w");
19599 if (! f)
19600 exit (1);
19601 if (((long) (sizeof (wchar_t))) < 0)
19602 {
19603 long i = longval ();
19604 if (i != ((long) (sizeof (wchar_t))))
19605 exit (1);
19606 fprintf (f, "%ld\n", i);
19607 }
19608 else
19609 {
19610 unsigned long i = ulongval ();
19611 if (i != ((long) (sizeof (wchar_t))))
19612 exit (1);
19613 fprintf (f, "%lu\n", i);
19614 }
19615 exit (ferror (f) || fclose (f) != 0);
19616
19617 ;
19618 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000019619}
Martin v. Löwis11437992002-04-12 09:54:03 +000019620_ACEOF
19621rm -f conftest$ac_exeext
19622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19623 (eval $ac_link) 2>&5
19624 ac_status=$?
19625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19628 (eval $ac_try) 2>&5
19629 ac_status=$?
19630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19631 (exit $ac_status); }; }; then
19632 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000019633else
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 echo "$as_me: program exited with status $ac_status" >&5
19635echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019636sed 's/^/| /' conftest.$ac_ext >&5
19637
Martin v. Löwis11437992002-04-12 09:54:03 +000019638( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000019639{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19640See \`config.log' for more details." >&5
19641echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19642See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019643 { (exit 1); exit 1; }; }
19644fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019645rm -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 +000019646fi
19647fi
19648rm -f conftest.val
19649else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019650 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000019651fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019653echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
19654echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
19655cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019656#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019657_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019658
Michael W. Hudson54241132001-12-07 15:38:26 +000019659
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019660fi
19661
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019662echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
19663echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
19664have_ucs4_tcl=no
19665cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019666/* confdefs.h. */
19667_ACEOF
19668cat confdefs.h >>conftest.$ac_ext
19669cat >>conftest.$ac_ext <<_ACEOF
19670/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019671
19672#include <tcl.h>
19673#if TCL_UTF_MAX != 6
19674# error "NOT UCS4_TCL"
19675#endif
19676int
19677main ()
19678{
19679
19680 ;
19681 return 0;
19682}
19683_ACEOF
19684rm -f conftest.$ac_objext
19685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019686 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019688 grep -v '^ *+' conftest.er1 >conftest.err
19689 rm -f conftest.er1
19690 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19692 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019693 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19695 (eval $ac_try) 2>&5
19696 ac_status=$?
19697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19698 (exit $ac_status); }; } &&
19699 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19701 (eval $ac_try) 2>&5
19702 ac_status=$?
19703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19704 (exit $ac_status); }; }; then
19705
19706
19707cat >>confdefs.h <<\_ACEOF
19708#define HAVE_UCS4_TCL 1
19709_ACEOF
19710
19711 have_ucs4_tcl=yes
19712
19713else
19714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019715sed 's/^/| /' conftest.$ac_ext >&5
19716
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019717fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019718rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019719echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
19720echo "${ECHO_T}$have_ucs4_tcl" >&6
19721
Skip Montanaro6dead952003-09-25 14:50:04 +000019722# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019723if test "$wchar_h" = yes
19724then
19725 # check whether wchar_t is signed or not
19726 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
19727echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
19728 if test "${ac_cv_wchar_t_signed+set}" = set; then
19729 echo $ECHO_N "(cached) $ECHO_C" >&6
19730else
19731
19732 if test "$cross_compiling" = yes; then
19733 ac_cv_wchar_t_signed=yes
19734else
19735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019736/* confdefs.h. */
19737_ACEOF
19738cat confdefs.h >>conftest.$ac_ext
19739cat >>conftest.$ac_ext <<_ACEOF
19740/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019741
19742 #include <wchar.h>
19743 int main()
19744 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019745 /* Success: exit code 0 */
19746 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019747 }
19748
19749_ACEOF
19750rm -f conftest$ac_exeext
19751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19752 (eval $ac_link) 2>&5
19753 ac_status=$?
19754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19755 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19757 (eval $ac_try) 2>&5
19758 ac_status=$?
19759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19760 (exit $ac_status); }; }; then
19761 ac_cv_wchar_t_signed=yes
19762else
19763 echo "$as_me: program exited with status $ac_status" >&5
19764echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019765sed 's/^/| /' conftest.$ac_ext >&5
19766
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019767( exit $ac_status )
19768ac_cv_wchar_t_signed=no
19769fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019770rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019771fi
19772fi
19773
19774 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
19775echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
19776fi
19777
Martin v. Löwis11437992002-04-12 09:54:03 +000019778echo "$as_me:$LINENO: checking what type to use for unicode" >&5
19779echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019780# Check whether --enable-unicode or --disable-unicode was given.
19781if test "${enable_unicode+set}" = set; then
19782 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000019783
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019784else
19785 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000019786fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019787
19788if test $enable_unicode = yes
19789then
Martin v. Löwisfd917792001-06-27 20:22:04 +000019790 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019791 case "$have_ucs4_tcl" in
19792 yes) enable_unicode="ucs4"
19793 ;;
19794 *) enable_unicode="ucs2"
19795 ;;
19796 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019797fi
19798
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019799
19800
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019801case "$enable_unicode" in
19802ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000019803 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019804#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000019805_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019806
19807 ;;
19808ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000019809 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019810#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000019811_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019812
19813 ;;
19814esac
19815
Michael W. Hudson54241132001-12-07 15:38:26 +000019816
Martin v. Löwis11437992002-04-12 09:54:03 +000019817
19818
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019819
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019820if test "$enable_unicode" = "no"
19821then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019822 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000019823 echo "$as_me:$LINENO: result: not used" >&5
19824echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019825else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019826 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000019827
19828cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019829#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019830_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019831
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019832
19833 # wchar_t is only usable if it maps to an unsigned type
19834 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000019835 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019836 then
19837 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019838
Martin v. Löwis11437992002-04-12 09:54:03 +000019839cat >>confdefs.h <<\_ACEOF
19840#define HAVE_USABLE_WCHAR_T 1
19841_ACEOF
19842
19843 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019844#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019845_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019846
19847 elif test "$ac_cv_sizeof_short" = "$unicode_size"
19848 then
19849 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000019850 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019851#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000019852_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019853
19854 elif test "$ac_cv_sizeof_long" = "$unicode_size"
19855 then
19856 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000019857 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019858#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000019859_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019860
19861 else
19862 PY_UNICODE_TYPE="no type found"
19863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019864 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
19865echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019866fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019867
19868# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019869echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
19870echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
19871if test "${ac_cv_c_bigendian+set}" = set; then
19872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019873else
Martin v. Löwis11437992002-04-12 09:54:03 +000019874 # See if sys/param.h defines the BYTE_ORDER macro.
19875cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019876/* confdefs.h. */
19877_ACEOF
19878cat confdefs.h >>conftest.$ac_ext
19879cat >>conftest.$ac_ext <<_ACEOF
19880/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019881#include <sys/types.h>
19882#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019883
Martin v. Löwis11437992002-04-12 09:54:03 +000019884int
19885main ()
19886{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019887#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
19888 bogus endian macros
19889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019890
19891 ;
19892 return 0;
19893}
19894_ACEOF
19895rm -f conftest.$ac_objext
19896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019897 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019899 grep -v '^ *+' conftest.er1 >conftest.err
19900 rm -f conftest.er1
19901 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19903 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019904 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19906 (eval $ac_try) 2>&5
19907 ac_status=$?
19908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19909 (exit $ac_status); }; } &&
19910 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19912 (eval $ac_try) 2>&5
19913 ac_status=$?
19914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19915 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019916 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000019917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019918/* confdefs.h. */
19919_ACEOF
19920cat confdefs.h >>conftest.$ac_ext
19921cat >>conftest.$ac_ext <<_ACEOF
19922/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019923#include <sys/types.h>
19924#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019925
Martin v. Löwis11437992002-04-12 09:54:03 +000019926int
19927main ()
19928{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019929#if BYTE_ORDER != BIG_ENDIAN
19930 not big endian
19931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019932
19933 ;
19934 return 0;
19935}
19936_ACEOF
19937rm -f conftest.$ac_objext
19938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019939 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019941 grep -v '^ *+' conftest.er1 >conftest.err
19942 rm -f conftest.er1
19943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19945 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019946 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19948 (eval $ac_try) 2>&5
19949 ac_status=$?
19950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19951 (exit $ac_status); }; } &&
19952 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19954 (eval $ac_try) 2>&5
19955 ac_status=$?
19956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19957 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019958 ac_cv_c_bigendian=yes
19959else
Martin v. Löwis11437992002-04-12 09:54:03 +000019960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019961sed 's/^/| /' conftest.$ac_ext >&5
19962
Martin v. Löwis11437992002-04-12 09:54:03 +000019963ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019964fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019966else
Martin v. Löwis11437992002-04-12 09:54:03 +000019967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019968sed 's/^/| /' conftest.$ac_ext >&5
19969
Martin v. Löwis11437992002-04-12 09:54:03 +000019970# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019971if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019972 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019973 ac_cv_c_bigendian=unknown
19974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019975/* confdefs.h. */
19976_ACEOF
19977cat confdefs.h >>conftest.$ac_ext
19978cat >>conftest.$ac_ext <<_ACEOF
19979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019980short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19981short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19982void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19983short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19984short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19985void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019986int
19987main ()
19988{
19989 _ascii (); _ebcdic ();
19990 ;
19991 return 0;
19992}
19993_ACEOF
19994rm -f conftest.$ac_objext
19995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019996 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019998 grep -v '^ *+' conftest.er1 >conftest.err
19999 rm -f conftest.er1
20000 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20002 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020003 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20005 (eval $ac_try) 2>&5
20006 ac_status=$?
20007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20008 (exit $ac_status); }; } &&
20009 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20011 (eval $ac_try) 2>&5
20012 ac_status=$?
20013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20014 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020015 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020016 ac_cv_c_bigendian=yes
20017fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020018if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020019 if test "$ac_cv_c_bigendian" = unknown; then
20020 ac_cv_c_bigendian=no
20021 else
20022 # finding both strings is unlikely to happen, but who knows?
20023 ac_cv_c_bigendian=unknown
20024 fi
20025fi
20026else
20027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020028sed 's/^/| /' conftest.$ac_ext >&5
20029
Martin v. Löwis11437992002-04-12 09:54:03 +000020030fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020032else
20033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020034/* confdefs.h. */
20035_ACEOF
20036cat confdefs.h >>conftest.$ac_ext
20037cat >>conftest.$ac_ext <<_ACEOF
20038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020039int
20040main ()
20041{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020042 /* Are we little or big endian? From Harbison&Steele. */
20043 union
20044 {
20045 long l;
20046 char c[sizeof (long)];
20047 } u;
20048 u.l = 1;
20049 exit (u.c[sizeof (long) - 1] == 1);
20050}
Martin v. Löwis11437992002-04-12 09:54:03 +000020051_ACEOF
20052rm -f conftest$ac_exeext
20053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20054 (eval $ac_link) 2>&5
20055 ac_status=$?
20056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20059 (eval $ac_try) 2>&5
20060 ac_status=$?
20061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20062 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020063 ac_cv_c_bigendian=no
20064else
Martin v. Löwis11437992002-04-12 09:54:03 +000020065 echo "$as_me: program exited with status $ac_status" >&5
20066echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020067sed 's/^/| /' conftest.$ac_ext >&5
20068
Martin v. Löwis11437992002-04-12 09:54:03 +000020069( exit $ac_status )
20070ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000020071fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020072rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020074fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020076fi
20077echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
20078echo "${ECHO_T}$ac_cv_c_bigendian" >&6
20079case $ac_cv_c_bigendian in
20080 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000020081
Martin v. Löwis11437992002-04-12 09:54:03 +000020082cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020083#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020084_ACEOF
20085 ;;
20086 no)
20087 ;;
20088 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000020089 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020090presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020091echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020092presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
20093 { (exit 1); exit 1; }; } ;;
20094esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000020095
Michael W. Hudson54241132001-12-07 15:38:26 +000020096
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020097# Check whether right shifting a negative integer extends the sign bit
20098# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000020099echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
20100echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
20101if test "${ac_cv_rshift_extends_sign+set}" = set; then
20102 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020103else
Martin v. Löwis11437992002-04-12 09:54:03 +000020104
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020105if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020106 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020107else
Martin v. Löwis11437992002-04-12 09:54:03 +000020108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020109/* confdefs.h. */
20110_ACEOF
20111cat confdefs.h >>conftest.$ac_ext
20112cat >>conftest.$ac_ext <<_ACEOF
20113/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020114
20115int main()
20116{
Vladimir Marangozova6180282000-07-12 05:05:06 +000020117 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020118}
20119
Martin v. Löwis11437992002-04-12 09:54:03 +000020120_ACEOF
20121rm -f conftest$ac_exeext
20122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20123 (eval $ac_link) 2>&5
20124 ac_status=$?
20125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20128 (eval $ac_try) 2>&5
20129 ac_status=$?
20130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20131 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000020132 ac_cv_rshift_extends_sign=yes
20133else
Martin v. Löwis11437992002-04-12 09:54:03 +000020134 echo "$as_me: program exited with status $ac_status" >&5
20135echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020136sed 's/^/| /' conftest.$ac_ext >&5
20137
Martin v. Löwis11437992002-04-12 09:54:03 +000020138( exit $ac_status )
20139ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000020140fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020141rm -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 +000020142fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000020143fi
20144
Martin v. Löwis11437992002-04-12 09:54:03 +000020145echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
20146echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020147if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020148then
Martin v. Löwis11437992002-04-12 09:54:03 +000020149
20150cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020151#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020152_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020153
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020154fi
20155
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020156# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020157echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
20158echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
20159if test "${ac_cv_have_getc_unlocked+set}" = set; then
20160 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020161else
Martin v. Löwis11437992002-04-12 09:54:03 +000020162
20163cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020164/* confdefs.h. */
20165_ACEOF
20166cat confdefs.h >>conftest.$ac_ext
20167cat >>conftest.$ac_ext <<_ACEOF
20168/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020169#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020170int
20171main ()
20172{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020173
20174 FILE *f = fopen("/dev/null", "r");
20175 flockfile(f);
20176 getc_unlocked(f);
20177 funlockfile(f);
20178
Martin v. Löwis11437992002-04-12 09:54:03 +000020179 ;
20180 return 0;
20181}
20182_ACEOF
20183rm -f conftest.$ac_objext conftest$ac_exeext
20184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020185 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020187 grep -v '^ *+' conftest.er1 >conftest.err
20188 rm -f conftest.er1
20189 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20191 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020192 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20194 (eval $ac_try) 2>&5
20195 ac_status=$?
20196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20197 (exit $ac_status); }; } &&
20198 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20200 (eval $ac_try) 2>&5
20201 ac_status=$?
20202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20203 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020204 ac_cv_have_getc_unlocked=yes
20205else
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020207sed 's/^/| /' conftest.$ac_ext >&5
20208
Martin v. Löwis11437992002-04-12 09:54:03 +000020209ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020210fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020211rm -f conftest.err conftest.$ac_objext \
20212 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020213fi
20214
Martin v. Löwis11437992002-04-12 09:54:03 +000020215echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
20216echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020217if test "$ac_cv_have_getc_unlocked" = yes
20218then
Martin v. Löwis11437992002-04-12 09:54:03 +000020219
20220cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020221#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020222_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020223
20224fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020225
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020226# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000020227# save the value of LIBS so we don't actually link Python with readline
20228LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020229
20230echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
20231echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
20232if test "${ac_cv_lib_readline_readline+set}" = set; then
20233 echo $ECHO_N "(cached) $ECHO_C" >&6
20234else
20235 ac_check_lib_save_LIBS=$LIBS
20236LIBS="-lreadline $LIBS"
20237cat >conftest.$ac_ext <<_ACEOF
20238/* confdefs.h. */
20239_ACEOF
20240cat confdefs.h >>conftest.$ac_ext
20241cat >>conftest.$ac_ext <<_ACEOF
20242/* end confdefs.h. */
20243
20244/* Override any gcc2 internal prototype to avoid an error. */
20245#ifdef __cplusplus
20246extern "C"
20247#endif
20248/* We use char because int might match the return type of a gcc2
20249 builtin and then its argument prototype would still apply. */
20250char readline ();
20251int
20252main ()
20253{
20254readline ();
20255 ;
20256 return 0;
20257}
20258_ACEOF
20259rm -f conftest.$ac_objext conftest$ac_exeext
20260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20261 (eval $ac_link) 2>conftest.er1
20262 ac_status=$?
20263 grep -v '^ *+' conftest.er1 >conftest.err
20264 rm -f conftest.er1
20265 cat conftest.err >&5
20266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20267 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020268 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20270 (eval $ac_try) 2>&5
20271 ac_status=$?
20272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20273 (exit $ac_status); }; } &&
20274 { ac_try='test -s conftest$ac_exeext'
20275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20276 (eval $ac_try) 2>&5
20277 ac_status=$?
20278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20279 (exit $ac_status); }; }; then
20280 ac_cv_lib_readline_readline=yes
20281else
20282 echo "$as_me: failed program was:" >&5
20283sed 's/^/| /' conftest.$ac_ext >&5
20284
20285ac_cv_lib_readline_readline=no
20286fi
20287rm -f conftest.err conftest.$ac_objext \
20288 conftest$ac_exeext conftest.$ac_ext
20289LIBS=$ac_check_lib_save_LIBS
20290fi
20291echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
20292echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
20293if test $ac_cv_lib_readline_readline = yes; then
20294 cat >>confdefs.h <<_ACEOF
20295#define HAVE_LIBREADLINE 1
20296_ACEOF
20297
20298 LIBS="-lreadline $LIBS"
20299
20300fi
20301
20302if test "$ac_cv_have_readline_readline" = no
20303then
20304
20305echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
20306echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
20307if test "${ac_cv_lib_termcap_readline+set}" = set; then
20308 echo $ECHO_N "(cached) $ECHO_C" >&6
20309else
20310 ac_check_lib_save_LIBS=$LIBS
20311LIBS="-ltermcap $LIBS"
20312cat >conftest.$ac_ext <<_ACEOF
20313/* confdefs.h. */
20314_ACEOF
20315cat confdefs.h >>conftest.$ac_ext
20316cat >>conftest.$ac_ext <<_ACEOF
20317/* end confdefs.h. */
20318
20319/* Override any gcc2 internal prototype to avoid an error. */
20320#ifdef __cplusplus
20321extern "C"
20322#endif
20323/* We use char because int might match the return type of a gcc2
20324 builtin and then its argument prototype would still apply. */
20325char readline ();
20326int
20327main ()
20328{
20329readline ();
20330 ;
20331 return 0;
20332}
20333_ACEOF
20334rm -f conftest.$ac_objext conftest$ac_exeext
20335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20336 (eval $ac_link) 2>conftest.er1
20337 ac_status=$?
20338 grep -v '^ *+' conftest.er1 >conftest.err
20339 rm -f conftest.er1
20340 cat conftest.err >&5
20341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20342 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020343 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20345 (eval $ac_try) 2>&5
20346 ac_status=$?
20347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20348 (exit $ac_status); }; } &&
20349 { ac_try='test -s conftest$ac_exeext'
20350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20351 (eval $ac_try) 2>&5
20352 ac_status=$?
20353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20354 (exit $ac_status); }; }; then
20355 ac_cv_lib_termcap_readline=yes
20356else
20357 echo "$as_me: failed program was:" >&5
20358sed 's/^/| /' conftest.$ac_ext >&5
20359
20360ac_cv_lib_termcap_readline=no
20361fi
20362rm -f conftest.err conftest.$ac_objext \
20363 conftest$ac_exeext conftest.$ac_ext
20364LIBS=$ac_check_lib_save_LIBS
20365fi
20366echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
20367echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
20368if test $ac_cv_lib_termcap_readline = yes; then
20369 cat >>confdefs.h <<_ACEOF
20370#define HAVE_LIBTERMCAP 1
20371_ACEOF
20372
20373 LIBS="-ltermcap $LIBS"
20374
20375fi
20376
20377fi
20378
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020379# check for readline 2.1
20380echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
20381echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
20382if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
20383 echo $ECHO_N "(cached) $ECHO_C" >&6
20384else
20385 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020386LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020387cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020388/* confdefs.h. */
20389_ACEOF
20390cat confdefs.h >>conftest.$ac_ext
20391cat >>conftest.$ac_ext <<_ACEOF
20392/* end confdefs.h. */
20393
20394/* Override any gcc2 internal prototype to avoid an error. */
20395#ifdef __cplusplus
20396extern "C"
20397#endif
20398/* We use char because int might match the return type of a gcc2
20399 builtin and then its argument prototype would still apply. */
20400char rl_callback_handler_install ();
20401int
20402main ()
20403{
20404rl_callback_handler_install ();
20405 ;
20406 return 0;
20407}
20408_ACEOF
20409rm -f conftest.$ac_objext conftest$ac_exeext
20410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020411 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020413 grep -v '^ *+' conftest.er1 >conftest.err
20414 rm -f conftest.er1
20415 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20417 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020418 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20420 (eval $ac_try) 2>&5
20421 ac_status=$?
20422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20423 (exit $ac_status); }; } &&
20424 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20426 (eval $ac_try) 2>&5
20427 ac_status=$?
20428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20429 (exit $ac_status); }; }; then
20430 ac_cv_lib_readline_rl_callback_handler_install=yes
20431else
20432 echo "$as_me: failed program was:" >&5
20433sed 's/^/| /' conftest.$ac_ext >&5
20434
20435ac_cv_lib_readline_rl_callback_handler_install=no
20436fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020437rm -f conftest.err conftest.$ac_objext \
20438 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020439LIBS=$ac_check_lib_save_LIBS
20440fi
20441echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
20442echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
20443if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
20444
20445cat >>confdefs.h <<\_ACEOF
20446#define HAVE_RL_CALLBACK 1
20447_ACEOF
20448
20449fi
20450
20451
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020452# check for readline 2.2
20453cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020454/* confdefs.h. */
20455_ACEOF
20456cat confdefs.h >>conftest.$ac_ext
20457cat >>conftest.$ac_ext <<_ACEOF
20458/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020459#include <readline/readline.h>
20460_ACEOF
20461if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20462 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20463 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020464 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020465 rm -f conftest.er1
20466 cat conftest.err >&5
20467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20468 (exit $ac_status); } >/dev/null; then
20469 if test -s conftest.err; then
20470 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020471 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020472 else
20473 ac_cpp_err=
20474 fi
20475else
20476 ac_cpp_err=yes
20477fi
20478if test -z "$ac_cpp_err"; then
20479 have_readline=yes
20480else
20481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020482sed 's/^/| /' conftest.$ac_ext >&5
20483
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020484 have_readline=no
20485fi
20486rm -f conftest.err conftest.$ac_ext
20487if test $have_readline = yes
20488then
20489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020490/* confdefs.h. */
20491_ACEOF
20492cat confdefs.h >>conftest.$ac_ext
20493cat >>conftest.$ac_ext <<_ACEOF
20494/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020495#include <readline/readline.h>
20496
20497_ACEOF
20498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000020499 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020500
20501cat >>confdefs.h <<\_ACEOF
20502#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
20503_ACEOF
20504
20505fi
20506rm -f conftest*
20507
20508fi
20509
Martin v. Löwis0daad592001-09-30 21:09:59 +000020510# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000020511echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
20512echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
20513if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
20514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000020515else
Martin v. Löwis11437992002-04-12 09:54:03 +000020516 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020517LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020519/* confdefs.h. */
20520_ACEOF
20521cat confdefs.h >>conftest.$ac_ext
20522cat >>conftest.$ac_ext <<_ACEOF
20523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020524
Guido van Rossum353ae582001-07-10 16:45:32 +000020525/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020526#ifdef __cplusplus
20527extern "C"
20528#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000020529/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020530 builtin and then its argument prototype would still apply. */
20531char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020532int
20533main ()
20534{
20535rl_pre_input_hook ();
20536 ;
20537 return 0;
20538}
20539_ACEOF
20540rm -f conftest.$ac_objext conftest$ac_exeext
20541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020542 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020544 grep -v '^ *+' conftest.er1 >conftest.err
20545 rm -f conftest.er1
20546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20548 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020549 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20551 (eval $ac_try) 2>&5
20552 ac_status=$?
20553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20554 (exit $ac_status); }; } &&
20555 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20557 (eval $ac_try) 2>&5
20558 ac_status=$?
20559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20560 (exit $ac_status); }; }; then
20561 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000020562else
Martin v. Löwis11437992002-04-12 09:54:03 +000020563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020564sed 's/^/| /' conftest.$ac_ext >&5
20565
Martin v. Löwis11437992002-04-12 09:54:03 +000020566ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000020567fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020568rm -f conftest.err conftest.$ac_objext \
20569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020570LIBS=$ac_check_lib_save_LIBS
20571fi
20572echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
20573echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
20574if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020575
Martin v. Löwis11437992002-04-12 09:54:03 +000020576cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020577#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020578_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020579
Martin v. Löwis0daad592001-09-30 21:09:59 +000020580fi
20581
Michael W. Hudson54241132001-12-07 15:38:26 +000020582
Martin v. Löwis0daad592001-09-30 21:09:59 +000020583# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000020584echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
20585echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
20586if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
20587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000020588else
Martin v. Löwis11437992002-04-12 09:54:03 +000020589 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020590LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020592/* confdefs.h. */
20593_ACEOF
20594cat confdefs.h >>conftest.$ac_ext
20595cat >>conftest.$ac_ext <<_ACEOF
20596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020597
Martin v. Löwis0daad592001-09-30 21:09:59 +000020598/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020599#ifdef __cplusplus
20600extern "C"
20601#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000020602/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020603 builtin and then its argument prototype would still apply. */
20604char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020605int
20606main ()
20607{
20608rl_completion_matches ();
20609 ;
20610 return 0;
20611}
20612_ACEOF
20613rm -f conftest.$ac_objext conftest$ac_exeext
20614if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020615 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020617 grep -v '^ *+' conftest.er1 >conftest.err
20618 rm -f conftest.er1
20619 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20621 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020622 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20624 (eval $ac_try) 2>&5
20625 ac_status=$?
20626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20627 (exit $ac_status); }; } &&
20628 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20630 (eval $ac_try) 2>&5
20631 ac_status=$?
20632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20633 (exit $ac_status); }; }; then
20634 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000020635else
Martin v. Löwis11437992002-04-12 09:54:03 +000020636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020637sed 's/^/| /' conftest.$ac_ext >&5
20638
Martin v. Löwis11437992002-04-12 09:54:03 +000020639ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000020640fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020641rm -f conftest.err conftest.$ac_objext \
20642 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020643LIBS=$ac_check_lib_save_LIBS
20644fi
20645echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
20646echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
20647if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020648
Martin v. Löwis11437992002-04-12 09:54:03 +000020649cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020650#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020651_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020652
Guido van Rossum353ae582001-07-10 16:45:32 +000020653fi
20654
Jack Jansendd19cf82001-12-06 22:36:17 +000020655
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020656# also in readline 4.2
20657cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020658/* confdefs.h. */
20659_ACEOF
20660cat confdefs.h >>conftest.$ac_ext
20661cat >>conftest.$ac_ext <<_ACEOF
20662/* end confdefs.h. */
20663#include <readline/readline.h>
20664_ACEOF
20665if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20666 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20667 ac_status=$?
20668 grep -v '^ *+' conftest.er1 >conftest.err
20669 rm -f conftest.er1
20670 cat conftest.err >&5
20671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20672 (exit $ac_status); } >/dev/null; then
20673 if test -s conftest.err; then
20674 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020675 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020676 else
20677 ac_cpp_err=
20678 fi
20679else
20680 ac_cpp_err=yes
20681fi
20682if test -z "$ac_cpp_err"; then
20683 have_readline=yes
20684else
20685 echo "$as_me: failed program was:" >&5
20686sed 's/^/| /' conftest.$ac_ext >&5
20687
20688 have_readline=no
20689fi
20690rm -f conftest.err conftest.$ac_ext
20691if test $have_readline = yes
20692then
20693 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020694/* confdefs.h. */
20695_ACEOF
20696cat confdefs.h >>conftest.$ac_ext
20697cat >>conftest.$ac_ext <<_ACEOF
20698/* end confdefs.h. */
20699#include <readline/readline.h>
20700
20701_ACEOF
20702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20703 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
20704
20705cat >>confdefs.h <<\_ACEOF
20706#define HAVE_RL_CATCH_SIGNAL 1
20707_ACEOF
20708
20709fi
20710rm -f conftest*
20711
20712fi
20713
Martin v. Löwis82bca632006-02-10 20:49:30 +000020714# End of readline checks: restore LIBS
20715LIBS=$LIBS_no_readline
20716
Martin v. Löwis11437992002-04-12 09:54:03 +000020717echo "$as_me:$LINENO: checking for broken nice()" >&5
20718echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
20719if test "${ac_cv_broken_nice+set}" = set; then
20720 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020721else
Martin v. Löwis11437992002-04-12 09:54:03 +000020722
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020723if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020724 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020725else
Martin v. Löwis11437992002-04-12 09:54:03 +000020726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020727/* confdefs.h. */
20728_ACEOF
20729cat confdefs.h >>conftest.$ac_ext
20730cat >>conftest.$ac_ext <<_ACEOF
20731/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020732
20733int main()
20734{
20735 int val1 = nice(1);
20736 if (val1 != -1 && val1 == nice(2))
20737 exit(0);
20738 exit(1);
20739}
20740
Martin v. Löwis11437992002-04-12 09:54:03 +000020741_ACEOF
20742rm -f conftest$ac_exeext
20743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20744 (eval $ac_link) 2>&5
20745 ac_status=$?
20746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20749 (eval $ac_try) 2>&5
20750 ac_status=$?
20751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20752 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020753 ac_cv_broken_nice=yes
20754else
Martin v. Löwis11437992002-04-12 09:54:03 +000020755 echo "$as_me: program exited with status $ac_status" >&5
20756echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020757sed 's/^/| /' conftest.$ac_ext >&5
20758
Martin v. Löwis11437992002-04-12 09:54:03 +000020759( exit $ac_status )
20760ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020761fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020762rm -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 +000020763fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020764fi
20765
Martin v. Löwis11437992002-04-12 09:54:03 +000020766echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
20767echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020768if test "$ac_cv_broken_nice" = yes
20769then
Martin v. Löwis11437992002-04-12 09:54:03 +000020770
20771cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020772#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020773_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020774
20775fi
20776
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020777echo "$as_me:$LINENO: checking for broken poll()" >&5
20778echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
20779if test "$cross_compiling" = yes; then
20780 ac_cv_broken_poll=no
20781else
20782 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020783/* confdefs.h. */
20784_ACEOF
20785cat confdefs.h >>conftest.$ac_ext
20786cat >>conftest.$ac_ext <<_ACEOF
20787/* end confdefs.h. */
20788
20789#include <poll.h>
20790
20791int main (void)
20792 {
20793 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
20794
20795 close (42);
20796
20797 int poll_test = poll (&poll_struct, 1, 0);
20798
20799 if (poll_test < 0)
20800 {
20801 exit(0);
20802 }
20803 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
20804 {
20805 exit(0);
20806 }
20807 else
20808 {
20809 exit(1);
20810 }
20811 }
20812
20813_ACEOF
20814rm -f conftest$ac_exeext
20815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20816 (eval $ac_link) 2>&5
20817 ac_status=$?
20818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20819 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20821 (eval $ac_try) 2>&5
20822 ac_status=$?
20823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20824 (exit $ac_status); }; }; then
20825 ac_cv_broken_poll=yes
20826else
20827 echo "$as_me: program exited with status $ac_status" >&5
20828echo "$as_me: failed program was:" >&5
20829sed 's/^/| /' conftest.$ac_ext >&5
20830
20831( exit $ac_status )
20832ac_cv_broken_poll=no
20833fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020834rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020835fi
20836echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
20837echo "${ECHO_T}$ac_cv_broken_poll" >&6
20838if test "$ac_cv_broken_poll" = yes
20839then
20840
20841cat >>confdefs.h <<\_ACEOF
20842#define HAVE_BROKEN_POLL 1
20843_ACEOF
20844
20845fi
20846
Brett Cannon43802422005-02-10 20:48:03 +000020847# 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 +000020848# (which is not required by ISO C or UNIX spec) and/or if we support
20849# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000020850echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20851echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20852if test "${ac_cv_member_struct_tm_tm_zone+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/types.h>
20862#include <$ac_cv_struct_tm>
20863
20864
20865int
20866main ()
20867{
20868static struct tm ac_aggr;
20869if (ac_aggr.tm_zone)
20870return 0;
20871 ;
20872 return 0;
20873}
20874_ACEOF
20875rm -f conftest.$ac_objext
20876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20877 (eval $ac_compile) 2>conftest.er1
20878 ac_status=$?
20879 grep -v '^ *+' conftest.er1 >conftest.err
20880 rm -f conftest.er1
20881 cat conftest.err >&5
20882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20883 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020884 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Brett Cannon43802422005-02-10 20:48:03 +000020885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20886 (eval $ac_try) 2>&5
20887 ac_status=$?
20888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20889 (exit $ac_status); }; } &&
20890 { ac_try='test -s conftest.$ac_objext'
20891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20892 (eval $ac_try) 2>&5
20893 ac_status=$?
20894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20895 (exit $ac_status); }; }; then
20896 ac_cv_member_struct_tm_tm_zone=yes
20897else
20898 echo "$as_me: failed program was:" >&5
20899sed 's/^/| /' conftest.$ac_ext >&5
20900
20901cat >conftest.$ac_ext <<_ACEOF
20902/* confdefs.h. */
20903_ACEOF
20904cat confdefs.h >>conftest.$ac_ext
20905cat >>conftest.$ac_ext <<_ACEOF
20906/* end confdefs.h. */
20907#include <sys/types.h>
20908#include <$ac_cv_struct_tm>
20909
20910
20911int
20912main ()
20913{
20914static struct tm ac_aggr;
20915if (sizeof ac_aggr.tm_zone)
20916return 0;
20917 ;
20918 return 0;
20919}
20920_ACEOF
20921rm -f conftest.$ac_objext
20922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20923 (eval $ac_compile) 2>conftest.er1
20924 ac_status=$?
20925 grep -v '^ *+' conftest.er1 >conftest.err
20926 rm -f conftest.er1
20927 cat conftest.err >&5
20928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20929 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020930 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Brett Cannon43802422005-02-10 20:48:03 +000020931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20932 (eval $ac_try) 2>&5
20933 ac_status=$?
20934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20935 (exit $ac_status); }; } &&
20936 { ac_try='test -s conftest.$ac_objext'
20937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20938 (eval $ac_try) 2>&5
20939 ac_status=$?
20940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20941 (exit $ac_status); }; }; then
20942 ac_cv_member_struct_tm_tm_zone=yes
20943else
20944 echo "$as_me: failed program was:" >&5
20945sed 's/^/| /' conftest.$ac_ext >&5
20946
20947ac_cv_member_struct_tm_tm_zone=no
20948fi
20949rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20950fi
20951rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20952fi
20953echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20954echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20955if test $ac_cv_member_struct_tm_tm_zone = yes; then
20956
20957cat >>confdefs.h <<_ACEOF
20958#define HAVE_STRUCT_TM_TM_ZONE 1
20959_ACEOF
20960
20961
20962fi
20963
20964if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20965
20966cat >>confdefs.h <<\_ACEOF
20967#define HAVE_TM_ZONE 1
20968_ACEOF
20969
20970else
20971 echo "$as_me:$LINENO: checking for tzname" >&5
20972echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20973if test "${ac_cv_var_tzname+set}" = set; then
20974 echo $ECHO_N "(cached) $ECHO_C" >&6
20975else
20976 cat >conftest.$ac_ext <<_ACEOF
20977/* confdefs.h. */
20978_ACEOF
20979cat confdefs.h >>conftest.$ac_ext
20980cat >>conftest.$ac_ext <<_ACEOF
20981/* end confdefs.h. */
20982#include <time.h>
20983#ifndef tzname /* For SGI. */
20984extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20985#endif
20986
20987int
20988main ()
20989{
20990atoi(*tzname);
20991 ;
20992 return 0;
20993}
20994_ACEOF
20995rm -f conftest.$ac_objext conftest$ac_exeext
20996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20997 (eval $ac_link) 2>conftest.er1
20998 ac_status=$?
20999 grep -v '^ *+' conftest.er1 >conftest.err
21000 rm -f conftest.er1
21001 cat conftest.err >&5
21002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21003 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021004 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Brett Cannon43802422005-02-10 20:48:03 +000021005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21006 (eval $ac_try) 2>&5
21007 ac_status=$?
21008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21009 (exit $ac_status); }; } &&
21010 { ac_try='test -s conftest$ac_exeext'
21011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21012 (eval $ac_try) 2>&5
21013 ac_status=$?
21014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21015 (exit $ac_status); }; }; then
21016 ac_cv_var_tzname=yes
21017else
21018 echo "$as_me: failed program was:" >&5
21019sed 's/^/| /' conftest.$ac_ext >&5
21020
21021ac_cv_var_tzname=no
21022fi
21023rm -f conftest.err conftest.$ac_objext \
21024 conftest$ac_exeext conftest.$ac_ext
21025fi
21026echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21027echo "${ECHO_T}$ac_cv_var_tzname" >&6
21028 if test $ac_cv_var_tzname = yes; then
21029
21030cat >>confdefs.h <<\_ACEOF
21031#define HAVE_TZNAME 1
21032_ACEOF
21033
21034 fi
21035fi
21036
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021037
Martin v. Löwis1d459062005-03-14 21:23:33 +000021038# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021039echo "$as_me:$LINENO: checking for working tzset()" >&5
21040echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
21041if test "${ac_cv_working_tzset+set}" = set; then
21042 echo $ECHO_N "(cached) $ECHO_C" >&6
21043else
21044
21045if test "$cross_compiling" = yes; then
21046 ac_cv_working_tzset=no
21047else
21048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021049/* confdefs.h. */
21050_ACEOF
21051cat confdefs.h >>conftest.$ac_ext
21052cat >>conftest.$ac_ext <<_ACEOF
21053/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021054
21055#include <stdlib.h>
21056#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000021057#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000021058
21059#if HAVE_TZNAME
21060extern char *tzname[];
21061#endif
21062
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021063int main()
21064{
Brett Cannon18367812003-09-19 00:59:16 +000021065 /* Note that we need to ensure that not only does tzset(3)
21066 do 'something' with localtime, but it works as documented
21067 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000021068 This includes making sure that tzname is set properly if
21069 tm->tm_zone does not exist since it is the alternative way
21070 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000021071
21072 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000021073 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000021074 */
21075
Martin v. Löwis1d459062005-03-14 21:23:33 +000021076 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000021077 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
21078
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021079 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021080 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021081 if (localtime(&groundhogday)->tm_hour != 0)
21082 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021083#if HAVE_TZNAME
21084 /* For UTC, tzname[1] is sometimes "", sometimes " " */
21085 if (strcmp(tzname[0], "UTC") ||
21086 (tzname[1][0] != 0 && tzname[1][0] != ' '))
21087 exit(1);
21088#endif
Brett Cannon18367812003-09-19 00:59:16 +000021089
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021090 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021091 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021092 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021093 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021094#if HAVE_TZNAME
21095 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
21096 exit(1);
21097#endif
Brett Cannon18367812003-09-19 00:59:16 +000021098
21099 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
21100 tzset();
21101 if (localtime(&groundhogday)->tm_hour != 11)
21102 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021103#if HAVE_TZNAME
21104 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
21105 exit(1);
21106#endif
21107
21108#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000021109 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
21110 exit(1);
21111 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
21112 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021113#endif
Brett Cannon18367812003-09-19 00:59:16 +000021114
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021115 exit(0);
21116}
21117
21118_ACEOF
21119rm -f conftest$ac_exeext
21120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21121 (eval $ac_link) 2>&5
21122 ac_status=$?
21123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21124 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21126 (eval $ac_try) 2>&5
21127 ac_status=$?
21128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21129 (exit $ac_status); }; }; then
21130 ac_cv_working_tzset=yes
21131else
21132 echo "$as_me: program exited with status $ac_status" >&5
21133echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021134sed 's/^/| /' conftest.$ac_ext >&5
21135
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021136( exit $ac_status )
21137ac_cv_working_tzset=no
21138fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021139rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021140fi
21141fi
21142
21143echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
21144echo "${ECHO_T}$ac_cv_working_tzset" >&6
21145if test "$ac_cv_working_tzset" = yes
21146then
21147
21148cat >>confdefs.h <<\_ACEOF
21149#define HAVE_WORKING_TZSET 1
21150_ACEOF
21151
21152fi
21153
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021154# Look for subsecond timestamps in struct stat
21155echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
21156echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
21157if test "${ac_cv_stat_tv_nsec+set}" = set; then
21158 echo $ECHO_N "(cached) $ECHO_C" >&6
21159else
21160 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021161/* confdefs.h. */
21162_ACEOF
21163cat confdefs.h >>conftest.$ac_ext
21164cat >>conftest.$ac_ext <<_ACEOF
21165/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021166#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021167int
21168main ()
21169{
21170
21171struct stat st;
21172st.st_mtim.tv_nsec = 1;
21173
21174 ;
21175 return 0;
21176}
21177_ACEOF
21178rm -f conftest.$ac_objext
21179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021180 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021182 grep -v '^ *+' conftest.er1 >conftest.err
21183 rm -f conftest.er1
21184 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21186 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021187 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21189 (eval $ac_try) 2>&5
21190 ac_status=$?
21191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21192 (exit $ac_status); }; } &&
21193 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21195 (eval $ac_try) 2>&5
21196 ac_status=$?
21197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21198 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000021199 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021200else
21201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021202sed 's/^/| /' conftest.$ac_ext >&5
21203
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021204ac_cv_stat_tv_nsec=no
21205fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021206rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021207fi
21208
21209echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
21210echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
21211if test "$ac_cv_stat_tv_nsec" = yes
21212then
21213
21214cat >>confdefs.h <<\_ACEOF
21215#define HAVE_STAT_TV_NSEC 1
21216_ACEOF
21217
21218fi
21219
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021220# Look for BSD style subsecond timestamps in struct stat
21221echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
21222echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
21223if test "${ac_cv_stat_tv_nsec2+set}" = set; then
21224 echo $ECHO_N "(cached) $ECHO_C" >&6
21225else
21226 cat >conftest.$ac_ext <<_ACEOF
21227/* confdefs.h. */
21228_ACEOF
21229cat confdefs.h >>conftest.$ac_ext
21230cat >>conftest.$ac_ext <<_ACEOF
21231/* end confdefs.h. */
21232#include <sys/stat.h>
21233int
21234main ()
21235{
21236
21237struct stat st;
21238st.st_mtimespec.tv_nsec = 1;
21239
21240 ;
21241 return 0;
21242}
21243_ACEOF
21244rm -f conftest.$ac_objext
21245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21246 (eval $ac_compile) 2>conftest.er1
21247 ac_status=$?
21248 grep -v '^ *+' conftest.er1 >conftest.err
21249 rm -f conftest.er1
21250 cat conftest.err >&5
21251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21252 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021253 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21255 (eval $ac_try) 2>&5
21256 ac_status=$?
21257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21258 (exit $ac_status); }; } &&
21259 { ac_try='test -s conftest.$ac_objext'
21260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21261 (eval $ac_try) 2>&5
21262 ac_status=$?
21263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21264 (exit $ac_status); }; }; then
21265 ac_cv_stat_tv_nsec2=yes
21266else
21267 echo "$as_me: failed program was:" >&5
21268sed 's/^/| /' conftest.$ac_ext >&5
21269
21270ac_cv_stat_tv_nsec2=no
21271fi
21272rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21273fi
21274
21275echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
21276echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
21277if test "$ac_cv_stat_tv_nsec2" = yes
21278then
21279
21280cat >>confdefs.h <<\_ACEOF
21281#define HAVE_STAT_TV_NSEC2 1
21282_ACEOF
21283
21284fi
21285
Jack Jansen666b1e72001-10-31 12:11:48 +000021286# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000021287echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
21288echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
21289if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
21290 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021291else
Martin v. Löwis11437992002-04-12 09:54:03 +000021292 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021293/* confdefs.h. */
21294_ACEOF
21295cat confdefs.h >>conftest.$ac_ext
21296cat >>conftest.$ac_ext <<_ACEOF
21297/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000021298#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021299int
21300main ()
21301{
Jack Jansen666b1e72001-10-31 12:11:48 +000021302
21303 int rtn;
21304 rtn = mvwdelch(0,0,0);
21305
Martin v. Löwis11437992002-04-12 09:54:03 +000021306 ;
21307 return 0;
21308}
21309_ACEOF
21310rm -f conftest.$ac_objext
21311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021312 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021314 grep -v '^ *+' conftest.er1 >conftest.err
21315 rm -f conftest.er1
21316 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21318 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021319 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21321 (eval $ac_try) 2>&5
21322 ac_status=$?
21323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21324 (exit $ac_status); }; } &&
21325 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21327 (eval $ac_try) 2>&5
21328 ac_status=$?
21329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21330 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021331 ac_cv_mvwdelch_is_expression=yes
21332else
Martin v. Löwis11437992002-04-12 09:54:03 +000021333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021334sed 's/^/| /' conftest.$ac_ext >&5
21335
Martin v. Löwis11437992002-04-12 09:54:03 +000021336ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021337fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021338rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021339fi
21340
Martin v. Löwis11437992002-04-12 09:54:03 +000021341echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
21342echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021343
21344if test "$ac_cv_mvwdelch_is_expression" = yes
21345then
Martin v. Löwis11437992002-04-12 09:54:03 +000021346
21347cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021348#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021349_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021350
21351fi
21352
Martin v. Löwis11437992002-04-12 09:54:03 +000021353echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
21354echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
21355if test "${ac_cv_window_has_flags+set}" = set; then
21356 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021357else
Martin v. Löwis11437992002-04-12 09:54:03 +000021358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021359/* confdefs.h. */
21360_ACEOF
21361cat confdefs.h >>conftest.$ac_ext
21362cat >>conftest.$ac_ext <<_ACEOF
21363/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000021364#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021365int
21366main ()
21367{
Jack Jansen666b1e72001-10-31 12:11:48 +000021368
21369 WINDOW *w;
21370 w->_flags = 0;
21371
Martin v. Löwis11437992002-04-12 09:54:03 +000021372 ;
21373 return 0;
21374}
21375_ACEOF
21376rm -f conftest.$ac_objext
21377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021378 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021380 grep -v '^ *+' conftest.er1 >conftest.err
21381 rm -f conftest.er1
21382 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21384 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021385 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21387 (eval $ac_try) 2>&5
21388 ac_status=$?
21389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21390 (exit $ac_status); }; } &&
21391 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21393 (eval $ac_try) 2>&5
21394 ac_status=$?
21395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21396 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021397 ac_cv_window_has_flags=yes
21398else
Martin v. Löwis11437992002-04-12 09:54:03 +000021399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021400sed 's/^/| /' conftest.$ac_ext >&5
21401
Martin v. Löwis11437992002-04-12 09:54:03 +000021402ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021403fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021404rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021405fi
21406
Martin v. Löwis11437992002-04-12 09:54:03 +000021407echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
21408echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021409
Jack Jansen666b1e72001-10-31 12:11:48 +000021410
21411if test "$ac_cv_window_has_flags" = yes
21412then
Martin v. Löwis11437992002-04-12 09:54:03 +000021413
21414cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021415#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021416_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021417
21418fi
21419
Martin v. Löwis24a880b2002-12-31 12:55:15 +000021420echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
21421echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
21422
21423if test -e /dev/ptmx
21424then
21425 echo "$as_me:$LINENO: result: yes" >&5
21426echo "${ECHO_T}yes" >&6
21427
21428cat >>confdefs.h <<\_ACEOF
21429#define HAVE_DEV_PTMX 1
21430_ACEOF
21431
21432else
21433 echo "$as_me:$LINENO: result: no" >&5
21434echo "${ECHO_T}no" >&6
21435fi
21436
Neal Norwitz865400f2003-03-21 01:42:58 +000021437echo "$as_me:$LINENO: checking for /dev/ptc" >&5
21438echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
21439
21440if test -e /dev/ptc
21441then
21442 echo "$as_me:$LINENO: result: yes" >&5
21443echo "${ECHO_T}yes" >&6
21444
21445cat >>confdefs.h <<\_ACEOF
21446#define HAVE_DEV_PTC 1
21447_ACEOF
21448
21449else
21450 echo "$as_me:$LINENO: result: no" >&5
21451echo "${ECHO_T}no" >&6
21452fi
21453
Martin v. Löwis11437992002-04-12 09:54:03 +000021454echo "$as_me:$LINENO: checking for socklen_t" >&5
21455echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
21456if test "${ac_cv_type_socklen_t+set}" = set; then
21457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000021458else
Martin v. Löwis11437992002-04-12 09:54:03 +000021459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021460/* confdefs.h. */
21461_ACEOF
21462cat confdefs.h >>conftest.$ac_ext
21463cat >>conftest.$ac_ext <<_ACEOF
21464/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000021465
21466#ifdef HAVE_SYS_TYPES_H
21467#include <sys/types.h>
21468#endif
21469#ifdef HAVE_SYS_SOCKET_H
21470#include <sys/socket.h>
21471#endif
21472
21473
Martin v. Löwis11437992002-04-12 09:54:03 +000021474int
21475main ()
21476{
21477if ((socklen_t *) 0)
21478 return 0;
21479if (sizeof (socklen_t))
21480 return 0;
21481 ;
21482 return 0;
21483}
21484_ACEOF
21485rm -f conftest.$ac_objext
21486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021487 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021489 grep -v '^ *+' conftest.er1 >conftest.err
21490 rm -f conftest.er1
21491 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21493 (exit $ac_status); } &&
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021494 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21496 (eval $ac_try) 2>&5
21497 ac_status=$?
21498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21499 (exit $ac_status); }; } &&
21500 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21502 (eval $ac_try) 2>&5
21503 ac_status=$?
21504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21505 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000021506 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000021507else
Martin v. Löwis11437992002-04-12 09:54:03 +000021508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021509sed 's/^/| /' conftest.$ac_ext >&5
21510
Martin v. Löwis11437992002-04-12 09:54:03 +000021511ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000021512fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021513rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021514fi
21515echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
21516echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
21517if test $ac_cv_type_socklen_t = yes; then
21518 :
21519else
Guido van Rossum95713eb2000-05-18 20:53:31 +000021520
Martin v. Löwis01c04012002-11-11 14:58:44 +000021521cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021522#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000021523_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021524
21525fi
21526
Michael W. Hudson54241132001-12-07 15:38:26 +000021527
Michael W. Hudson54241132001-12-07 15:38:26 +000021528
21529
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000021530for h in `(cd $srcdir;echo Python/thread_*.h)`
21531do
21532 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
21533done
21534
Michael W. Hudson54241132001-12-07 15:38:26 +000021535
Neal Norwitzd24499d2005-12-18 21:36:39 +000021536SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwis11437992002-04-12 09:54:03 +000021537echo "$as_me:$LINENO: checking for build directories" >&5
21538echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021539for dir in $SRCDIRS; do
21540 if test ! -d $dir; then
21541 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000021542 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021543done
Martin v. Löwis11437992002-04-12 09:54:03 +000021544echo "$as_me:$LINENO: result: done" >&5
21545echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000021546
Guido van Rossum627b2d71993-12-24 10:39:16 +000021547# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000021548 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000021549
Martin v. Löwis11437992002-04-12 09:54:03 +000021550cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021551# This file is a shell script that caches the results of configure
21552# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000021553# scripts and configure runs, see configure's option --config-cache.
21554# It is not useful on other systems. If it contains results you don't
21555# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021556#
Martin v. Löwis11437992002-04-12 09:54:03 +000021557# config.status only pays attention to the cache file if you give it
21558# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021559#
Skip Montanaro6dead952003-09-25 14:50:04 +000021560# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000021561# loading this file, other *unset* `ac_cv_foo' will be assigned the
21562# following values.
21563
21564_ACEOF
21565
Guido van Rossumf78abae1997-01-21 22:02:36 +000021566# The following way of writing the cache mishandles newlines in values,
21567# but we know of no workaround that is simple, portable, and efficient.
21568# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021569# Ultrix sh set writes to stderr and can't be redirected directly,
21570# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000021571{
21572 (set) 2>&1 |
21573 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21574 *ac_space=\ *)
21575 # `set' does not quote correctly, so add quotes (double-quote
21576 # substitution turns \\\\ into \\, and sed turns \\ into \).
21577 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021578 "s/'/'\\\\''/g;
21579 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021580 ;;
21581 *)
21582 # `set' quotes correctly as required by POSIX, so do not add quotes.
21583 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021584 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021585 ;;
21586 esac;
21587} |
21588 sed '
21589 t clear
21590 : clear
21591 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21592 t end
21593 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21594 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000021595if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021596 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021597 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21598 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021599 else
21600 echo "not updating unwritable cache $cache_file"
21601 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021602fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021603rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000021604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021605test "x$prefix" = xNONE && prefix=$ac_default_prefix
21606# Let make expand exec_prefix.
21607test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000021608
Martin v. Löwis11437992002-04-12 09:54:03 +000021609# VPATH may cause trouble with some makes, so we remove $(srcdir),
21610# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21611# trailing colons and then remove the whole line if VPATH becomes empty
21612# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000021613if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021614 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000021615s/:*\$(srcdir):*/:/;
21616s/:*\${srcdir}:*/:/;
21617s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021618s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000021619s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021620s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000021621}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021622fi
21623
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021624DEFS=-DHAVE_CONFIG_H
21625
Skip Montanaro6dead952003-09-25 14:50:04 +000021626ac_libobjs=
21627ac_ltlibobjs=
21628for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21629 # 1. Remove the extension, and $U if already installed.
21630 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021631 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021632 # 2. Add them.
21633 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21634 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21635done
21636LIBOBJS=$ac_libobjs
21637
21638LTLIBOBJS=$ac_ltlibobjs
21639
21640
Martin v. Löwis11437992002-04-12 09:54:03 +000021641
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021642: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000021643ac_clean_files_save=$ac_clean_files
21644ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21645{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21646echo "$as_me: creating $CONFIG_STATUS" >&6;}
21647cat >$CONFIG_STATUS <<_ACEOF
21648#! $SHELL
21649# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021650# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021651# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000021652# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021653
Martin v. Löwis11437992002-04-12 09:54:03 +000021654debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000021655ac_cs_recheck=false
21656ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021657SHELL=\${CONFIG_SHELL-$SHELL}
21658_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000021659
Martin v. Löwis11437992002-04-12 09:54:03 +000021660cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021661## --------------------- ##
21662## M4sh Initialization. ##
21663## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000021664
Martin v. Löwis11437992002-04-12 09:54:03 +000021665# Be Bourne compatible
21666if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21667 emulate sh
21668 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021669 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21670 # is contrary to our usage. Disable this feature.
21671 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021672elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21673 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000021674fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021675DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000021676
Martin v. Löwis11437992002-04-12 09:54:03 +000021677# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021678if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021679 as_unset=unset
21680else
21681 as_unset=false
21682fi
Michael W. Hudson54241132001-12-07 15:38:26 +000021683
Skip Montanaro6dead952003-09-25 14:50:04 +000021684
21685# Work around bugs in pre-3.0 UWIN ksh.
21686$as_unset ENV MAIL MAILPATH
21687PS1='$ '
21688PS2='> '
21689PS4='+ '
21690
21691# NLS nuisances.
21692for as_var in \
21693 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21694 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21695 LC_TELEPHONE LC_TIME
21696do
Skip Montanarof0d5f792004-08-15 14:08:23 +000021697 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000021698 eval $as_var=C; export $as_var
21699 else
21700 $as_unset $as_var
21701 fi
21702done
21703
21704# Required to use basename.
21705if expr a : '\(a\)' >/dev/null 2>&1; then
21706 as_expr=expr
21707else
21708 as_expr=false
21709fi
21710
21711if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
21712 as_basename=basename
21713else
21714 as_basename=false
21715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021716
21717
21718# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000021719as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021720$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21721 X"$0" : 'X\(//\)$' \| \
21722 X"$0" : 'X\(/\)$' \| \
21723 . : '\(.\)' 2>/dev/null ||
21724echo X/"$0" |
21725 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21726 /^X\/\(\/\/\)$/{ s//\1/; q; }
21727 /^X\/\(\/\).*/{ s//\1/; q; }
21728 s/.*/./; q'`
21729
Skip Montanaro6dead952003-09-25 14:50:04 +000021730
Martin v. Löwis11437992002-04-12 09:54:03 +000021731# PATH needs CR, and LINENO needs CR and PATH.
21732# Avoid depending upon Character Ranges.
21733as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21734as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21735as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21736as_cr_digits='0123456789'
21737as_cr_alnum=$as_cr_Letters$as_cr_digits
21738
21739# The user is always right.
21740if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021741 echo "#! /bin/sh" >conf$$.sh
21742 echo "exit 0" >>conf$$.sh
21743 chmod +x conf$$.sh
21744 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021745 PATH_SEPARATOR=';'
21746 else
21747 PATH_SEPARATOR=:
21748 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021749 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000021750fi
21751
21752
21753 as_lineno_1=$LINENO
21754 as_lineno_2=$LINENO
21755 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21756 test "x$as_lineno_1" != "x$as_lineno_2" &&
21757 test "x$as_lineno_3" = "x$as_lineno_2" || {
21758 # Find who we are. Look in the path if we contain no path at all
21759 # relative or not.
21760 case $0 in
21761 *[\\/]* ) as_myself=$0 ;;
21762 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21763for as_dir in $PATH
21764do
21765 IFS=$as_save_IFS
21766 test -z "$as_dir" && as_dir=.
21767 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21768done
21769
21770 ;;
21771 esac
21772 # We did not find ourselves, most probably we were run as `sh COMMAND'
21773 # in which case we are not to be found in the path.
21774 if test "x$as_myself" = x; then
21775 as_myself=$0
21776 fi
21777 if test ! -f "$as_myself"; then
21778 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21779echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21780 { (exit 1); exit 1; }; }
21781 fi
21782 case $CONFIG_SHELL in
21783 '')
21784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21785for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21786do
21787 IFS=$as_save_IFS
21788 test -z "$as_dir" && as_dir=.
21789 for as_base in sh bash ksh sh5; do
21790 case $as_dir in
21791 /*)
21792 if ("$as_dir/$as_base" -c '
21793 as_lineno_1=$LINENO
21794 as_lineno_2=$LINENO
21795 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21796 test "x$as_lineno_1" != "x$as_lineno_2" &&
21797 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021798 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21799 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021800 CONFIG_SHELL=$as_dir/$as_base
21801 export CONFIG_SHELL
21802 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21803 fi;;
21804 esac
21805 done
21806done
21807;;
Jack Jansendd19cf82001-12-06 22:36:17 +000021808 esac
21809
Martin v. Löwis11437992002-04-12 09:54:03 +000021810 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21811 # uniformly replaced by the line number. The first 'sed' inserts a
21812 # line-number line before each line; the second 'sed' does the real
21813 # work. The second script uses 'N' to pair each line-number line
21814 # with the numbered line, and appends trailing '-' during
21815 # substitution so that $LINENO is not a special case at line end.
21816 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21817 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21818 sed '=' <$as_myself |
21819 sed '
21820 N
21821 s,$,-,
21822 : loop
21823 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
21824 t loop
21825 s,-$,,
21826 s,^['$as_cr_digits']*\n,,
21827 ' >$as_me.lineno &&
21828 chmod +x $as_me.lineno ||
21829 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21830echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
21831 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021832
Martin v. Löwis11437992002-04-12 09:54:03 +000021833 # Don't try to exec as it changes $[0], causing all sort of problems
21834 # (the dirname of $[0] is not the place where we might find the
21835 # original and so on. Autoconf is especially sensible to this).
21836 . ./$as_me.lineno
21837 # Exit status is that of the last command.
21838 exit
21839}
21840
21841
21842case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21843 *c*,-n*) ECHO_N= ECHO_C='
21844' ECHO_T=' ' ;;
21845 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21846 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
21847esac
21848
21849if expr a : '\(a\)' >/dev/null 2>&1; then
21850 as_expr=expr
21851else
21852 as_expr=false
21853fi
21854
21855rm -f conf$$ conf$$.exe conf$$.file
21856echo >conf$$.file
21857if ln -s conf$$.file conf$$ 2>/dev/null; then
21858 # We could just check for DJGPP; but this test a) works b) is more generic
21859 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21860 if test -f conf$$.exe; then
21861 # Don't use ln at all; we don't have any links
21862 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021863 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021864 as_ln_s='ln -s'
21865 fi
21866elif ln conf$$.file conf$$ 2>/dev/null; then
21867 as_ln_s=ln
21868else
21869 as_ln_s='cp -p'
21870fi
21871rm -f conf$$ conf$$.exe conf$$.file
21872
Skip Montanaro6dead952003-09-25 14:50:04 +000021873if mkdir -p . 2>/dev/null; then
21874 as_mkdir_p=:
21875else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021876 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000021877 as_mkdir_p=false
21878fi
21879
Martin v. Löwis11437992002-04-12 09:54:03 +000021880as_executable_p="test -f"
21881
21882# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021883as_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 +000021884
21885# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021886as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000021887
21888
21889# IFS
21890# We need space, tab and new line, in precisely that order.
21891as_nl='
21892'
21893IFS=" $as_nl"
21894
21895# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000021896$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000021897
21898exec 6>&1
21899
21900# Open the log real soon, to keep \$[0] and so on meaningful, and to
21901# report actual input values of CONFIG_FILES etc. instead of their
21902# values after options handling. Logging --version etc. is OK.
21903exec 5>>config.log
21904{
21905 echo
21906 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21907## Running $as_me. ##
21908_ASBOX
21909} >&5
21910cat >&5 <<_CSEOF
21911
Guido van Rossum0c4eb622006-03-30 16:19:24 +000021912This file was extended by python $as_me 3.0, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000021913generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000021914
21915 CONFIG_FILES = $CONFIG_FILES
21916 CONFIG_HEADERS = $CONFIG_HEADERS
21917 CONFIG_LINKS = $CONFIG_LINKS
21918 CONFIG_COMMANDS = $CONFIG_COMMANDS
21919 $ $0 $@
21920
21921_CSEOF
21922echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21923echo >&5
21924_ACEOF
21925
21926# Files that config.status was made for.
21927if test -n "$ac_config_files"; then
21928 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21929fi
21930
21931if test -n "$ac_config_headers"; then
21932 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21933fi
21934
21935if test -n "$ac_config_links"; then
21936 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21937fi
21938
21939if test -n "$ac_config_commands"; then
21940 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21941fi
21942
21943cat >>$CONFIG_STATUS <<\_ACEOF
21944
21945ac_cs_usage="\
21946\`$as_me' instantiates files from templates according to the
21947current configuration.
21948
21949Usage: $0 [OPTIONS] [FILE]...
21950
21951 -h, --help print this help, then exit
21952 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000021953 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000021954 -d, --debug don't remove temporary files
21955 --recheck update $as_me by reconfiguring in the same conditions
21956 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021957 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021958 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021959 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021960
21961Configuration files:
21962$config_files
21963
21964Configuration headers:
21965$config_headers
21966
21967Report bugs to <bug-autoconf@gnu.org>."
21968_ACEOF
21969
21970cat >>$CONFIG_STATUS <<_ACEOF
21971ac_cs_version="\\
Guido van Rossum0c4eb622006-03-30 16:19:24 +000021972python config.status 3.0
Skip Montanarof0d5f792004-08-15 14:08:23 +000021973configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000021974 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21975
Skip Montanarof0d5f792004-08-15 14:08:23 +000021976Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000021977This config.status script is free software; the Free Software Foundation
21978gives unlimited permission to copy, distribute and modify it."
21979srcdir=$srcdir
21980INSTALL="$INSTALL"
21981_ACEOF
21982
21983cat >>$CONFIG_STATUS <<\_ACEOF
21984# If no file are specified by the user, then we need to provide default
21985# value. By we need to know if files were specified by the user.
21986ac_need_defaults=:
21987while test $# != 0
21988do
21989 case $1 in
21990 --*=*)
21991 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21992 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021993 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000021994 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021995 -*)
21996 ac_option=$1
21997 ac_optarg=$2
21998 ac_shift=shift
21999 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022000 *) # This is not an option, so the user has probably given explicit
22001 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000022002 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000022003 ac_need_defaults=false;;
22004 esac
22005
Skip Montanaro6dead952003-09-25 14:50:04 +000022006 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000022007 # Handling of the options.
22008_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022009cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022010 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22011 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022012 --version | --vers* | -V )
22013 echo "$ac_cs_version"; exit 0 ;;
22014 --he | --h)
22015 # Conflict between --help and --header
22016 { { echo "$as_me:$LINENO: error: ambiguous option: $1
22017Try \`$0 --help' for more information." >&5
22018echo "$as_me: error: ambiguous option: $1
22019Try \`$0 --help' for more information." >&2;}
22020 { (exit 1); exit 1; }; };;
22021 --help | --hel | -h )
22022 echo "$ac_cs_usage"; exit 0 ;;
22023 --debug | --d* | -d )
22024 debug=: ;;
22025 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000022026 $ac_shift
22027 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000022028 ac_need_defaults=false;;
22029 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000022030 $ac_shift
22031 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000022032 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000022033 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22034 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22035 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022036
22037 # This is an error.
22038 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
22039Try \`$0 --help' for more information." >&5
22040echo "$as_me: error: unrecognized option: $1
22041Try \`$0 --help' for more information." >&2;}
22042 { (exit 1); exit 1; }; } ;;
22043
22044 *) ac_config_targets="$ac_config_targets $1" ;;
22045
22046 esac
22047 shift
22048done
22049
Skip Montanaro6dead952003-09-25 14:50:04 +000022050ac_configure_extra_args=
22051
22052if $ac_cs_silent; then
22053 exec 6>/dev/null
22054 ac_configure_extra_args="$ac_configure_extra_args --silent"
22055fi
22056
22057_ACEOF
22058cat >>$CONFIG_STATUS <<_ACEOF
22059if \$ac_cs_recheck; then
22060 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22061 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22062fi
22063
Martin v. Löwis11437992002-04-12 09:54:03 +000022064_ACEOF
22065
22066
22067
22068
22069
22070cat >>$CONFIG_STATUS <<\_ACEOF
22071for ac_config_target in $ac_config_targets
22072do
22073 case "$ac_config_target" in
22074 # Handling of arguments.
22075 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
22076 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
22077 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
22078 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
22079echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22080 { (exit 1); exit 1; }; };;
22081 esac
22082done
22083
22084# If the user did not use the arguments to specify the items to instantiate,
22085# then the envvar interface is used. Set only those that are not.
22086# We use the long form for the default assignment because of an extremely
22087# bizarre bug on SunOS 4.1.3.
22088if $ac_need_defaults; then
22089 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22090 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22091fi
22092
Skip Montanaro6dead952003-09-25 14:50:04 +000022093# Have a temporary directory for convenience. Make it in the build tree
22094# simply because there is no reason to put it here, and in addition,
22095# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000022096# Create a temporary directory, and hook for its removal unless debugging.
22097$debug ||
22098{
22099 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22100 trap '{ (exit 1); exit 1; }' 1 2 13 15
22101}
22102
22103# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000022104
Martin v. Löwis11437992002-04-12 09:54:03 +000022105{
Skip Montanaro6dead952003-09-25 14:50:04 +000022106 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000022107 test -n "$tmp" && test -d "$tmp"
22108} ||
22109{
Skip Montanaro6dead952003-09-25 14:50:04 +000022110 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000022111 (umask 077 && mkdir $tmp)
22112} ||
22113{
Skip Montanaro6dead952003-09-25 14:50:04 +000022114 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000022115 { (exit 1); exit 1; }
22116}
22117
22118_ACEOF
22119
22120cat >>$CONFIG_STATUS <<_ACEOF
22121
22122#
22123# CONFIG_FILES section.
22124#
22125
22126# No need to generate the scripts if there are no CONFIG_FILES.
22127# This happens for instance when ./config.status config.h
22128if test -n "\$CONFIG_FILES"; then
22129 # Protect against being on the right side of a sed subst in config.status.
22130 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22131 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22132s,@SHELL@,$SHELL,;t t
22133s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22134s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22135s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22136s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22137s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22138s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22139s,@exec_prefix@,$exec_prefix,;t t
22140s,@prefix@,$prefix,;t t
22141s,@program_transform_name@,$program_transform_name,;t t
22142s,@bindir@,$bindir,;t t
22143s,@sbindir@,$sbindir,;t t
22144s,@libexecdir@,$libexecdir,;t t
22145s,@datadir@,$datadir,;t t
22146s,@sysconfdir@,$sysconfdir,;t t
22147s,@sharedstatedir@,$sharedstatedir,;t t
22148s,@localstatedir@,$localstatedir,;t t
22149s,@libdir@,$libdir,;t t
22150s,@includedir@,$includedir,;t t
22151s,@oldincludedir@,$oldincludedir,;t t
22152s,@infodir@,$infodir,;t t
22153s,@mandir@,$mandir,;t t
22154s,@build_alias@,$build_alias,;t t
22155s,@host_alias@,$host_alias,;t t
22156s,@target_alias@,$target_alias,;t t
22157s,@DEFS@,$DEFS,;t t
22158s,@ECHO_C@,$ECHO_C,;t t
22159s,@ECHO_N@,$ECHO_N,;t t
22160s,@ECHO_T@,$ECHO_T,;t t
22161s,@LIBS@,$LIBS,;t t
22162s,@VERSION@,$VERSION,;t t
22163s,@SOVERSION@,$SOVERSION,;t t
22164s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
22165s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
22166s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
22167s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
22168s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
22169s,@MACHDEP@,$MACHDEP,;t t
22170s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000022171s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000022172s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000022173s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022174s,@CC@,$CC,;t t
22175s,@CFLAGS@,$CFLAGS,;t t
22176s,@LDFLAGS@,$LDFLAGS,;t t
22177s,@CPPFLAGS@,$CPPFLAGS,;t t
22178s,@ac_ct_CC@,$ac_ct_CC,;t t
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000022179s,@EXEEXT@,$EXEEXT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022180s,@OBJEXT@,$OBJEXT,;t t
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000022181s,@CXX@,$CXX,;t t
22182s,@MAINCC@,$MAINCC,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022183s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000022184s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022185s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
22186s,@LIBRARY@,$LIBRARY,;t t
22187s,@LDLIBRARY@,$LDLIBRARY,;t t
22188s,@DLLLIBRARY@,$DLLLIBRARY,;t t
22189s,@BLDLIBRARY@,$BLDLIBRARY,;t t
22190s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
22191s,@INSTSONAME@,$INSTSONAME,;t t
22192s,@RUNSHARED@,$RUNSHARED,;t t
22193s,@LINKCC@,$LINKCC,;t t
22194s,@RANLIB@,$RANLIB,;t t
22195s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22196s,@AR@,$AR,;t t
Martin v. Löwisdea59e52006-01-05 10:00:36 +000022197s,@SVNVERSION@,$SVNVERSION,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022198s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22199s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22200s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22201s,@LN@,$LN,;t t
22202s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000022203s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000022204s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022205s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
22206s,@SO@,$SO,;t t
22207s,@LDSHARED@,$LDSHARED,;t t
22208s,@BLDSHARED@,$BLDSHARED,;t t
22209s,@CCSHARED@,$CCSHARED,;t t
22210s,@LINKFORSHARED@,$LINKFORSHARED,;t t
22211s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000022212s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022213s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
22214s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
22215s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
22216s,@LDLAST@,$LDLAST,;t t
22217s,@THREADOBJ@,$THREADOBJ,;t t
22218s,@DLINCLDIR@,$DLINCLDIR,;t t
22219s,@DYNLOADFILE@,$DYNLOADFILE,;t t
22220s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000022221s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022222s,@LIBOBJS@,$LIBOBJS,;t t
22223s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
22224s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
22225s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
22226s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
22227s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
22228s,@LIBM@,$LIBM,;t t
22229s,@LIBC@,$LIBC,;t t
22230s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
22231s,@THREADHEADERS@,$THREADHEADERS,;t t
22232s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000022233s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022234CEOF
22235
22236_ACEOF
22237
22238 cat >>$CONFIG_STATUS <<\_ACEOF
22239 # Split the substitutions into bite-sized pieces for seds with
22240 # small command number limits, like on Digital OSF/1 and HP-UX.
22241 ac_max_sed_lines=48
22242 ac_sed_frag=1 # Number of current file.
22243 ac_beg=1 # First line for current file.
22244 ac_end=$ac_max_sed_lines # Line after last line for current file.
22245 ac_more_lines=:
22246 ac_sed_cmds=
22247 while $ac_more_lines; do
22248 if test $ac_beg -gt 1; then
22249 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22250 else
22251 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22252 fi
22253 if test ! -s $tmp/subs.frag; then
22254 ac_more_lines=false
22255 else
22256 # The purpose of the label and of the branching condition is to
22257 # speed up the sed processing (if there are no `@' at all, there
22258 # is no need to browse any of the substitutions).
22259 # These are the two extra sed commands mentioned above.
22260 (echo ':t
22261 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22262 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000022263 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000022264 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000022265 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000022266 fi
22267 ac_sed_frag=`expr $ac_sed_frag + 1`
22268 ac_beg=$ac_end
22269 ac_end=`expr $ac_end + $ac_max_sed_lines`
22270 fi
22271 done
22272 if test -z "$ac_sed_cmds"; then
22273 ac_sed_cmds=cat
22274 fi
22275fi # test -n "$CONFIG_FILES"
22276
22277_ACEOF
22278cat >>$CONFIG_STATUS <<\_ACEOF
22279for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22280 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22281 case $ac_file in
22282 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022283 cat >$tmp/stdin
22284 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22285 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022286 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022287 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022288 * ) ac_file_in=$ac_file.in ;;
22289 esac
22290
22291 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22292 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22293$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022294 X"$ac_file" : 'X\(//\)[^/]' \| \
22295 X"$ac_file" : 'X\(//\)$' \| \
22296 X"$ac_file" : 'X\(/\)' \| \
22297 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022298echo X"$ac_file" |
22299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22300 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22301 /^X\(\/\/\)$/{ s//\1/; q; }
22302 /^X\(\/\).*/{ s//\1/; q; }
22303 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022304 { if $as_mkdir_p; then
22305 mkdir -p "$ac_dir"
22306 else
22307 as_dir="$ac_dir"
22308 as_dirs=
22309 while test ! -d "$as_dir"; do
22310 as_dirs="$as_dir $as_dirs"
22311 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22312$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022313 X"$as_dir" : 'X\(//\)[^/]' \| \
22314 X"$as_dir" : 'X\(//\)$' \| \
22315 X"$as_dir" : 'X\(/\)' \| \
22316 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022317echo X"$as_dir" |
22318 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22319 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22320 /^X\(\/\/\)$/{ s//\1/; q; }
22321 /^X\(\/\).*/{ s//\1/; q; }
22322 s/.*/./; q'`
22323 done
22324 test ! -n "$as_dirs" || mkdir $as_dirs
22325 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22326echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22327 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022328
22329 ac_builddir=.
22330
22331if test "$ac_dir" != .; then
22332 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22333 # A "../" for each directory in $ac_dir_suffix.
22334 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22335else
22336 ac_dir_suffix= ac_top_builddir=
22337fi
22338
22339case $srcdir in
22340 .) # No --srcdir option. We are building in place.
22341 ac_srcdir=.
22342 if test -z "$ac_top_builddir"; then
22343 ac_top_srcdir=.
22344 else
22345 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22346 fi ;;
22347 [\\/]* | ?:[\\/]* ) # Absolute path.
22348 ac_srcdir=$srcdir$ac_dir_suffix;
22349 ac_top_srcdir=$srcdir ;;
22350 *) # Relative path.
22351 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22352 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22353esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000022354
22355# Do not use `cd foo && pwd` to compute absolute paths, because
22356# the directories may not exist.
22357case `pwd` in
22358.) ac_abs_builddir="$ac_dir";;
22359*)
22360 case "$ac_dir" in
22361 .) ac_abs_builddir=`pwd`;;
22362 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22363 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22364 esac;;
22365esac
22366case $ac_abs_builddir in
22367.) ac_abs_top_builddir=${ac_top_builddir}.;;
22368*)
22369 case ${ac_top_builddir}. in
22370 .) ac_abs_top_builddir=$ac_abs_builddir;;
22371 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22372 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22373 esac;;
22374esac
22375case $ac_abs_builddir in
22376.) ac_abs_srcdir=$ac_srcdir;;
22377*)
22378 case $ac_srcdir in
22379 .) ac_abs_srcdir=$ac_abs_builddir;;
22380 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22381 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22382 esac;;
22383esac
22384case $ac_abs_builddir in
22385.) ac_abs_top_srcdir=$ac_top_srcdir;;
22386*)
22387 case $ac_top_srcdir in
22388 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22389 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22390 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22391 esac;;
22392esac
Martin v. Löwis11437992002-04-12 09:54:03 +000022393
22394
22395 case $INSTALL in
22396 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22397 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
22398 esac
22399
Martin v. Löwis11437992002-04-12 09:54:03 +000022400 # Let's still pretend it is `configure' which instantiates (i.e., don't
22401 # use $as_me), people would be surprised to read:
22402 # /* config.h. Generated by config.status. */
22403 if test x"$ac_file" = x-; then
22404 configure_input=
22405 else
22406 configure_input="$ac_file. "
22407 fi
22408 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000022409 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000022410
22411 # First look for the input files in the build tree, otherwise in the
22412 # src tree.
22413 ac_file_inputs=`IFS=:
22414 for f in $ac_file_in; do
22415 case $f in
22416 -) echo $tmp/stdin ;;
22417 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022418 # Absolute (can't be DOS-style, as IFS=:)
22419 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022420echo "$as_me: error: cannot find input file: $f" >&2;}
22421 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022422 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022423 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022424 if test -f "$f"; then
22425 # Build tree
22426 echo "$f"
22427 elif test -f "$srcdir/$f"; then
22428 # Source tree
22429 echo "$srcdir/$f"
22430 else
22431 # /dev/null tree
22432 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022433echo "$as_me: error: cannot find input file: $f" >&2;}
22434 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022435 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022436 esac
22437 done` || { (exit 1); exit 1; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000022438
22439 if test x"$ac_file" != x-; then
22440 { echo "$as_me:$LINENO: creating $ac_file" >&5
22441echo "$as_me: creating $ac_file" >&6;}
22442 rm -f "$ac_file"
22443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022444_ACEOF
22445cat >>$CONFIG_STATUS <<_ACEOF
22446 sed "$ac_vpsub
22447$extrasub
22448_ACEOF
22449cat >>$CONFIG_STATUS <<\_ACEOF
22450:t
22451/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22452s,@configure_input@,$configure_input,;t t
22453s,@srcdir@,$ac_srcdir,;t t
22454s,@abs_srcdir@,$ac_abs_srcdir,;t t
22455s,@top_srcdir@,$ac_top_srcdir,;t t
22456s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22457s,@builddir@,$ac_builddir,;t t
22458s,@abs_builddir@,$ac_abs_builddir,;t t
22459s,@top_builddir@,$ac_top_builddir,;t t
22460s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22461s,@INSTALL@,$ac_INSTALL,;t t
22462" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22463 rm -f $tmp/stdin
22464 if test x"$ac_file" != x-; then
22465 mv $tmp/out $ac_file
22466 else
22467 cat $tmp/out
22468 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022469 fi
22470
Martin v. Löwis11437992002-04-12 09:54:03 +000022471done
22472_ACEOF
22473cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022474
Martin v. Löwis11437992002-04-12 09:54:03 +000022475#
22476# CONFIG_HEADER section.
22477#
Guido van Rossum627b2d71993-12-24 10:39:16 +000022478
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022479# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22480# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000022481#
22482# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022483ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22484ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000022485ac_dC=' '
22486ac_dD=',;t'
22487# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000022488ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000022489ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022490ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000022491ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022492
Martin v. Löwis11437992002-04-12 09:54:03 +000022493for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000022494 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000022495 case $ac_file in
22496 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022497 cat >$tmp/stdin
22498 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22499 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022500 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022501 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022502 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022503 esac
22504
Martin v. Löwis11437992002-04-12 09:54:03 +000022505 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22506echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022507
Martin v. Löwis11437992002-04-12 09:54:03 +000022508 # First look for the input files in the build tree, otherwise in the
22509 # src tree.
22510 ac_file_inputs=`IFS=:
22511 for f in $ac_file_in; do
22512 case $f in
22513 -) echo $tmp/stdin ;;
22514 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022515 # Absolute (can't be DOS-style, as IFS=:)
22516 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022517echo "$as_me: error: cannot find input file: $f" >&2;}
22518 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022519 # Do quote $f, to prevent DOS paths from being IFS'd.
22520 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022521 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022522 if test -f "$f"; then
22523 # Build tree
22524 echo "$f"
22525 elif test -f "$srcdir/$f"; then
22526 # Source tree
22527 echo "$srcdir/$f"
22528 else
22529 # /dev/null tree
22530 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022531echo "$as_me: error: cannot find input file: $f" >&2;}
22532 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022533 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022534 esac
22535 done` || { (exit 1); exit 1; }
22536 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022537 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022538
Martin v. Löwis11437992002-04-12 09:54:03 +000022539_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022540
Martin v. Löwis11437992002-04-12 09:54:03 +000022541# Transform confdefs.h into two sed scripts, `conftest.defines' and
22542# `conftest.undefs', that substitutes the proper values into
22543# config.h.in to produce config.h. The first handles `#define'
22544# templates, and the second `#undef' templates.
22545# And first: Protect against being on the right side of a sed subst in
22546# config.status. Protect against being in an unquoted here document
22547# in config.status.
22548rm -f conftest.defines conftest.undefs
22549# Using a here document instead of a string reduces the quoting nightmare.
22550# Putting comments in sed scripts is not portable.
22551#
22552# `end' is used to avoid that the second main sed command (meant for
22553# 0-ary CPP macros) applies to n-ary macro definitions.
22554# See the Autoconf documentation for `clear'.
22555cat >confdef2sed.sed <<\_ACEOF
22556s/[\\&,]/\\&/g
22557s,[\\$`],\\&,g
22558t clear
22559: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000022560s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022561t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000022562s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022563: end
22564_ACEOF
22565# If some macros were called several times there might be several times
22566# the same #defines, which is useless. Nevertheless, we may not want to
22567# sort them, since we want the *last* AC-DEFINE to be honored.
22568uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22569sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22570rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022571
22572# This sed command replaces #undef with comments. This is necessary, for
22573# example, in the case of _POSIX_SOURCE, which is predefined and required
22574# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000022575cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000022576s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000022577_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022578
Martin v. Löwis11437992002-04-12 09:54:03 +000022579# Break up conftest.defines because some shells have a limit on the size
22580# of here documents, and old seds have small limits too (100 cmds).
22581echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000022582echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022583echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22584echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022585rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000022586while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000022587do
Martin v. Löwis11437992002-04-12 09:54:03 +000022588 # Write a limited-size here document to $tmp/defines.sed.
22589 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22590 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022591 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022592 # Work around the forget-to-reset-the-flag bug.
22593 echo 't clr' >>$CONFIG_STATUS
22594 echo ': clr' >>$CONFIG_STATUS
22595 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022596 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022597 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22598 rm -f $tmp/in
22599 mv $tmp/out $tmp/in
22600' >>$CONFIG_STATUS
22601 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22602 rm -f conftest.defines
22603 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000022604done
Martin v. Löwis11437992002-04-12 09:54:03 +000022605rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000022606echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022607echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022608
Martin v. Löwis11437992002-04-12 09:54:03 +000022609# Break up conftest.undefs because some shells have a limit on the size
22610# of here documents, and old seds have small limits too (100 cmds).
22611echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22612rm -f conftest.tail
22613while grep . conftest.undefs >/dev/null
22614do
22615 # Write a limited-size here document to $tmp/undefs.sed.
22616 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22617 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000022618 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022619 # Work around the forget-to-reset-the-flag bug.
22620 echo 't clr' >>$CONFIG_STATUS
22621 echo ': clr' >>$CONFIG_STATUS
22622 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22623 echo 'CEOF
22624 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22625 rm -f $tmp/in
22626 mv $tmp/out $tmp/in
22627' >>$CONFIG_STATUS
22628 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22629 rm -f conftest.undefs
22630 mv conftest.tail conftest.undefs
22631done
22632rm -f conftest.undefs
22633
22634cat >>$CONFIG_STATUS <<\_ACEOF
22635 # Let's still pretend it is `configure' which instantiates (i.e., don't
22636 # use $as_me), people would be surprised to read:
22637 # /* config.h. Generated by config.status. */
22638 if test x"$ac_file" = x-; then
22639 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000022640 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022641 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000022642 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022643 cat $tmp/in >>$tmp/config.h
22644 rm -f $tmp/in
22645 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022646 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022647 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22648echo "$as_me: $ac_file is unchanged" >&6;}
22649 else
22650 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22651$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022652 X"$ac_file" : 'X\(//\)[^/]' \| \
22653 X"$ac_file" : 'X\(//\)$' \| \
22654 X"$ac_file" : 'X\(/\)' \| \
22655 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022656echo X"$ac_file" |
22657 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22658 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22659 /^X\(\/\/\)$/{ s//\1/; q; }
22660 /^X\(\/\).*/{ s//\1/; q; }
22661 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022662 { if $as_mkdir_p; then
22663 mkdir -p "$ac_dir"
22664 else
22665 as_dir="$ac_dir"
22666 as_dirs=
22667 while test ! -d "$as_dir"; do
22668 as_dirs="$as_dir $as_dirs"
22669 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22670$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022671 X"$as_dir" : 'X\(//\)[^/]' \| \
22672 X"$as_dir" : 'X\(//\)$' \| \
22673 X"$as_dir" : 'X\(/\)' \| \
22674 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022675echo X"$as_dir" |
22676 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22677 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22678 /^X\(\/\/\)$/{ s//\1/; q; }
22679 /^X\(\/\).*/{ s//\1/; q; }
22680 s/.*/./; q'`
22681 done
22682 test ! -n "$as_dirs" || mkdir $as_dirs
22683 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22684echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22685 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022686
Martin v. Löwis11437992002-04-12 09:54:03 +000022687 rm -f $ac_file
22688 mv $tmp/config.h $ac_file
22689 fi
22690 else
22691 cat $tmp/config.h
22692 rm -f $tmp/config.h
22693 fi
22694done
22695_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022696
Martin v. Löwis11437992002-04-12 09:54:03 +000022697cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022698
Martin v. Löwis11437992002-04-12 09:54:03 +000022699{ (exit 0); exit 0; }
22700_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022701chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022702ac_clean_files=$ac_clean_files_save
22703
22704
22705# configure is writing to config.log, and then calls config.status.
22706# config.status does its own redirection, appending to config.log.
22707# Unfortunately, on DOS this fails, as config.log is still kept open
22708# by configure, so config.status won't be able to write to it; its
22709# output is simply discarded. So we exec the FD to /dev/null,
22710# effectively closing config.log, so it can be properly (re)opened and
22711# appended to by config.status. When coming back to configure, we
22712# need to make the FD available again.
22713if test "$no_create" != yes; then
22714 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000022715 ac_config_status_args=
22716 test "$silent" = yes &&
22717 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000022718 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000022719 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000022720 exec 5>>config.log
22721 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22722 # would make configure fail if this is the last instruction.
22723 $ac_cs_success || { (exit 1); exit 1; }
22724fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000022725
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000022726
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000022727echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000022728if test ! -f Modules/Setup
22729then
22730 cp $srcdir/Modules/Setup.dist Modules/Setup
22731fi
22732
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000022733echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000022734if test ! -f Modules/Setup.local
22735then
22736 echo "# Edit this file for local setup changes" >Modules/Setup.local
22737fi
22738
22739echo "creating Makefile"
22740$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
22741 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000022742 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000022743mv config.c Modules