blob: 0d4fad3661d15d355491215cb1a83e62b726dc21 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis11017b12006-01-14 18:12:57 +00002# From configure.in Revision: 41984 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00004# Generated by GNU Autoconf 2.59 for python 2.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Skip Montanarof0d5f792004-08-15 14:08:23 +00008# Copyright (C) 2003 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011## --------------------- ##
12## M4sh Initialization. ##
13## --------------------- ##
14
15# Be Bourne compatible
16if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17 emulate sh
18 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000022elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23 set -o posix
24fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000025DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026
Martin v. Löwis11437992002-04-12 09:54:03 +000027# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000029 as_unset=unset
30else
31 as_unset=false
32fi
33
Skip Montanaro6dead952003-09-25 14:50:04 +000034
35# Work around bugs in pre-3.0 UWIN ksh.
36$as_unset ENV MAIL MAILPATH
37PS1='$ '
38PS2='> '
39PS4='+ '
40
41# NLS nuisances.
42for as_var in \
43 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
44 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
45 LC_TELEPHONE LC_TIME
46do
Skip Montanarof0d5f792004-08-15 14:08:23 +000047 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000048 eval $as_var=C; export $as_var
49 else
50 $as_unset $as_var
51 fi
52done
53
54# Required to use basename.
55if expr a : '\(a\)' >/dev/null 2>&1; then
56 as_expr=expr
57else
58 as_expr=false
59fi
60
61if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
62 as_basename=basename
63else
64 as_basename=false
65fi
Martin v. Löwis11437992002-04-12 09:54:03 +000066
67
68# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000069as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000070$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
71 X"$0" : 'X\(//\)$' \| \
72 X"$0" : 'X\(/\)$' \| \
73 . : '\(.\)' 2>/dev/null ||
74echo X/"$0" |
75 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
76 /^X\/\(\/\/\)$/{ s//\1/; q; }
77 /^X\/\(\/\).*/{ s//\1/; q; }
78 s/.*/./; q'`
79
Skip Montanaro6dead952003-09-25 14:50:04 +000080
Martin v. Löwis11437992002-04-12 09:54:03 +000081# PATH needs CR, and LINENO needs CR and PATH.
82# Avoid depending upon Character Ranges.
83as_cr_letters='abcdefghijklmnopqrstuvwxyz'
84as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
85as_cr_Letters=$as_cr_letters$as_cr_LETTERS
86as_cr_digits='0123456789'
87as_cr_alnum=$as_cr_Letters$as_cr_digits
88
89# The user is always right.
90if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000091 echo "#! /bin/sh" >conf$$.sh
92 echo "exit 0" >>conf$$.sh
93 chmod +x conf$$.sh
94 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000095 PATH_SEPARATOR=';'
96 else
97 PATH_SEPARATOR=:
98 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000099 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +0000100fi
101
102
103 as_lineno_1=$LINENO
104 as_lineno_2=$LINENO
105 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
106 test "x$as_lineno_1" != "x$as_lineno_2" &&
107 test "x$as_lineno_3" = "x$as_lineno_2" || {
108 # Find who we are. Look in the path if we contain no path at all
109 # relative or not.
110 case $0 in
111 *[\\/]* ) as_myself=$0 ;;
112 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
113for as_dir in $PATH
114do
115 IFS=$as_save_IFS
116 test -z "$as_dir" && as_dir=.
117 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
118done
119
120 ;;
121 esac
122 # We did not find ourselves, most probably we were run as `sh COMMAND'
123 # in which case we are not to be found in the path.
124 if test "x$as_myself" = x; then
125 as_myself=$0
126 fi
127 if test ! -f "$as_myself"; then
128 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
129 { (exit 1); exit 1; }; }
130 fi
131 case $CONFIG_SHELL in
132 '')
133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
134for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
135do
136 IFS=$as_save_IFS
137 test -z "$as_dir" && as_dir=.
138 for as_base in sh bash ksh sh5; do
139 case $as_dir in
140 /*)
141 if ("$as_dir/$as_base" -c '
142 as_lineno_1=$LINENO
143 as_lineno_2=$LINENO
144 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
145 test "x$as_lineno_1" != "x$as_lineno_2" &&
146 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000147 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
148 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000149 CONFIG_SHELL=$as_dir/$as_base
150 export CONFIG_SHELL
151 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
152 fi;;
153 esac
154 done
155done
156;;
157 esac
158
159 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
160 # uniformly replaced by the line number. The first 'sed' inserts a
161 # line-number line before each line; the second 'sed' does the real
162 # work. The second script uses 'N' to pair each line-number line
163 # with the numbered line, and appends trailing '-' during
164 # substitution so that $LINENO is not a special case at line end.
165 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
166 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
167 sed '=' <$as_myself |
168 sed '
169 N
170 s,$,-,
171 : loop
172 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
173 t loop
174 s,-$,,
175 s,^['$as_cr_digits']*\n,,
176 ' >$as_me.lineno &&
177 chmod +x $as_me.lineno ||
178 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
179 { (exit 1); exit 1; }; }
180
181 # Don't try to exec as it changes $[0], causing all sort of problems
182 # (the dirname of $[0] is not the place where we might find the
183 # original and so on. Autoconf is especially sensible to this).
184 . ./$as_me.lineno
185 # Exit status is that of the last command.
186 exit
187}
188
189
190case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
191 *c*,-n*) ECHO_N= ECHO_C='
192' ECHO_T=' ' ;;
193 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
194 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
195esac
196
197if expr a : '\(a\)' >/dev/null 2>&1; then
198 as_expr=expr
199else
200 as_expr=false
201fi
202
203rm -f conf$$ conf$$.exe conf$$.file
204echo >conf$$.file
205if ln -s conf$$.file conf$$ 2>/dev/null; then
206 # We could just check for DJGPP; but this test a) works b) is more generic
207 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
208 if test -f conf$$.exe; then
209 # Don't use ln at all; we don't have any links
210 as_ln_s='cp -p'
211 else
212 as_ln_s='ln -s'
213 fi
214elif ln conf$$.file conf$$ 2>/dev/null; then
215 as_ln_s=ln
216else
217 as_ln_s='cp -p'
218fi
219rm -f conf$$ conf$$.exe conf$$.file
220
Skip Montanaro6dead952003-09-25 14:50:04 +0000221if mkdir -p . 2>/dev/null; then
222 as_mkdir_p=:
223else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000224 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000225 as_mkdir_p=false
226fi
227
Martin v. Löwis11437992002-04-12 09:54:03 +0000228as_executable_p="test -f"
229
230# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000231as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000232
233# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000234as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000235
236
237# IFS
238# We need space, tab and new line, in precisely that order.
239as_nl='
240'
241IFS=" $as_nl"
242
243# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000244$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000245
246
247# Name of the host.
248# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
249# so uname gets run too.
250ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
251
252exec 6>&1
253
254#
255# Initializations.
256#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000257ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000258ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000259cross_compiling=no
260subdirs=
261MFLAGS=
262MAKEFLAGS=
263SHELL=${CONFIG_SHELL-/bin/sh}
264
265# Maximum number of lines to put in a shell here document.
266# This variable seems obsolete. It should probably be removed, and
267# only ac_max_sed_lines should be used.
268: ${ac_max_here_lines=38}
269
270# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000271PACKAGE_NAME='python'
272PACKAGE_TARNAME='python'
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000273PACKAGE_VERSION='2.5'
274PACKAGE_STRING='python 2.5'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000275PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000276
277ac_unique_file="Include/object.h"
278# Factoring default headers for most tests.
279ac_includes_default="\
280#include <stdio.h>
281#if HAVE_SYS_TYPES_H
282# include <sys/types.h>
283#endif
284#if HAVE_SYS_STAT_H
285# include <sys/stat.h>
286#endif
287#if STDC_HEADERS
288# include <stdlib.h>
289# include <stddef.h>
290#else
291# if HAVE_STDLIB_H
292# include <stdlib.h>
293# endif
294#endif
295#if HAVE_STRING_H
296# if !STDC_HEADERS && HAVE_MEMORY_H
297# include <memory.h>
298# endif
299# include <string.h>
300#endif
301#if HAVE_STRINGS_H
302# include <strings.h>
303#endif
304#if HAVE_INTTYPES_H
305# include <inttypes.h>
306#else
307# if HAVE_STDINT_H
308# include <stdint.h>
309# endif
310#endif
311#if HAVE_UNISTD_H
312# include <unistd.h>
313#endif"
314
Martin v. Löwisdea59e52006-01-05 10:00:36 +0000315ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR SVNVERSION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS OTHER_LIBTOOL_OPT LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000316ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000317
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000319ac_init_help=
320ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000321# The variables have the same names as the options, with
322# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000323cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000324exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000325no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000326no_recursion=
327prefix=NONE
328program_prefix=NONE
329program_suffix=NONE
330program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000333srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000334verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000335x_includes=NONE
336x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000337
338# Installation directory options.
339# These are left unexpanded so users can "make install exec_prefix=/foo"
340# and all the variables that are supposed to be based on exec_prefix
341# by default will actually change.
342# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000343bindir='${exec_prefix}/bin'
344sbindir='${exec_prefix}/sbin'
345libexecdir='${exec_prefix}/libexec'
346datadir='${prefix}/share'
347sysconfdir='${prefix}/etc'
348sharedstatedir='${prefix}/com'
349localstatedir='${prefix}/var'
350libdir='${exec_prefix}/lib'
351includedir='${prefix}/include'
352oldincludedir='/usr/include'
353infodir='${prefix}/info'
354mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000355
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356ac_prev=
357for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000358do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359 # If the previous option needs an argument, assign it.
360 if test -n "$ac_prev"; then
361 eval "$ac_prev=\$ac_option"
362 ac_prev=
363 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000364 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365
Martin v. Löwis11437992002-04-12 09:54:03 +0000366 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000367
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000368 # Accept the important Cygnus configure options, so we can diagnose typos.
369
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000371
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000372 -bindir | --bindir | --bindi | --bind | --bin | --bi)
373 ac_prev=bindir ;;
374 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376
377 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000378 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000379 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000380 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000382 -cache-file | --cache-file | --cache-fil | --cache-fi \
383 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
384 ac_prev=cache_file ;;
385 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
386 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000387 cache_file=$ac_optarg ;;
388
389 --config-cache | -C)
390 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000391
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000392 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
393 ac_prev=datadir ;;
394 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
395 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000397
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000399 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
402 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
403 { (exit 1); exit 1; }; }
404 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
405 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406
407 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000408 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000409 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
412 { (exit 1); exit 1; }; }
413 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
414 case $ac_option in
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416 *) ac_optarg=yes ;;
417 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000418 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000419
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
421 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
422 | --exec | --exe | --ex)
423 ac_prev=exec_prefix ;;
424 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
425 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
426 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000427 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000428
429 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000430 # Obsolete; use --with-gas.
431 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 -help | --help | --hel | --he | -h)
434 ac_init_help=long ;;
435 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
436 ac_init_help=recursive ;;
437 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
438 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439
440 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000445 -includedir | --includedir | --includedi | --included | --include \
446 | --includ | --inclu | --incl | --inc)
447 ac_prev=includedir ;;
448 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
449 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -infodir | --infodir | --infodi | --infod | --info | --inf)
453 ac_prev=infodir ;;
454 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000456
457 -libdir | --libdir | --libdi | --libd)
458 ac_prev=libdir ;;
459 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000461
462 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
463 | --libexe | --libex | --libe)
464 ac_prev=libexecdir ;;
465 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
466 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000467 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000468
469 -localstatedir | --localstatedir | --localstatedi | --localstated \
470 | --localstate | --localstat | --localsta | --localst \
471 | --locals | --local | --loca | --loc | --lo)
472 ac_prev=localstatedir ;;
473 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
474 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
475 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000476 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000477
478 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
479 ac_prev=mandir ;;
480 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000481 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000482
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484 # Obsolete; use --without-fp.
485 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486
487 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000489 no_create=yes ;;
490
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
492 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
493 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000495 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
496 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
497 | --oldin | --oldi | --old | --ol | --o)
498 ac_prev=oldincludedir ;;
499 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
500 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
501 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000502 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000503
Guido van Rossum7f43da71994-08-01 12:15:30 +0000504 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
505 ac_prev=prefix ;;
506 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000507 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000508
509 -program-prefix | --program-prefix | --program-prefi | --program-pref \
510 | --program-pre | --program-pr | --program-p)
511 ac_prev=program_prefix ;;
512 -program-prefix=* | --program-prefix=* | --program-prefi=* \
513 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000514 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000515
516 -program-suffix | --program-suffix | --program-suffi | --program-suff \
517 | --program-suf | --program-su | --program-s)
518 ac_prev=program_suffix ;;
519 -program-suffix=* | --program-suffix=* | --program-suffi=* \
520 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -program-transform-name | --program-transform-name \
524 | --program-transform-nam | --program-transform-na \
525 | --program-transform-n | --program-transform- \
526 | --program-transform | --program-transfor \
527 | --program-transfo | --program-transf \
528 | --program-trans | --program-tran \
529 | --progr-tra | --program-tr | --program-t)
530 ac_prev=program_transform_name ;;
531 -program-transform-name=* | --program-transform-name=* \
532 | --program-transform-nam=* | --program-transform-na=* \
533 | --program-transform-n=* | --program-transform-=* \
534 | --program-transform=* | --program-transfor=* \
535 | --program-transfo=* | --program-transf=* \
536 | --program-trans=* | --program-tran=* \
537 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000538 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000539
540 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
541 | -silent | --silent | --silen | --sile | --sil)
542 silent=yes ;;
543
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000544 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
545 ac_prev=sbindir ;;
546 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
547 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000548 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000549
550 -sharedstatedir | --sharedstatedir | --sharedstatedi \
551 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
552 | --sharedst | --shareds | --shared | --share | --shar \
553 | --sha | --sh)
554 ac_prev=sharedstatedir ;;
555 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
556 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
557 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
558 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000561 -site | --site | --sit)
562 ac_prev=site ;;
563 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565
Guido van Rossum7f43da71994-08-01 12:15:30 +0000566 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
567 ac_prev=srcdir ;;
568 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000570
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000571 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
572 | --syscon | --sysco | --sysc | --sys | --sy)
573 ac_prev=sysconfdir ;;
574 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
575 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000577
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000580 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000581 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000582
583 -v | -verbose | --verbose | --verbos | --verbo | --verb)
584 verbose=yes ;;
585
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 -version | --version | --versio | --versi | --vers | -V)
587 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000588
589 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000590 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000591 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000592 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
593 { echo "$as_me: error: invalid package name: $ac_package" >&2
594 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000596 case $ac_option in
597 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598 *) ac_optarg=yes ;;
599 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000601
602 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000604 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000605 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
606 { echo "$as_me: error: invalid package name: $ac_package" >&2
607 { (exit 1); exit 1; }; }
608 ac_package=`echo $ac_package | sed 's/-/_/g'`
609 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000610
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000611 --x)
612 # Obsolete; use --with-x.
613 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000614
615 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
616 | --x-incl | --x-inc | --x-in | --x-i)
617 ac_prev=x_includes ;;
618 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
619 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000620 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000621
622 -x-libraries | --x-libraries | --x-librarie | --x-librari \
623 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
624 ac_prev=x_libraries ;;
625 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
626 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000627 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000628
Martin v. Löwis11437992002-04-12 09:54:03 +0000629 -*) { echo "$as_me: error: unrecognized option: $ac_option
630Try \`$0 --help' for more information." >&2
631 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000632 ;;
633
Martin v. Löwis11437992002-04-12 09:54:03 +0000634 *=*)
635 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
636 # Reject names that are not valid shell variable names.
637 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
638 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
639 { (exit 1); exit 1; }; }
640 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
641 eval "$ac_envvar='$ac_optarg'"
642 export $ac_envvar ;;
643
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000644 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000645 # FIXME: should be removed in autoconf 3.0.
646 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
647 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
648 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
649 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000650 ;;
651
652 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000653done
654
Guido van Rossum7f43da71994-08-01 12:15:30 +0000655if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000656 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
657 { echo "$as_me: error: missing argument to $ac_option" >&2
658 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000659fi
660
Martin v. Löwis11437992002-04-12 09:54:03 +0000661# Be sure to have absolute paths.
662for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000663do
Martin v. Löwis11437992002-04-12 09:54:03 +0000664 eval ac_val=$`echo $ac_var`
665 case $ac_val in
666 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
667 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
668 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000669 esac
670done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000671
Martin v. Löwis11437992002-04-12 09:54:03 +0000672# Be sure to have absolute paths.
673for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000674 localstatedir libdir includedir oldincludedir infodir mandir
Martin v. Löwis11437992002-04-12 09:54:03 +0000675do
676 eval ac_val=$`echo $ac_var`
677 case $ac_val in
678 [\\/$]* | ?:[\\/]* ) ;;
679 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
680 { (exit 1); exit 1; }; };;
681 esac
682done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000683
Martin v. Löwis11437992002-04-12 09:54:03 +0000684# There might be people who depend on the old broken behavior: `$host'
685# used to hold the argument of --host etc.
686# FIXME: To remove some day.
687build=$build_alias
688host=$host_alias
689target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
Martin v. Löwis11437992002-04-12 09:54:03 +0000691# FIXME: To remove some day.
692if test "x$host_alias" != x; then
693 if test "x$build_alias" = x; then
694 cross_compiling=maybe
695 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
696 If a cross compiler is detected then cross compile mode will be used." >&2
697 elif test "x$build_alias" != "x$host_alias"; then
698 cross_compiling=yes
699 fi
700fi
701
702ac_tool_prefix=
703test -n "$host_alias" && ac_tool_prefix=$host_alias-
704
705test "$silent" = yes && exec 6>/dev/null
706
Guido van Rossum627b2d71993-12-24 10:39:16 +0000707
708# Find the source files, if location was not specified.
709if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000710 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000712 ac_confdir=`(dirname "$0") 2>/dev/null ||
713$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000714 X"$0" : 'X\(//\)[^/]' \| \
715 X"$0" : 'X\(//\)$' \| \
716 X"$0" : 'X\(/\)' \| \
717 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000718echo X"$0" |
719 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
720 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
721 /^X\(\/\/\)$/{ s//\1/; q; }
722 /^X\(\/\).*/{ s//\1/; q; }
723 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000724 srcdir=$ac_confdir
725 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000726 srcdir=..
727 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000728else
729 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000730fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000731if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000732 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000736 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
737 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000738 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000739fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000740(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
741 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
742 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000743srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
744ac_env_build_alias_set=${build_alias+set}
745ac_env_build_alias_value=$build_alias
746ac_cv_env_build_alias_set=${build_alias+set}
747ac_cv_env_build_alias_value=$build_alias
748ac_env_host_alias_set=${host_alias+set}
749ac_env_host_alias_value=$host_alias
750ac_cv_env_host_alias_set=${host_alias+set}
751ac_cv_env_host_alias_value=$host_alias
752ac_env_target_alias_set=${target_alias+set}
753ac_env_target_alias_value=$target_alias
754ac_cv_env_target_alias_set=${target_alias+set}
755ac_cv_env_target_alias_value=$target_alias
756ac_env_CC_set=${CC+set}
757ac_env_CC_value=$CC
758ac_cv_env_CC_set=${CC+set}
759ac_cv_env_CC_value=$CC
760ac_env_CFLAGS_set=${CFLAGS+set}
761ac_env_CFLAGS_value=$CFLAGS
762ac_cv_env_CFLAGS_set=${CFLAGS+set}
763ac_cv_env_CFLAGS_value=$CFLAGS
764ac_env_LDFLAGS_set=${LDFLAGS+set}
765ac_env_LDFLAGS_value=$LDFLAGS
766ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
767ac_cv_env_LDFLAGS_value=$LDFLAGS
768ac_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_env_CPPFLAGS_value=$CPPFLAGS
770ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
771ac_cv_env_CPPFLAGS_value=$CPPFLAGS
772ac_env_CPP_set=${CPP+set}
773ac_env_CPP_value=$CPP
774ac_cv_env_CPP_set=${CPP+set}
775ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776
Martin v. Löwis11437992002-04-12 09:54:03 +0000777#
778# Report the --help message.
779#
780if test "$ac_init_help" = "long"; then
781 # Omit some internal or obsolete options to make the list less imposing.
782 # This message is too long to be a string in the A/UX 3.1 sh.
783 cat <<_ACEOF
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000784\`configure' configures python 2.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785
786Usage: $0 [OPTION]... [VAR=VALUE]...
787
788To assign environment variables (e.g., CC, CFLAGS...), specify them as
789VAR=VALUE. See below for descriptions of some of the useful variables.
790
791Defaults for the options are specified in brackets.
792
793Configuration:
794 -h, --help display this help and exit
795 --help=short display options specific to this package
796 --help=recursive display the short help of all the included packages
797 -V, --version display version information and exit
798 -q, --quiet, --silent do not print \`checking...' messages
799 --cache-file=FILE cache test results in FILE [disabled]
800 -C, --config-cache alias for \`--cache-file=config.cache'
801 -n, --no-create do not create output files
802 --srcdir=DIR find the sources in DIR [configure dir or \`..']
803
804_ACEOF
805
806 cat <<_ACEOF
807Installation directories:
808 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000809 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +0000810 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000811 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +0000812
813By default, \`make install' will install all the files in
814\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
815an installation prefix other than \`$ac_default_prefix' using \`--prefix',
816for instance \`--prefix=\$HOME'.
817
818For better control, use the options below.
819
820Fine tuning of the installation directories:
821 --bindir=DIR user executables [EPREFIX/bin]
822 --sbindir=DIR system admin executables [EPREFIX/sbin]
823 --libexecdir=DIR program executables [EPREFIX/libexec]
824 --datadir=DIR read-only architecture-independent data [PREFIX/share]
825 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
826 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
827 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
828 --libdir=DIR object code libraries [EPREFIX/lib]
829 --includedir=DIR C header files [PREFIX/include]
830 --oldincludedir=DIR C header files for non-gcc [/usr/include]
831 --infodir=DIR info documentation [PREFIX/info]
832 --mandir=DIR man documentation [PREFIX/man]
833_ACEOF
834
835 cat <<\_ACEOF
836_ACEOF
837fi
838
839if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000840 case $ac_init_help in
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000841 short | recursive ) echo "Configuration of python 2.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000842 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 cat <<\_ACEOF
844
845Optional Features:
846 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
847 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000848 --enable-framework[=INSTALLDIR]
849 Build (MacOSX|Darwin) framework
850 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +0000851 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000852 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
853 --enable-ipv6 Enable ipv6 (with ipv4) support
854 --disable-ipv6 Disable ipv6 support
855 --enable-unicode[=ucs[24]]
856 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857
858Optional Packages:
859 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
860 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000861 --without-gcc never use gcc
862 --with-cxx=<compiler> enable C++ support
863 --with-suffix=.exe set executable suffix
864 --with-pydebug build with Py_DEBUG defined
865 --with-libs='lib1 ...' link against additional libs
866 --with-signal-module disable/enable signal module
867 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
868 --with(out)-threads[=DIRECTORY]
869 disable/enable thread support
870 --with(out)-thread[=DIRECTORY]
871 deprecated; use --with(out)-threads
872 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000873 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000874 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000875 --with(out)-pymalloc disable/enable specialized mallocs
876 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000877 --with-fpectl enable SIGFPE catching
878 --with-libm=STRING math library
879 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000880
881Some influential environment variables:
882 CC C compiler command
883 CFLAGS C compiler flags
884 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
885 nonstandard directory <lib dir>
886 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
887 headers in a nonstandard directory <include dir>
888 CPP C preprocessor
889
890Use these variables to override the choices made by `configure' or to help
891it to find libraries and programs with nonstandard names/locations.
892
Martin v. Löwis1d459062005-03-14 21:23:33 +0000893Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +0000894_ACEOF
895fi
896
897if test "$ac_init_help" = "recursive"; then
898 # If there are subdirs, report their specific --help.
899 ac_popdir=`pwd`
900 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
901 test -d $ac_dir || continue
902 ac_builddir=.
903
904if test "$ac_dir" != .; then
905 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
906 # A "../" for each directory in $ac_dir_suffix.
907 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
908else
909 ac_dir_suffix= ac_top_builddir=
910fi
911
912case $srcdir in
913 .) # No --srcdir option. We are building in place.
914 ac_srcdir=.
915 if test -z "$ac_top_builddir"; then
916 ac_top_srcdir=.
917 else
918 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
919 fi ;;
920 [\\/]* | ?:[\\/]* ) # Absolute path.
921 ac_srcdir=$srcdir$ac_dir_suffix;
922 ac_top_srcdir=$srcdir ;;
923 *) # Relative path.
924 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
925 ac_top_srcdir=$ac_top_builddir$srcdir ;;
926esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000927
928# Do not use `cd foo && pwd` to compute absolute paths, because
929# the directories may not exist.
930case `pwd` in
931.) ac_abs_builddir="$ac_dir";;
932*)
933 case "$ac_dir" in
934 .) ac_abs_builddir=`pwd`;;
935 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
936 *) ac_abs_builddir=`pwd`/"$ac_dir";;
937 esac;;
938esac
939case $ac_abs_builddir in
940.) ac_abs_top_builddir=${ac_top_builddir}.;;
941*)
942 case ${ac_top_builddir}. in
943 .) ac_abs_top_builddir=$ac_abs_builddir;;
944 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
945 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_srcdir=$ac_srcdir;;
950*)
951 case $ac_srcdir in
952 .) ac_abs_srcdir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
954 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_top_srcdir=$ac_top_srcdir;;
959*)
960 case $ac_top_srcdir in
961 .) ac_abs_top_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
963 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
964 esac;;
965esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000966
967 cd $ac_dir
968 # Check for guested configure; otherwise get Cygnus style configure.
969 if test -f $ac_srcdir/configure.gnu; then
970 echo
971 $SHELL $ac_srcdir/configure.gnu --help=recursive
972 elif test -f $ac_srcdir/configure; then
973 echo
974 $SHELL $ac_srcdir/configure --help=recursive
975 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000976 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 echo
978 $ac_configure --help
979 else
980 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
981 fi
Brett Cannon43802422005-02-10 20:48:03 +0000982 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 done
984fi
985
986test -n "$ac_init_help" && exit 0
987if $ac_init_version; then
988 cat <<\_ACEOF
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000989python configure 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +0000990generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000991
Skip Montanarof0d5f792004-08-15 14:08:23 +0000992Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000993This configure script is free software; the Free Software Foundation
994gives unlimited permission to copy, distribute and modify it.
995_ACEOF
996 exit 0
997fi
998exec 5>config.log
999cat >&5 <<_ACEOF
1000This file contains any messages produced by compilers while
1001running configure, to aid debugging if configure makes a mistake.
1002
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001003It was created by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001004generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001005
1006 $ $0 $@
1007
1008_ACEOF
1009{
1010cat <<_ASUNAME
1011## --------- ##
1012## Platform. ##
1013## --------- ##
1014
1015hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1016uname -m = `(uname -m) 2>/dev/null || echo unknown`
1017uname -r = `(uname -r) 2>/dev/null || echo unknown`
1018uname -s = `(uname -s) 2>/dev/null || echo unknown`
1019uname -v = `(uname -v) 2>/dev/null || echo unknown`
1020
1021/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1022/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1023
1024/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1025/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1026/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1027hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1028/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1029/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1030/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1031
1032_ASUNAME
1033
1034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1035for as_dir in $PATH
1036do
1037 IFS=$as_save_IFS
1038 test -z "$as_dir" && as_dir=.
1039 echo "PATH: $as_dir"
1040done
1041
1042} >&5
1043
1044cat >&5 <<_ACEOF
1045
1046
1047## ----------- ##
1048## Core tests. ##
1049## ----------- ##
1050
1051_ACEOF
1052
1053
1054# Keep a trace of the command line.
1055# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001056# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001057# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001058# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001059ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001060ac_configure_args0=
1061ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001062ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001063ac_must_keep_next=false
1064for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001065do
Skip Montanaro6dead952003-09-25 14:50:04 +00001066 for ac_arg
1067 do
1068 case $ac_arg in
1069 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1070 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1071 | -silent | --silent | --silen | --sile | --sil)
1072 continue ;;
1073 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1074 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1075 esac
1076 case $ac_pass in
1077 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1078 2)
1079 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1080 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001081 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001082 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001083 case $ac_arg in
1084 *=* | --config-cache | -C | -disable-* | --disable-* \
1085 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1086 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1087 | -with-* | --with-* | -without-* | --without-* | --x)
1088 case "$ac_configure_args0 " in
1089 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1090 esac
1091 ;;
1092 -* ) ac_must_keep_next=true ;;
1093 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001094 fi
1095 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1096 # Get rid of the leading space.
1097 ac_sep=" "
1098 ;;
1099 esac
1100 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001101done
Skip Montanaro6dead952003-09-25 14:50:04 +00001102$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1103$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001104
1105# When interrupted or exit'd, cleanup temporary files, and complete
1106# config.log. We remove comments because anyway the quotes in there
1107# would cause problems or look ugly.
1108# WARNING: Be sure not to use single quotes in there, as some shells,
1109# such as our DU 5.0 friend, will then `close' the trap.
1110trap 'exit_status=$?
1111 # Save into config.log some information that might help in debugging.
1112 {
1113 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001114
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 cat <<\_ASBOX
1116## ---------------- ##
1117## Cache variables. ##
1118## ---------------- ##
1119_ASBOX
1120 echo
1121 # The following way of writing the cache mishandles newlines in values,
1122{
1123 (set) 2>&1 |
1124 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1125 *ac_space=\ *)
1126 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001127 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1128 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ;;
1130 *)
1131 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001132 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 ;;
1134 esac;
1135}
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137
1138 cat <<\_ASBOX
1139## ----------------- ##
1140## Output variables. ##
1141## ----------------- ##
1142_ASBOX
1143 echo
1144 for ac_var in $ac_subst_vars
1145 do
1146 eval ac_val=$`echo $ac_var`
1147 echo "$ac_var='"'"'$ac_val'"'"'"
1148 done | sort
1149 echo
1150
1151 if test -n "$ac_subst_files"; then
1152 cat <<\_ASBOX
1153## ------------- ##
1154## Output files. ##
1155## ------------- ##
1156_ASBOX
1157 echo
1158 for ac_var in $ac_subst_files
1159 do
1160 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001161 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001162 done | sort
1163 echo
1164 fi
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 if test -s confdefs.h; then
1167 cat <<\_ASBOX
1168## ----------- ##
1169## confdefs.h. ##
1170## ----------- ##
1171_ASBOX
1172 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001173 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 echo
1175 fi
1176 test "$ac_signal" != 0 &&
1177 echo "$as_me: caught signal $ac_signal"
1178 echo "$as_me: exit $exit_status"
1179 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001180 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1182 exit $exit_status
1183 ' 0
1184for ac_signal in 1 2 13 15; do
1185 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1186done
1187ac_signal=0
1188
1189# confdefs.h avoids OS command line length limits that DEFS can exceed.
1190rm -rf conftest* confdefs.h
1191# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1192echo >confdefs.h
1193
1194# Predefined preprocessor variables.
1195
1196cat >>confdefs.h <<_ACEOF
1197#define PACKAGE_NAME "$PACKAGE_NAME"
1198_ACEOF
1199
1200
1201cat >>confdefs.h <<_ACEOF
1202#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1203_ACEOF
1204
1205
1206cat >>confdefs.h <<_ACEOF
1207#define PACKAGE_VERSION "$PACKAGE_VERSION"
1208_ACEOF
1209
1210
1211cat >>confdefs.h <<_ACEOF
1212#define PACKAGE_STRING "$PACKAGE_STRING"
1213_ACEOF
1214
1215
1216cat >>confdefs.h <<_ACEOF
1217#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1218_ACEOF
1219
1220
1221# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222# Prefer explicitly selected file to automatically selected ones.
1223if test -z "$CONFIG_SITE"; then
1224 if test "x$prefix" != xNONE; then
1225 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1226 else
1227 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1228 fi
1229fi
1230for ac_site_file in $CONFIG_SITE; do
1231 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1233echo "$as_me: loading site script $ac_site_file" >&6;}
1234 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235 . "$ac_site_file"
1236 fi
1237done
1238
1239if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 # Some versions of bash will fail to source /dev/null (special
1241 # files actually), so we avoid doing that.
1242 if test -f "$cache_file"; then
1243 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1244echo "$as_me: loading cache $cache_file" >&6;}
1245 case $cache_file in
1246 [\\/]* | ?:[\\/]* ) . $cache_file;;
1247 *) . ./$cache_file;;
1248 esac
1249 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001250else
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1252echo "$as_me: creating cache $cache_file" >&6;}
1253 >$cache_file
1254fi
1255
1256# Check that the precious variables saved in the cache have kept the same
1257# value.
1258ac_cache_corrupted=false
1259for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001260 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1262 eval ac_new_set=\$ac_env_${ac_var}_set
1263 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1264 eval ac_new_val="\$ac_env_${ac_var}_value"
1265 case $ac_old_set,$ac_new_set in
1266 set,)
1267 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1268echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1269 ac_cache_corrupted=: ;;
1270 ,set)
1271 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1272echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1273 ac_cache_corrupted=: ;;
1274 ,);;
1275 *)
1276 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001277 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001278echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001279 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001280echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001281 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001282echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001283 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 fi;;
1285 esac
1286 # Pass precious variables to config.status.
1287 if test "$ac_new_set" = set; then
1288 case $ac_new_val in
1289 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1290 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1291 *) ac_arg=$ac_var=$ac_new_val ;;
1292 esac
1293 case " $ac_configure_args " in
1294 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1295 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1296 esac
1297 fi
1298done
1299if $ac_cache_corrupted; then
1300 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1301echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1302 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1303echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1304 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305fi
1306
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1311ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Michael W. Hudson54241132001-12-07 15:38:26 +00001314
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
Martin v. Löwis88afe662002-10-26 13:47:44 +00001330
1331
1332
1333
1334
1335
1336
1337
1338
Skip Montanaro6dead952003-09-25 14:50:04 +00001339
1340 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343
1344
1345
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001346
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001347
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001348# We don't use PACKAGE_ variables, and they cause conflicts
1349# with other autoconf-based packages that include Python.h
1350grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1351rm confdefs.h
1352mv confdefs.h.new confdefs.h
1353
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001354
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001355VERSION=2.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001356
Martin v. Löwis1142de32002-03-29 16:28:31 +00001357
1358SOVERSION=1.0
1359
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001360# The later defininition of _XOPEN_SOURCE disables certain features
1361# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1362
1363cat >>confdefs.h <<\_ACEOF
1364#define _GNU_SOURCE 1
1365_ACEOF
1366
1367
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001368# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1369# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1370# them.
1371
1372cat >>confdefs.h <<\_ACEOF
1373#define _NETBSD_SOURCE 1
1374_ACEOF
1375
1376
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001377# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1378# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1379# them.
1380
1381cat >>confdefs.h <<\_ACEOF
1382#define __BSD_VISIBLE 1
1383_ACEOF
1384
1385
Martin v. Löwisd6320502004-08-12 13:45:08 +00001386# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1387# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1388
1389cat >>confdefs.h <<\_ACEOF
1390#define _BSD_TYPES 1
1391_ACEOF
1392
1393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001394define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001395
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001396# Arguments passed to configure.
1397
1398CONFIG_ARGS="$ac_configure_args"
1399
Jack Jansene578a632001-08-15 01:27:14 +00001400# Check whether --enable-framework or --disable-framework was given.
1401if test "${enable_framework+set}" = set; then
1402 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
Jack Jansene578a632001-08-15 01:27:14 +00001404 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001406 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001407 esac
1408 case $enableval in
1409 no)
1410 PYTHONFRAMEWORK=
1411 PYTHONFRAMEWORKDIR=no-framework
1412 PYTHONFRAMEWORKPREFIX=
1413 PYTHONFRAMEWORKINSTALLDIR=
1414 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001415 ;;
1416 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001417 PYTHONFRAMEWORK=Python
1418 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001419 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001420 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1421 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001422 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
Guido van Rossum563e7081996-09-10 18:20:48 +00001424else
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
Jack Jansene578a632001-08-15 01:27:14 +00001426 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001427 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001428 PYTHONFRAMEWORKPREFIX=
1429 PYTHONFRAMEWORKINSTALLDIR=
1430 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001433
1434
1435
1436
Jack Jansene578a632001-08-15 01:27:14 +00001437
1438##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439## AC_HELP_STRING(--with-dyld,
1440## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001441##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001442# Set name for machine-dependent library files
1443
Martin v. Löwis11437992002-04-12 09:54:03 +00001444echo "$as_me:$LINENO: checking MACHDEP" >&5
1445echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001446if test -z "$MACHDEP"
1447then
Guido van Rossum563e7081996-09-10 18:20:48 +00001448 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001449 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1450 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001451 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001452 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001453 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001454 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001455 ac_md_system=`echo $ac_sys_system |
1456 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1457 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001458 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001459 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001460
Guido van Rossum07397971997-04-29 21:49:50 +00001461 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001462 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001463 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001464 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001465 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001466 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001467 esac
1468fi
Guido van Rossum91922671997-10-09 20:24:13 +00001469
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001470# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1471# disable features if it is defined, without any means to access these
1472# features as extensions. For these systems, we skip the definition of
1473# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1474# some feature, make sure there is no alternative way to access this
1475# feature. Also, when using wildcards, make sure you have verified the
1476# need for not defining _XOPEN_SOURCE on all systems matching the
1477# wildcard, and that the wildcard does not include future systems
1478# (which may remove their limitations).
1479case $ac_sys_system/$ac_sys_release in
1480 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1481 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001482 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz671b9e32006-01-09 07:07:12 +00001483 OpenBSD/2.* | OpenBSD/3.[012345678])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001484 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001485 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1486 # of union __?sigval. Reported by Stuart Bishop.
1487 SunOS/5.6)
1488 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001489 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1490 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001491 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001492 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001493 define_xopen_source=no;;
1494 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001495 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001496 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001497 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001498 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1499 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1500 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1501 # This should hopefully be fixed in FreeBSD 4.9
1502 FreeBSD/4.8* | Darwin/6* )
1503 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001504 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1505 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1506 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001507 AIX/4)
1508 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001509 AIX/5)
1510 if test `uname -r` -eq 1; then
1511 define_xopen_source=no
1512 fi
1513 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001514 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1515 # disables platform specific features beyond repair.
1516 Darwin/8.*)
1517 define_xopen_source=no
1518 ;;
1519
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001520esac
1521
1522if test $define_xopen_source = yes
1523then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1525 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00001526 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
1527 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00001528 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00001529 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00001530
1531cat >>confdefs.h <<\_ACEOF
1532#define _XOPEN_SOURCE 500
1533_ACEOF
1534
1535 ;;
1536 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001537
1538cat >>confdefs.h <<\_ACEOF
1539#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001540_ACEOF
1541
Skip Montanarof0d5f792004-08-15 14:08:23 +00001542 ;;
1543 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001544
1545 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1546 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1547 # several APIs are not declared. Since this is also needed in some
1548 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00001549 # except for Solaris 10, where it must not be defined,
1550 # as it implies XPG4.2
1551 case $ac_sys_system/$ac_sys_release in
1552 SunOS/5.10)
1553 ;;
1554 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001555
1556cat >>confdefs.h <<\_ACEOF
1557#define _XOPEN_SOURCE_EXTENDED 1
1558_ACEOF
1559
Martin v. Löwis7dece662005-11-26 11:38:24 +00001560 ;;
1561 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001562
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001563
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001564cat >>confdefs.h <<\_ACEOF
1565#define _POSIX_C_SOURCE 200112L
1566_ACEOF
1567
1568
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001569fi
1570
Guido van Rossum91922671997-10-09 20:24:13 +00001571#
1572# SGI compilers allow the specification of the both the ABI and the
1573# ISA on the command line. Depending on the values of these switches,
1574# different and often incompatable code will be generated.
1575#
1576# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1577# thus supply support for various ABI/ISA combinations. The MACHDEP
1578# variable is also adjusted.
1579#
1580
1581if test ! -z "$SGI_ABI"
1582then
1583 CC="cc $SGI_ABI"
1584 LDFLAGS="$SGI_ABI $LDFLAGS"
1585 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001587echo "$as_me:$LINENO: result: $MACHDEP" >&5
1588echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001589
Jack Jansen83f898c2002-12-30 22:23:40 +00001590# And add extra plat-mac for darwin
1591
Jack Jansen7b59b422003-03-17 15:44:10 +00001592
Jack Jansen83f898c2002-12-30 22:23:40 +00001593echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1594echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1595if test -z "$EXTRAPLATDIR"
1596then
1597 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001598 darwin)
1599 EXTRAPLATDIR="\$(PLATMACDIRS)"
1600 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1601 ;;
1602 *)
1603 EXTRAPLATDIR=""
1604 EXTRAMACHDEPPATH=""
1605 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001606 esac
1607fi
1608echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1609echo "${ECHO_T}$EXTRAPLATDIR" >&6
1610
Jack Jansen6b08a402004-06-03 12:41:45 +00001611# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1612# it may influence the way we can build extensions, so distutils
1613# needs to check it
1614
1615CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1616
Guido van Rossum627b2d71993-12-24 10:39:16 +00001617# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001618
1619# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1620# for debug/optimization stuff. BASECFLAGS is for flags that are required
1621# just to get things to compile and link. Users are free to override OPT
1622# when running configure or make. The build should not break if they do.
1623# BASECFLAGS should generally not be messed with, however.
1624
1625# XXX shouldn't some/most/all of this code be merged with the stuff later
1626# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001627echo "$as_me:$LINENO: checking for --without-gcc" >&5
1628echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001631if test "${with_gcc+set}" = set; then
1632 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001633
Guido van Rossum7f43da71994-08-01 12:15:30 +00001634 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001635 no) CC=cc
1636 without_gcc=yes;;
1637 yes) CC=gcc
1638 without_gcc=no;;
1639 *) CC=$withval
1640 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001641 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001642else
Martin v. Löwis11437992002-04-12 09:54:03 +00001643
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001644 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001645 AIX*) CC=cc_r
1646 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001647 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001648 case $BE_HOST_CPU in
1649 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001650 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001651 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001652 BASECFLAGS="$BASECFLAGS -export pragma"
1653 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001654 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001655 ;;
1656 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001657 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001658 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001659 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001660 ;;
1661 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001662 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1663echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1664 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001665 ;;
1666 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001667 AR="\$(srcdir)/Modules/ar_beos"
1668 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001669 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001670 Monterey*)
1671 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001672 without_gcc=;;
1673 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001674 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001675fi;
1676echo "$as_me:$LINENO: result: $without_gcc" >&5
1677echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001678
1679
Guido van Rossum95012191999-12-16 17:50:52 +00001680
Fred Drakea1a84e72001-03-06 05:52:16 +00001681MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001682echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1683echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1684
Guido van Rossum95012191999-12-16 17:50:52 +00001685# Check whether --with-cxx or --without-cxx was given.
1686if test "${with_cxx+set}" = set; then
1687 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001688
Martin v. Löwis22352952000-12-13 17:37:02 +00001689 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001690 case $withval in
1691 no) CXX=
1692 with_cxx=no;;
1693 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001694 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001695 with_cxx=$withval;;
1696 esac
1697else
Martin v. Löwis11437992002-04-12 09:54:03 +00001698
Guido van Rossum95012191999-12-16 17:50:52 +00001699 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001700 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001701
Martin v. Löwis11437992002-04-12 09:54:03 +00001702fi;
1703echo "$as_me:$LINENO: result: $with_cxx" >&5
1704echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001705
1706if test "$with_cxx" = "yes"
1707then
Martin v. Löwis11437992002-04-12 09:54:03 +00001708 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1709echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1710 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001711fi
1712
1713
1714
1715
Martin v. Löwis11437992002-04-12 09:54:03 +00001716if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001717then
1718 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1719do
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001721set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001722echo "$as_me:$LINENO: checking for $ac_word" >&5
1723echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1724if test "${ac_cv_prog_CXX+set}" = set; then
1725 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001726else
1727 if test -n "$CXX"; then
1728 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1729else
Martin v. Löwis11437992002-04-12 09:54:03 +00001730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1731for as_dir in $PATH
1732do
1733 IFS=$as_save_IFS
1734 test -z "$as_dir" && as_dir=.
1735 for ac_exec_ext in '' $ac_executable_extensions; do
1736 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1737 ac_cv_prog_CXX="$ac_prog"
1738 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1739 break 2
1740 fi
1741done
1742done
1743
Martin v. Löwis22352952000-12-13 17:37:02 +00001744fi
1745fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001746CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001747if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001748 echo "$as_me:$LINENO: result: $CXX" >&5
1749echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001750else
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 echo "$as_me:$LINENO: result: no" >&5
1752echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001753fi
1754
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001756done
1757test -n "$CXX" || CXX="notfound"
1758
1759 if test "$CXX" = "notfound"
1760 then
1761 CXX=
1762 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001763 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001764ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001765ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1766ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1767ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00001769/* confdefs.h. */
1770_ACEOF
1771cat confdefs.h >>conftest.$ac_ext
1772cat >>conftest.$ac_ext <<_ACEOF
1773/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001774
Martin v. Löwis11437992002-04-12 09:54:03 +00001775int
1776main ()
1777{
Michael W. Hudson54241132001-12-07 15:38:26 +00001778
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 ;
1780 return 0;
1781}
1782_ACEOF
1783ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001784ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001785# Try to create an executable without -o first, disregard a.out.
1786# It will help us diagnose broken compilers, and finding out an intuition
1787# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00001788echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1789echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001790ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1791if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1792 (eval $ac_link_default) 2>&5
1793 ac_status=$?
1794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1795 (exit $ac_status); }; then
1796 # Find the output, starting from the most likely. This scheme is
1797# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1798# resort.
1799
1800# Be careful to initialize this variable, since it used to be cached.
1801# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1802ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001803# b.out is created by i960 compilers.
1804for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1805do
1806 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001807 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001808 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001809 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001810 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001811 # This is the source file.
1812 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001813 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001814 # We found the default executable, but exeext='' is most
1815 # certainly right.
1816 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001817 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001818 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1819 # FIXME: I believe we export ac_cv_exeext for Libtool,
1820 # but it would be cool to find out if it's true. Does anybody
1821 # maintain Libtool? --akim.
1822 export ac_cv_exeext
1823 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001824 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001825 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001826 esac
1827done
1828else
1829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001830sed 's/^/| /' conftest.$ac_ext >&5
1831
1832{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1833See \`config.log' for more details." >&5
1834echo "$as_me: error: C++ compiler cannot create executables
1835See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001836 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001838
1839ac_exeext=$ac_cv_exeext
1840echo "$as_me:$LINENO: result: $ac_file" >&5
1841echo "${ECHO_T}$ac_file" >&6
1842
1843# Check the compiler produces executables we can run. If not, either
1844# the compiler is broken, or we cross compile.
1845echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1846echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1847# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1848# If not cross compiling, check that we can run a simple program.
1849if test "$cross_compiling" != yes; then
1850 if { ac_try='./$ac_file'
1851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1852 (eval $ac_try) 2>&5
1853 ac_status=$?
1854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1855 (exit $ac_status); }; }; then
1856 cross_compiling=no
1857 else
1858 if test "$cross_compiling" = maybe; then
1859 cross_compiling=yes
1860 else
1861 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001862If you meant to cross compile, use \`--host'.
1863See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001864echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001865If you meant to cross compile, use \`--host'.
1866See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001867 { (exit 1); exit 1; }; }
1868 fi
1869 fi
1870fi
1871echo "$as_me:$LINENO: result: yes" >&5
1872echo "${ECHO_T}yes" >&6
1873
Skip Montanaro6dead952003-09-25 14:50:04 +00001874rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001875ac_clean_files=$ac_clean_files_save
1876# Check the compiler produces executables we can run. If not, either
1877# the compiler is broken, or we cross compile.
1878echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1879echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1880echo "$as_me:$LINENO: result: $cross_compiling" >&5
1881echo "${ECHO_T}$cross_compiling" >&6
1882
1883echo "$as_me:$LINENO: checking for suffix of executables" >&5
1884echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1886 (eval $ac_link) 2>&5
1887 ac_status=$?
1888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1889 (exit $ac_status); }; then
1890 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1891# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1892# work properly (i.e., refer to `conftest.exe'), while it won't with
1893# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001894for ac_file in conftest.exe conftest conftest.*; do
1895 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001897 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001898 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001899 export ac_cv_exeext
1900 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001901 * ) break;;
1902 esac
1903done
1904else
Skip Montanaro6dead952003-09-25 14:50:04 +00001905 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1906See \`config.log' for more details." >&5
1907echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1908See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001909 { (exit 1); exit 1; }; }
1910fi
1911
1912rm -f conftest$ac_cv_exeext
1913echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1914echo "${ECHO_T}$ac_cv_exeext" >&6
1915
1916rm -f conftest.$ac_ext
1917EXEEXT=$ac_cv_exeext
1918ac_exeext=$EXEEXT
1919
1920 ac_ext=c
1921ac_cpp='$CPP $CPPFLAGS'
1922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1924ac_compiler_gnu=$ac_cv_c_compiler_gnu
1925
1926
Martin v. Löwis22352952000-12-13 17:37:02 +00001927
1928 fi
1929fi
1930
Guido van Rossum8b131c51995-03-09 14:10:13 +00001931# If the user switches compilers, we can't believe the cache
1932if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1933then
Martin v. Löwis11437992002-04-12 09:54:03 +00001934 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1935(it is also a good idea to do 'make clean' before compiling)" >&5
1936echo "$as_me: error: cached CC is different -- throw away $cache_file
1937(it is also a good idea to do 'make clean' before compiling)" >&2;}
1938 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001939fi
1940
Martin v. Löwis11437992002-04-12 09:54:03 +00001941ac_ext=c
1942ac_cpp='$CPP $CPPFLAGS'
1943ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1944ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1945ac_compiler_gnu=$ac_cv_c_compiler_gnu
1946if test -n "$ac_tool_prefix"; then
1947 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1948set dummy ${ac_tool_prefix}gcc; ac_word=$2
1949echo "$as_me:$LINENO: checking for $ac_word" >&5
1950echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1951if test "${ac_cv_prog_CC+set}" = set; then
1952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001953else
1954 if test -n "$CC"; then
1955 ac_cv_prog_CC="$CC" # Let the user override the test.
1956else
Martin v. Löwis11437992002-04-12 09:54:03 +00001957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1958for as_dir in $PATH
1959do
1960 IFS=$as_save_IFS
1961 test -z "$as_dir" && as_dir=.
1962 for ac_exec_ext in '' $ac_executable_extensions; do
1963 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1964 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1965 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1966 break 2
1967 fi
1968done
1969done
1970
Jack Jansendd19cf82001-12-06 22:36:17 +00001971fi
1972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001973CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001974if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001975 echo "$as_me:$LINENO: result: $CC" >&5
1976echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001977else
Martin v. Löwis11437992002-04-12 09:54:03 +00001978 echo "$as_me:$LINENO: result: no" >&5
1979echo "${ECHO_T}no" >&6
1980fi
1981
1982fi
1983if test -z "$ac_cv_prog_CC"; then
1984 ac_ct_CC=$CC
1985 # Extract the first word of "gcc", so it can be a program name with args.
1986set dummy gcc; ac_word=$2
1987echo "$as_me:$LINENO: checking for $ac_word" >&5
1988echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1989if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1990 echo $ECHO_N "(cached) $ECHO_C" >&6
1991else
1992 if test -n "$ac_ct_CC"; then
1993 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1994else
1995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1996for as_dir in $PATH
1997do
1998 IFS=$as_save_IFS
1999 test -z "$as_dir" && as_dir=.
2000 for ac_exec_ext in '' $ac_executable_extensions; do
2001 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2002 ac_cv_prog_ac_ct_CC="gcc"
2003 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2004 break 2
2005 fi
2006done
2007done
2008
2009fi
2010fi
2011ac_ct_CC=$ac_cv_prog_ac_ct_CC
2012if test -n "$ac_ct_CC"; then
2013 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2014echo "${ECHO_T}$ac_ct_CC" >&6
2015else
2016 echo "$as_me:$LINENO: result: no" >&5
2017echo "${ECHO_T}no" >&6
2018fi
2019
2020 CC=$ac_ct_CC
2021else
2022 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002023fi
2024
Jack Jansendd19cf82001-12-06 22:36:17 +00002025if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002026 if test -n "$ac_tool_prefix"; then
2027 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2028set dummy ${ac_tool_prefix}cc; ac_word=$2
2029echo "$as_me:$LINENO: checking for $ac_word" >&5
2030echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2031if test "${ac_cv_prog_CC+set}" = set; then
2032 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002033else
2034 if test -n "$CC"; then
2035 ac_cv_prog_CC="$CC" # Let the user override the test.
2036else
Martin v. Löwis11437992002-04-12 09:54:03 +00002037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2038for as_dir in $PATH
2039do
2040 IFS=$as_save_IFS
2041 test -z "$as_dir" && as_dir=.
2042 for ac_exec_ext in '' $ac_executable_extensions; do
2043 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2044 ac_cv_prog_CC="${ac_tool_prefix}cc"
2045 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2046 break 2
2047 fi
2048done
2049done
2050
2051fi
2052fi
2053CC=$ac_cv_prog_CC
2054if test -n "$CC"; then
2055 echo "$as_me:$LINENO: result: $CC" >&5
2056echo "${ECHO_T}$CC" >&6
2057else
2058 echo "$as_me:$LINENO: result: no" >&5
2059echo "${ECHO_T}no" >&6
2060fi
2061
2062fi
2063if test -z "$ac_cv_prog_CC"; then
2064 ac_ct_CC=$CC
2065 # Extract the first word of "cc", so it can be a program name with args.
2066set dummy cc; ac_word=$2
2067echo "$as_me:$LINENO: checking for $ac_word" >&5
2068echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2069if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2070 echo $ECHO_N "(cached) $ECHO_C" >&6
2071else
2072 if test -n "$ac_ct_CC"; then
2073 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2074else
2075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2076for as_dir in $PATH
2077do
2078 IFS=$as_save_IFS
2079 test -z "$as_dir" && as_dir=.
2080 for ac_exec_ext in '' $ac_executable_extensions; do
2081 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2082 ac_cv_prog_ac_ct_CC="cc"
2083 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2084 break 2
2085 fi
2086done
2087done
2088
2089fi
2090fi
2091ac_ct_CC=$ac_cv_prog_ac_ct_CC
2092if test -n "$ac_ct_CC"; then
2093 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2094echo "${ECHO_T}$ac_ct_CC" >&6
2095else
2096 echo "$as_me:$LINENO: result: no" >&5
2097echo "${ECHO_T}no" >&6
2098fi
2099
2100 CC=$ac_ct_CC
2101else
2102 CC="$ac_cv_prog_CC"
2103fi
2104
2105fi
2106if test -z "$CC"; then
2107 # Extract the first word of "cc", so it can be a program name with args.
2108set dummy cc; ac_word=$2
2109echo "$as_me:$LINENO: checking for $ac_word" >&5
2110echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2111if test "${ac_cv_prog_CC+set}" = set; then
2112 echo $ECHO_N "(cached) $ECHO_C" >&6
2113else
2114 if test -n "$CC"; then
2115 ac_cv_prog_CC="$CC" # Let the user override the test.
2116else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002117 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2119for as_dir in $PATH
2120do
2121 IFS=$as_save_IFS
2122 test -z "$as_dir" && as_dir=.
2123 for ac_exec_ext in '' $ac_executable_extensions; do
2124 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2125 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2126 ac_prog_rejected=yes
2127 continue
2128 fi
2129 ac_cv_prog_CC="cc"
2130 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2131 break 2
2132 fi
2133done
2134done
2135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002136if test $ac_prog_rejected = yes; then
2137 # We found a bogon in the path, so make sure we never use it.
2138 set dummy $ac_cv_prog_CC
2139 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002140 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002141 # We chose a different compiler from the bogus one.
2142 # However, it has the same basename, so the bogon will be chosen
2143 # first if we set CC to just the basename; use the full file name.
2144 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002145 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002146 fi
2147fi
2148fi
2149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002150CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002151if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002152 echo "$as_me:$LINENO: result: $CC" >&5
2153echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002154else
Martin v. Löwis11437992002-04-12 09:54:03 +00002155 echo "$as_me:$LINENO: result: no" >&5
2156echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002157fi
2158
Martin v. Löwis11437992002-04-12 09:54:03 +00002159fi
2160if test -z "$CC"; then
2161 if test -n "$ac_tool_prefix"; then
2162 for ac_prog in cl
2163 do
2164 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2165set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2166echo "$as_me:$LINENO: checking for $ac_word" >&5
2167echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2168if test "${ac_cv_prog_CC+set}" = set; then
2169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002170else
2171 if test -n "$CC"; then
2172 ac_cv_prog_CC="$CC" # Let the user override the test.
2173else
Martin v. Löwis11437992002-04-12 09:54:03 +00002174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2175for as_dir in $PATH
2176do
2177 IFS=$as_save_IFS
2178 test -z "$as_dir" && as_dir=.
2179 for ac_exec_ext in '' $ac_executable_extensions; do
2180 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2181 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2182 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2183 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002184 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002185done
2186done
2187
2188fi
2189fi
2190CC=$ac_cv_prog_CC
2191if test -n "$CC"; then
2192 echo "$as_me:$LINENO: result: $CC" >&5
2193echo "${ECHO_T}$CC" >&6
2194else
2195 echo "$as_me:$LINENO: result: no" >&5
2196echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002197fi
2198
Martin v. Löwis11437992002-04-12 09:54:03 +00002199 test -n "$CC" && break
2200 done
2201fi
2202if test -z "$CC"; then
2203 ac_ct_CC=$CC
2204 for ac_prog in cl
2205do
2206 # Extract the first word of "$ac_prog", so it can be a program name with args.
2207set dummy $ac_prog; ac_word=$2
2208echo "$as_me:$LINENO: checking for $ac_word" >&5
2209echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2210if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2211 echo $ECHO_N "(cached) $ECHO_C" >&6
2212else
2213 if test -n "$ac_ct_CC"; then
2214 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2215else
2216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2217for as_dir in $PATH
2218do
2219 IFS=$as_save_IFS
2220 test -z "$as_dir" && as_dir=.
2221 for ac_exec_ext in '' $ac_executable_extensions; do
2222 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2223 ac_cv_prog_ac_ct_CC="$ac_prog"
2224 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2225 break 2
2226 fi
2227done
2228done
Jack Jansendd19cf82001-12-06 22:36:17 +00002229
Martin v. Löwis11437992002-04-12 09:54:03 +00002230fi
2231fi
2232ac_ct_CC=$ac_cv_prog_ac_ct_CC
2233if test -n "$ac_ct_CC"; then
2234 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2235echo "${ECHO_T}$ac_ct_CC" >&6
2236else
2237 echo "$as_me:$LINENO: result: no" >&5
2238echo "${ECHO_T}no" >&6
2239fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002240
Martin v. Löwis11437992002-04-12 09:54:03 +00002241 test -n "$ac_ct_CC" && break
2242done
Michael W. Hudson54241132001-12-07 15:38:26 +00002243
Martin v. Löwis11437992002-04-12 09:54:03 +00002244 CC=$ac_ct_CC
2245fi
2246
2247fi
2248
2249
Skip Montanaro6dead952003-09-25 14:50:04 +00002250test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2251See \`config.log' for more details." >&5
2252echo "$as_me: error: no acceptable C compiler found in \$PATH
2253See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002254 { (exit 1); exit 1; }; }
2255
2256# Provide some information about the compiler.
2257echo "$as_me:$LINENO:" \
2258 "checking for C compiler version" >&5
2259ac_compiler=`set X $ac_compile; echo $2`
2260{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2261 (eval $ac_compiler --version </dev/null >&5) 2>&5
2262 ac_status=$?
2263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2264 (exit $ac_status); }
2265{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2266 (eval $ac_compiler -v </dev/null >&5) 2>&5
2267 ac_status=$?
2268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269 (exit $ac_status); }
2270{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2271 (eval $ac_compiler -V </dev/null >&5) 2>&5
2272 ac_status=$?
2273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2274 (exit $ac_status); }
2275
2276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002277/* confdefs.h. */
2278_ACEOF
2279cat confdefs.h >>conftest.$ac_ext
2280cat >>conftest.$ac_ext <<_ACEOF
2281/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002282
Martin v. Löwis11437992002-04-12 09:54:03 +00002283int
2284main ()
2285{
2286
2287 ;
2288 return 0;
2289}
2290_ACEOF
2291ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002292ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002293# Try to create an executable without -o first, disregard a.out.
2294# It will help us diagnose broken compilers, and finding out an intuition
2295# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002296echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2297echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002298ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2299if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2300 (eval $ac_link_default) 2>&5
2301 ac_status=$?
2302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2303 (exit $ac_status); }; then
2304 # Find the output, starting from the most likely. This scheme is
2305# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2306# resort.
2307
2308# Be careful to initialize this variable, since it used to be cached.
2309# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2310ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002311# b.out is created by i960 compilers.
2312for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2313do
2314 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002315 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002316 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002317 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002318 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002319 # This is the source file.
2320 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002321 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002322 # We found the default executable, but exeext='' is most
2323 # certainly right.
2324 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002325 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002326 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2327 # FIXME: I believe we export ac_cv_exeext for Libtool,
2328 # but it would be cool to find out if it's true. Does anybody
2329 # maintain Libtool? --akim.
2330 export ac_cv_exeext
2331 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002332 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002333 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002334 esac
2335done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002336else
Martin v. Löwis11437992002-04-12 09:54:03 +00002337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002338sed 's/^/| /' conftest.$ac_ext >&5
2339
2340{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2341See \`config.log' for more details." >&5
2342echo "$as_me: error: C compiler cannot create executables
2343See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002344 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002345fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002346
Martin v. Löwis11437992002-04-12 09:54:03 +00002347ac_exeext=$ac_cv_exeext
2348echo "$as_me:$LINENO: result: $ac_file" >&5
2349echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002350
Martin v. Löwis11437992002-04-12 09:54:03 +00002351# Check the compiler produces executables we can run. If not, either
2352# the compiler is broken, or we cross compile.
2353echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2354echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2355# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2356# If not cross compiling, check that we can run a simple program.
2357if test "$cross_compiling" != yes; then
2358 if { ac_try='./$ac_file'
2359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2360 (eval $ac_try) 2>&5
2361 ac_status=$?
2362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2363 (exit $ac_status); }; }; then
2364 cross_compiling=no
2365 else
2366 if test "$cross_compiling" = maybe; then
2367 cross_compiling=yes
2368 else
2369 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002370If you meant to cross compile, use \`--host'.
2371See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002372echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002373If you meant to cross compile, use \`--host'.
2374See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002375 { (exit 1); exit 1; }; }
2376 fi
2377 fi
2378fi
2379echo "$as_me:$LINENO: result: yes" >&5
2380echo "${ECHO_T}yes" >&6
2381
Skip Montanaro6dead952003-09-25 14:50:04 +00002382rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002383ac_clean_files=$ac_clean_files_save
2384# Check the compiler produces executables we can run. If not, either
2385# the compiler is broken, or we cross compile.
2386echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2387echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2388echo "$as_me:$LINENO: result: $cross_compiling" >&5
2389echo "${ECHO_T}$cross_compiling" >&6
2390
2391echo "$as_me:$LINENO: checking for suffix of executables" >&5
2392echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2394 (eval $ac_link) 2>&5
2395 ac_status=$?
2396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397 (exit $ac_status); }; then
2398 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2399# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2400# work properly (i.e., refer to `conftest.exe'), while it won't with
2401# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402for ac_file in conftest.exe conftest conftest.*; do
2403 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002406 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002407 export ac_cv_exeext
2408 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 * ) break;;
2410 esac
2411done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002412else
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2414See \`config.log' for more details." >&5
2415echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2416See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002417 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002418fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002419
Martin v. Löwis11437992002-04-12 09:54:03 +00002420rm -f conftest$ac_cv_exeext
2421echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2422echo "${ECHO_T}$ac_cv_exeext" >&6
2423
2424rm -f conftest.$ac_ext
2425EXEEXT=$ac_cv_exeext
2426ac_exeext=$EXEEXT
2427echo "$as_me:$LINENO: checking for suffix of object files" >&5
2428echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2429if test "${ac_cv_objext+set}" = set; then
2430 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002431else
Martin v. Löwis11437992002-04-12 09:54:03 +00002432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002433/* confdefs.h. */
2434_ACEOF
2435cat confdefs.h >>conftest.$ac_ext
2436cat >>conftest.$ac_ext <<_ACEOF
2437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
Martin v. Löwis11437992002-04-12 09:54:03 +00002439int
2440main ()
2441{
2442
2443 ;
2444 return 0;
2445}
2446_ACEOF
2447rm -f conftest.o conftest.obj
2448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2449 (eval $ac_compile) 2>&5
2450 ac_status=$?
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); }; then
2453 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2454 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002455 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2457 break;;
2458 esac
2459done
2460else
2461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002462sed 's/^/| /' conftest.$ac_ext >&5
2463
2464{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2465See \`config.log' for more details." >&5
2466echo "$as_me: error: cannot compute suffix of object files: cannot compile
2467See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 { (exit 1); exit 1; }; }
2469fi
2470
2471rm -f conftest.$ac_cv_objext conftest.$ac_ext
2472fi
2473echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2474echo "${ECHO_T}$ac_cv_objext" >&6
2475OBJEXT=$ac_cv_objext
2476ac_objext=$OBJEXT
2477echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2478echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2479if test "${ac_cv_c_compiler_gnu+set}" = set; then
2480 echo $ECHO_N "(cached) $ECHO_C" >&6
2481else
2482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002483/* confdefs.h. */
2484_ACEOF
2485cat confdefs.h >>conftest.$ac_ext
2486cat >>conftest.$ac_ext <<_ACEOF
2487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002488
Martin v. Löwis11437992002-04-12 09:54:03 +00002489int
2490main ()
2491{
2492#ifndef __GNUC__
2493 choke me
2494#endif
2495
2496 ;
2497 return 0;
2498}
2499_ACEOF
2500rm -f conftest.$ac_objext
2501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002502 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002504 grep -v '^ *+' conftest.er1 >conftest.err
2505 rm -f conftest.er1
2506 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002509 { ac_try='test -z "$ac_c_werror_flag"
2510 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2512 (eval $ac_try) 2>&5
2513 ac_status=$?
2514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515 (exit $ac_status); }; } &&
2516 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2518 (eval $ac_try) 2>&5
2519 ac_status=$?
2520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2521 (exit $ac_status); }; }; then
2522 ac_compiler_gnu=yes
2523else
2524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002525sed 's/^/| /' conftest.$ac_ext >&5
2526
Martin v. Löwis11437992002-04-12 09:54:03 +00002527ac_compiler_gnu=no
2528fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002530ac_cv_c_compiler_gnu=$ac_compiler_gnu
2531
2532fi
2533echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2534echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2535GCC=`test $ac_compiler_gnu = yes && echo yes`
2536ac_test_CFLAGS=${CFLAGS+set}
2537ac_save_CFLAGS=$CFLAGS
2538CFLAGS="-g"
2539echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2540echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2541if test "${ac_cv_prog_cc_g+set}" = set; then
2542 echo $ECHO_N "(cached) $ECHO_C" >&6
2543else
2544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002545/* confdefs.h. */
2546_ACEOF
2547cat confdefs.h >>conftest.$ac_ext
2548cat >>conftest.$ac_ext <<_ACEOF
2549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551int
2552main ()
2553{
2554
2555 ;
2556 return 0;
2557}
2558_ACEOF
2559rm -f conftest.$ac_objext
2560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002561 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002563 grep -v '^ *+' conftest.er1 >conftest.err
2564 rm -f conftest.er1
2565 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2567 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002568 { ac_try='test -z "$ac_c_werror_flag"
2569 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2571 (eval $ac_try) 2>&5
2572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); }; } &&
2575 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2577 (eval $ac_try) 2>&5
2578 ac_status=$?
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002581 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002582else
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002584sed 's/^/| /' conftest.$ac_ext >&5
2585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002587fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002588rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002590echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2591echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002592if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002594elif test $ac_cv_prog_cc_g = yes; then
2595 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002596 CFLAGS="-g -O2"
2597 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002598 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599 fi
2600else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002601 if test "$GCC" = yes; then
2602 CFLAGS="-O2"
2603 else
2604 CFLAGS=
2605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002607echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2608echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2609if test "${ac_cv_prog_cc_stdc+set}" = set; then
2610 echo $ECHO_N "(cached) $ECHO_C" >&6
2611else
2612 ac_cv_prog_cc_stdc=no
2613ac_save_CC=$CC
2614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002615/* confdefs.h. */
2616_ACEOF
2617cat confdefs.h >>conftest.$ac_ext
2618cat >>conftest.$ac_ext <<_ACEOF
2619/* end confdefs.h. */
2620#include <stdarg.h>
2621#include <stdio.h>
2622#include <sys/types.h>
2623#include <sys/stat.h>
2624/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2625struct buf { int x; };
2626FILE * (*rcsopen) (struct buf *, struct stat *, int);
2627static char *e (p, i)
2628 char **p;
2629 int i;
2630{
2631 return p[i];
2632}
2633static char *f (char * (*g) (char **, int), char **p, ...)
2634{
2635 char *s;
2636 va_list v;
2637 va_start (v,p);
2638 s = g (p, va_arg (v,int));
2639 va_end (v);
2640 return s;
2641}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002642
2643/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2644 function prototypes and stuff, but not '\xHH' hex character constants.
2645 These don't provoke an error unfortunately, instead are silently treated
2646 as 'x'. The following induces an error, until -std1 is added to get
2647 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2648 array size at least. It's necessary to write '\x00'==0 to get something
2649 that's true only with -std1. */
2650int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2651
Skip Montanaro6dead952003-09-25 14:50:04 +00002652int test (int i, double x);
2653struct s1 {int (*f) (int a);};
2654struct s2 {int (*f) (double a);};
2655int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2656int argc;
2657char **argv;
2658int
2659main ()
2660{
2661return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2662 ;
2663 return 0;
2664}
2665_ACEOF
2666# Don't try gcc -ansi; that turns off useful extensions and
2667# breaks some systems' header files.
2668# AIX -qlanglvl=ansi
2669# Ultrix and OSF/1 -std1
2670# HP-UX 10.20 and later -Ae
2671# HP-UX older versions -Aa -D_HPUX_SOURCE
2672# SVR4 -Xc -D__EXTENSIONS__
2673for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2674do
2675 CC="$ac_save_CC $ac_arg"
2676 rm -f conftest.$ac_objext
2677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002678 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002680 grep -v '^ *+' conftest.er1 >conftest.err
2681 rm -f conftest.er1
2682 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2684 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002685 { ac_try='test -z "$ac_c_werror_flag"
2686 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2688 (eval $ac_try) 2>&5
2689 ac_status=$?
2690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691 (exit $ac_status); }; } &&
2692 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2694 (eval $ac_try) 2>&5
2695 ac_status=$?
2696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697 (exit $ac_status); }; }; then
2698 ac_cv_prog_cc_stdc=$ac_arg
2699break
2700else
2701 echo "$as_me: failed program was:" >&5
2702sed 's/^/| /' conftest.$ac_ext >&5
2703
2704fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002705rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002706done
2707rm -f conftest.$ac_ext conftest.$ac_objext
2708CC=$ac_save_CC
2709
2710fi
2711
2712case "x$ac_cv_prog_cc_stdc" in
2713 x|xno)
2714 echo "$as_me:$LINENO: result: none needed" >&5
2715echo "${ECHO_T}none needed" >&6 ;;
2716 *)
2717 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2718echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2719 CC="$CC $ac_cv_prog_cc_stdc" ;;
2720esac
2721
Martin v. Löwis11437992002-04-12 09:54:03 +00002722# Some people use a C++ compiler to compile C. Since we use `exit',
2723# in C++ we need to declare it. In case someone uses the same compiler
2724# for both compiling C and C++ we need to have the C++ compiler decide
2725# the declaration of exit, since it's the most demanding environment.
2726cat >conftest.$ac_ext <<_ACEOF
2727#ifndef __cplusplus
2728 choke me
2729#endif
2730_ACEOF
2731rm -f conftest.$ac_objext
2732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 grep -v '^ *+' conftest.er1 >conftest.err
2736 rm -f conftest.er1
2737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002740 { ac_try='test -z "$ac_c_werror_flag"
2741 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2743 (eval $ac_try) 2>&5
2744 ac_status=$?
2745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2746 (exit $ac_status); }; } &&
2747 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2749 (eval $ac_try) 2>&5
2750 ac_status=$?
2751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2752 (exit $ac_status); }; }; then
2753 for ac_declaration in \
Skip Montanarof0d5f792004-08-15 14:08:23 +00002754 '' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 'extern "C" void std::exit (int) throw (); using std::exit;' \
2756 'extern "C" void std::exit (int); using std::exit;' \
2757 'extern "C" void exit (int) throw ();' \
2758 'extern "C" void exit (int);' \
2759 'void exit (int);'
2760do
2761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002762/* confdefs.h. */
2763_ACEOF
2764cat confdefs.h >>conftest.$ac_ext
2765cat >>conftest.$ac_ext <<_ACEOF
2766/* end confdefs.h. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002767$ac_declaration
Skip Montanarof0d5f792004-08-15 14:08:23 +00002768#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002769int
2770main ()
2771{
2772exit (42);
2773 ;
2774 return 0;
2775}
2776_ACEOF
2777rm -f conftest.$ac_objext
2778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002779 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002781 grep -v '^ *+' conftest.er1 >conftest.err
2782 rm -f conftest.er1
2783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2785 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002786 { ac_try='test -z "$ac_c_werror_flag"
2787 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2789 (eval $ac_try) 2>&5
2790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); }; } &&
2793 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2795 (eval $ac_try) 2>&5
2796 ac_status=$?
2797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2798 (exit $ac_status); }; }; then
2799 :
2800else
2801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002802sed 's/^/| /' conftest.$ac_ext >&5
2803
Martin v. Löwis11437992002-04-12 09:54:03 +00002804continue
2805fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002808/* confdefs.h. */
2809_ACEOF
2810cat confdefs.h >>conftest.$ac_ext
2811cat >>conftest.$ac_ext <<_ACEOF
2812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002813$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002814int
2815main ()
2816{
2817exit (42);
2818 ;
2819 return 0;
2820}
2821_ACEOF
2822rm -f conftest.$ac_objext
2823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002824 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002826 grep -v '^ *+' conftest.er1 >conftest.err
2827 rm -f conftest.er1
2828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2830 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002831 { ac_try='test -z "$ac_c_werror_flag"
2832 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2834 (eval $ac_try) 2>&5
2835 ac_status=$?
2836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837 (exit $ac_status); }; } &&
2838 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2840 (eval $ac_try) 2>&5
2841 ac_status=$?
2842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2843 (exit $ac_status); }; }; then
2844 break
2845else
2846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002847sed 's/^/| /' conftest.$ac_ext >&5
2848
Martin v. Löwis11437992002-04-12 09:54:03 +00002849fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002851done
2852rm -f conftest*
2853if test -n "$ac_declaration"; then
2854 echo '#ifdef __cplusplus' >>confdefs.h
2855 echo $ac_declaration >>confdefs.h
2856 echo '#endif' >>confdefs.h
2857fi
2858
2859else
2860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002861sed 's/^/| /' conftest.$ac_ext >&5
2862
Martin v. Löwis11437992002-04-12 09:54:03 +00002863fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002864rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002865ac_ext=c
2866ac_cpp='$CPP $CPPFLAGS'
2867ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2868ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2869ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002870
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002871
2872# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002873
2874ac_ext=c
2875ac_cpp='$CPP $CPPFLAGS'
2876ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2877ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2878ac_compiler_gnu=$ac_cv_c_compiler_gnu
2879echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2880echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002881# On Suns, sometimes $CPP names a directory.
2882if test -n "$CPP" && test -d "$CPP"; then
2883 CPP=
2884fi
2885if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 if test "${ac_cv_prog_CPP+set}" = set; then
2887 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002888else
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 # Double quotes because CPP needs to be expanded
2890 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2891 do
2892 ac_preproc_ok=false
2893for ac_c_preproc_warn_flag in '' yes
2894do
2895 # Use a header file that comes with gcc, so configuring glibc
2896 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002897 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2898 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002899 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 # not just through cpp. "Syntax error" is here to catch this case.
2901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002902/* confdefs.h. */
2903_ACEOF
2904cat confdefs.h >>conftest.$ac_ext
2905cat >>conftest.$ac_ext <<_ACEOF
2906/* end confdefs.h. */
2907#ifdef __STDC__
2908# include <limits.h>
2909#else
2910# include <assert.h>
2911#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002912 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002913_ACEOF
2914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2916 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002917 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 rm -f conftest.er1
2919 cat conftest.err >&5
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); } >/dev/null; then
2922 if test -s conftest.err; then
2923 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002924 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 else
2926 ac_cpp_err=
2927 fi
2928else
2929 ac_cpp_err=yes
2930fi
2931if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002932 :
2933else
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002935sed 's/^/| /' conftest.$ac_ext >&5
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 # Broken: fails on valid input.
2938continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002940rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002941
Martin v. Löwis11437992002-04-12 09:54:03 +00002942 # OK, works on sane cases. Now check whether non-existent headers
2943 # can be detected and how.
2944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002945/* confdefs.h. */
2946_ACEOF
2947cat confdefs.h >>conftest.$ac_ext
2948cat >>conftest.$ac_ext <<_ACEOF
2949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002950#include <ac_nonexistent.h>
2951_ACEOF
2952if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2953 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2954 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002955 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002956 rm -f conftest.er1
2957 cat conftest.err >&5
2958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2959 (exit $ac_status); } >/dev/null; then
2960 if test -s conftest.err; then
2961 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002962 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002963 else
2964 ac_cpp_err=
2965 fi
2966else
2967 ac_cpp_err=yes
2968fi
2969if test -z "$ac_cpp_err"; then
2970 # Broken: success on invalid input.
2971continue
2972else
2973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002974sed 's/^/| /' conftest.$ac_ext >&5
2975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976 # Passes both tests.
2977ac_preproc_ok=:
2978break
2979fi
2980rm -f conftest.err conftest.$ac_ext
2981
2982done
2983# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2984rm -f conftest.err conftest.$ac_ext
2985if $ac_preproc_ok; then
2986 break
2987fi
2988
2989 done
2990 ac_cv_prog_CPP=$CPP
2991
2992fi
2993 CPP=$ac_cv_prog_CPP
2994else
2995 ac_cv_prog_CPP=$CPP
2996fi
2997echo "$as_me:$LINENO: result: $CPP" >&5
2998echo "${ECHO_T}$CPP" >&6
2999ac_preproc_ok=false
3000for ac_c_preproc_warn_flag in '' yes
3001do
3002 # Use a header file that comes with gcc, so configuring glibc
3003 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003004 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3005 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003006 # On the NeXT, cc -E runs the code through the compiler's parser,
3007 # not just through cpp. "Syntax error" is here to catch this case.
3008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003009/* confdefs.h. */
3010_ACEOF
3011cat confdefs.h >>conftest.$ac_ext
3012cat >>conftest.$ac_ext <<_ACEOF
3013/* end confdefs.h. */
3014#ifdef __STDC__
3015# include <limits.h>
3016#else
3017# include <assert.h>
3018#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003019 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003020_ACEOF
3021if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3022 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3023 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003024 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003025 rm -f conftest.er1
3026 cat conftest.err >&5
3027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3028 (exit $ac_status); } >/dev/null; then
3029 if test -s conftest.err; then
3030 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003031 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003032 else
3033 ac_cpp_err=
3034 fi
3035else
3036 ac_cpp_err=yes
3037fi
3038if test -z "$ac_cpp_err"; then
3039 :
3040else
3041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003042sed 's/^/| /' conftest.$ac_ext >&5
3043
Martin v. Löwis11437992002-04-12 09:54:03 +00003044 # Broken: fails on valid input.
3045continue
3046fi
3047rm -f conftest.err conftest.$ac_ext
3048
3049 # OK, works on sane cases. Now check whether non-existent headers
3050 # can be detected and how.
3051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003052/* confdefs.h. */
3053_ACEOF
3054cat confdefs.h >>conftest.$ac_ext
3055cat >>conftest.$ac_ext <<_ACEOF
3056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003057#include <ac_nonexistent.h>
3058_ACEOF
3059if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3060 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3061 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003062 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003063 rm -f conftest.er1
3064 cat conftest.err >&5
3065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3066 (exit $ac_status); } >/dev/null; then
3067 if test -s conftest.err; then
3068 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003069 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003070 else
3071 ac_cpp_err=
3072 fi
3073else
3074 ac_cpp_err=yes
3075fi
3076if test -z "$ac_cpp_err"; then
3077 # Broken: success on invalid input.
3078continue
3079else
3080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003081sed 's/^/| /' conftest.$ac_ext >&5
3082
Martin v. Löwis11437992002-04-12 09:54:03 +00003083 # Passes both tests.
3084ac_preproc_ok=:
3085break
3086fi
3087rm -f conftest.err conftest.$ac_ext
3088
3089done
3090# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3091rm -f conftest.err conftest.$ac_ext
3092if $ac_preproc_ok; then
3093 :
3094else
Skip Montanaro6dead952003-09-25 14:50:04 +00003095 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3096See \`config.log' for more details." >&5
3097echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3098See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003099 { (exit 1); exit 1; }; }
3100fi
3101
3102ac_ext=c
3103ac_cpp='$CPP $CPPFLAGS'
3104ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3105ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3106ac_compiler_gnu=$ac_cv_c_compiler_gnu
3107
3108
Skip Montanaro6dead952003-09-25 14:50:04 +00003109echo "$as_me:$LINENO: checking for egrep" >&5
3110echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3111if test "${ac_cv_prog_egrep+set}" = set; then
3112 echo $ECHO_N "(cached) $ECHO_C" >&6
3113else
3114 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3115 then ac_cv_prog_egrep='grep -E'
3116 else ac_cv_prog_egrep='egrep'
3117 fi
3118fi
3119echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3120echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3121 EGREP=$ac_cv_prog_egrep
3122
3123
Martin v. Löwis11437992002-04-12 09:54:03 +00003124
3125echo "$as_me:$LINENO: checking for AIX" >&5
3126echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003128/* confdefs.h. */
3129_ACEOF
3130cat confdefs.h >>conftest.$ac_ext
3131cat >>conftest.$ac_ext <<_ACEOF
3132/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003133#ifdef _AIX
3134 yes
3135#endif
3136
Martin v. Löwis11437992002-04-12 09:54:03 +00003137_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003139 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003140 echo "$as_me:$LINENO: result: yes" >&5
3141echo "${ECHO_T}yes" >&6
3142cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003143#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003144_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003145
3146else
Martin v. Löwis11437992002-04-12 09:54:03 +00003147 echo "$as_me:$LINENO: result: no" >&5
3148echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003149fi
3150rm -f conftest*
3151
Michael W. Hudson54241132001-12-07 15:38:26 +00003152
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003153
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003154# Check for unsupported systems
3155case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003156Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003157 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3158 echo See README for details.
3159 exit 1;;
3160esac
3161
Michael W. Hudson54241132001-12-07 15:38:26 +00003162
Martin v. Löwis11437992002-04-12 09:54:03 +00003163echo "$as_me:$LINENO: checking for --with-suffix" >&5
3164echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003165
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003166# Check whether --with-suffix or --without-suffix was given.
3167if test "${with_suffix+set}" = set; then
3168 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003170 case $withval in
3171 no) EXEEXT=;;
3172 yes) EXEEXT=.exe;;
3173 *) EXEEXT=$withval;;
3174 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003175fi;
3176echo "$as_me:$LINENO: result: $EXEEXT" >&5
3177echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003178
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003179# Test whether we're running on a non-case-sensitive system, in which
3180# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003181
Martin v. Löwis11437992002-04-12 09:54:03 +00003182echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3183echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003184if test ! -d CaseSensitiveTestDir; then
3185mkdir CaseSensitiveTestDir
3186fi
3187
3188if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003189then
Martin v. Löwis11437992002-04-12 09:54:03 +00003190 echo "$as_me:$LINENO: result: yes" >&5
3191echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003192 BUILDEXEEXT=.exe
3193else
Martin v. Löwis11437992002-04-12 09:54:03 +00003194 echo "$as_me:$LINENO: result: no" >&5
3195echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003196 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003197fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003198rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003199
Guido van Rossumdd997f71998-10-07 19:58:26 +00003200case $MACHDEP in
3201bsdos*)
3202 case $CC in
3203 gcc) CC="$CC -D_HAVE_BSDI";;
3204 esac;;
3205esac
3206
Guido van Rossum24b1e751997-08-21 02:29:16 +00003207case $ac_sys_system in
3208hp*|HP*)
3209 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003210 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003211 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003212Monterey*)
3213 case $CC in
3214 cc) CC="$CC -Wl,-Bexport";;
3215 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003216SunOS*)
3217 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003218
3219cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003220#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003221_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003222
3223 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003224esac
3225
Michael W. Hudson54241132001-12-07 15:38:26 +00003226
3227
Martin v. Löwis11437992002-04-12 09:54:03 +00003228echo "$as_me:$LINENO: checking LIBRARY" >&5
3229echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003230if test -z "$LIBRARY"
3231then
3232 LIBRARY='libpython$(VERSION).a'
3233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003234echo "$as_me:$LINENO: result: $LIBRARY" >&5
3235echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003236
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003237# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003238# name of the library into which to insert object files). BLDLIBRARY is also
3239# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3240# is blank as the main program is not linked directly against LDLIBRARY.
3241# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3242# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3243# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3244# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003245#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003246# RUNSHARED is used to run shared python without installed libraries
3247#
3248# INSTSONAME is the name of the shared library that will be use to install
3249# on the system - some systems like version suffix, others don't
3250
3251
Michael W. Hudson54241132001-12-07 15:38:26 +00003252
3253
3254
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003255
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003256LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003257BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003258INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003259DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003260LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003261RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003262
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003263# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003264# If CXX is set, and if it is needed to link a main function that was
3265# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3266# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003267# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003268# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003269
Martin v. Löwis11437992002-04-12 09:54:03 +00003270echo "$as_me:$LINENO: checking LINKCC" >&5
3271echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003272if test -z "$LINKCC"
3273then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003274 if test -z "$CXX"; then
3275 LINKCC="\$(PURIFY) \$(CC)"
3276 else
Martin v. Löwis147fbe52005-08-07 21:09:30 +00003277 echo 'extern "C" void foo();int main(){foo();}' > conftest_a.cc
3278 $CXX -c conftest_a.cc # 2>&5
3279 echo 'void foo(){}' > conftest_b.$ac_ext
3280 $CC -c conftest_b.$ac_ext # 2>&5
3281 if $CC -o conftest$ac_exeext conftest_a.$ac_objext conftest_b.$ac_objext 2>&5 \
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003282 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3283 then
3284 LINKCC="\$(PURIFY) \$(CC)"
3285 else
3286 LINKCC="\$(PURIFY) \$(CXX)"
3287 fi
3288 rm -fr conftest*
3289 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003290 case $ac_sys_system in
3291 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003292 exp_extra="\"\""
3293 if test $ac_sys_release -ge 5 -o \
3294 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3295 exp_extra="."
3296 fi
3297 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003298 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003299 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003300 esac
3301fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003302echo "$as_me:$LINENO: result: $LINKCC" >&5
3303echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003304
Martin v. Löwis11437992002-04-12 09:54:03 +00003305echo "$as_me:$LINENO: checking for --enable-shared" >&5
3306echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003307# Check whether --enable-shared or --disable-shared was given.
3308if test "${enable_shared+set}" = set; then
3309 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003310
Martin v. Löwis11437992002-04-12 09:54:03 +00003311fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003312
3313if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003314then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003315 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003316 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003317 enable_shared="yes";;
3318 *)
3319 enable_shared="no";;
3320 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003322echo "$as_me:$LINENO: result: $enable_shared" >&5
3323echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003324
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003325echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3326echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3327# Check whether --enable-profiling or --disable-profiling was given.
3328if test "${enable_profiling+set}" = set; then
3329 enableval="$enable_profiling"
3330 ac_save_cc="$CC"
3331 CC="$CC -pg"
3332 if test "$cross_compiling" = yes; then
3333 ac_enable_profiling="no"
3334else
3335 cat >conftest.$ac_ext <<_ACEOF
3336/* confdefs.h. */
3337_ACEOF
3338cat confdefs.h >>conftest.$ac_ext
3339cat >>conftest.$ac_ext <<_ACEOF
3340/* end confdefs.h. */
3341int main() { return 0; }
3342_ACEOF
3343rm -f conftest$ac_exeext
3344if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3345 (eval $ac_link) 2>&5
3346 ac_status=$?
3347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3348 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3350 (eval $ac_try) 2>&5
3351 ac_status=$?
3352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3353 (exit $ac_status); }; }; then
3354 ac_enable_profiling="yes"
3355else
3356 echo "$as_me: program exited with status $ac_status" >&5
3357echo "$as_me: failed program was:" >&5
3358sed 's/^/| /' conftest.$ac_ext >&5
3359
3360( exit $ac_status )
3361ac_enable_profiling="no"
3362fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003363rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003364fi
3365 CC="$ac_save_cc"
3366fi;
3367echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3368echo "${ECHO_T}$ac_enable_profiling" >&6
3369
3370case "$ac_enable_profiling" in
3371 "yes")
3372 BASECFLAGS="-pg $BASECFLAGS"
3373 LDFLAGS="-pg $LDFLAGS"
3374 ;;
3375esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003376
Martin v. Löwis11437992002-04-12 09:54:03 +00003377echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3378echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003379
Guido van Rossumb8552162001-09-05 14:58:11 +00003380# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3381# library that we build, but we do not want to link against it (we
3382# will find it with a -framework option). For this reason there is an
3383# extra variable BLDLIBRARY against which Python and the extension
3384# modules are linked, BLDLIBRARY. This is normally the same as
3385# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003386if test "$enable_framework"
3387then
3388 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003389 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003390 BLDLIBRARY=''
3391else
3392 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003393fi
Jack Jansene578a632001-08-15 01:27:14 +00003394
Martin v. Löwis1142de32002-03-29 16:28:31 +00003395# Other platforms follow
3396if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003397
3398cat >>confdefs.h <<\_ACEOF
3399#define Py_ENABLE_SHARED 1
3400_ACEOF
3401
Martin v. Löwis1142de32002-03-29 16:28:31 +00003402 case $ac_sys_system in
3403 BeOS*)
3404 LDLIBRARY='libpython$(VERSION).so'
3405 ;;
3406 CYGWIN*)
3407 LDLIBRARY='libpython$(VERSION).dll.a'
3408 DLLLIBRARY='libpython$(VERSION).dll'
3409 ;;
3410 SunOS*)
3411 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003412 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003413 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003414 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003415 ;;
Hye-Shik Chang33761492004-10-26 09:53:46 +00003416 Linux*|GNU*|NetBSD*|FreeBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003417 LDLIBRARY='libpython$(VERSION).so'
3418 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003419 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003420 case $ac_sys_system in
3421 FreeBSD*)
3422 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3423 ;;
3424 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003425 INSTSONAME="$LDLIBRARY".$SOVERSION
3426 ;;
3427 hp*|HP*)
3428 LDLIBRARY='libpython$(VERSION).sl'
3429 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003430 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003431 ;;
3432 OSF*)
3433 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00003434 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003435 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003436 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003437 atheos*)
3438 LDLIBRARY='libpython$(VERSION).so'
3439 BLDLIBRARY='-L. -lpython$(VERSION)'
3440 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3441 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003442 esac
Jason Tishler30765592003-09-04 11:04:06 +00003443else # shared is disabled
3444 case $ac_sys_system in
3445 CYGWIN*)
3446 BLDLIBRARY='$(LIBRARY)'
3447 LDLIBRARY='libpython$(VERSION).dll.a'
3448 ;;
3449 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003450fi
3451
Martin v. Löwis11437992002-04-12 09:54:03 +00003452echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3453echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455if test -n "$ac_tool_prefix"; then
3456 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3457set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3458echo "$as_me:$LINENO: checking for $ac_word" >&5
3459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3460if test "${ac_cv_prog_RANLIB+set}" = set; then
3461 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003462else
3463 if test -n "$RANLIB"; then
3464 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3465else
Martin v. Löwis11437992002-04-12 09:54:03 +00003466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3467for as_dir in $PATH
3468do
3469 IFS=$as_save_IFS
3470 test -z "$as_dir" && as_dir=.
3471 for ac_exec_ext in '' $ac_executable_extensions; do
3472 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3473 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3474 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3475 break 2
3476 fi
3477done
3478done
3479
Guido van Rossum627b2d71993-12-24 10:39:16 +00003480fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003482RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003483if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 echo "$as_me:$LINENO: result: $RANLIB" >&5
3485echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003486else
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 echo "$as_me:$LINENO: result: no" >&5
3488echo "${ECHO_T}no" >&6
3489fi
3490
3491fi
3492if test -z "$ac_cv_prog_RANLIB"; then
3493 ac_ct_RANLIB=$RANLIB
3494 # Extract the first word of "ranlib", so it can be a program name with args.
3495set dummy ranlib; ac_word=$2
3496echo "$as_me:$LINENO: checking for $ac_word" >&5
3497echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3499 echo $ECHO_N "(cached) $ECHO_C" >&6
3500else
3501 if test -n "$ac_ct_RANLIB"; then
3502 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3503else
3504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3505for as_dir in $PATH
3506do
3507 IFS=$as_save_IFS
3508 test -z "$as_dir" && as_dir=.
3509 for ac_exec_ext in '' $ac_executable_extensions; do
3510 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3511 ac_cv_prog_ac_ct_RANLIB="ranlib"
3512 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3513 break 2
3514 fi
3515done
3516done
3517
3518 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3519fi
3520fi
3521ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3522if test -n "$ac_ct_RANLIB"; then
3523 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3524echo "${ECHO_T}$ac_ct_RANLIB" >&6
3525else
3526 echo "$as_me:$LINENO: result: no" >&5
3527echo "${ECHO_T}no" >&6
3528fi
3529
3530 RANLIB=$ac_ct_RANLIB
3531else
3532 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003533fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003534
3535
Guido van Rossum7f43da71994-08-01 12:15:30 +00003536for ac_prog in ar aal
3537do
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003539set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003540echo "$as_me:$LINENO: checking for $ac_word" >&5
3541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3542if test "${ac_cv_prog_AR+set}" = set; then
3543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003544else
3545 if test -n "$AR"; then
3546 ac_cv_prog_AR="$AR" # Let the user override the test.
3547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3549for as_dir in $PATH
3550do
3551 IFS=$as_save_IFS
3552 test -z "$as_dir" && as_dir=.
3553 for ac_exec_ext in '' $ac_executable_extensions; do
3554 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3555 ac_cv_prog_AR="$ac_prog"
3556 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3557 break 2
3558 fi
3559done
3560done
3561
Guido van Rossum7f43da71994-08-01 12:15:30 +00003562fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003563fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003564AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003565if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 echo "$as_me:$LINENO: result: $AR" >&5
3567echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003568else
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 echo "$as_me:$LINENO: result: no" >&5
3570echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003571fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003574done
3575test -n "$AR" || AR="ar"
3576
Michael W. Hudson54241132001-12-07 15:38:26 +00003577
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003578
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003579# Extract the first word of "svnversion", so it can be a program name with args.
3580set dummy svnversion; ac_word=$2
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003581echo "$as_me:$LINENO: checking for $ac_word" >&5
3582echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3583if test "${ac_cv_prog_SVNVERSION+set}" = set; then
3584 echo $ECHO_N "(cached) $ECHO_C" >&6
3585else
3586 if test -n "$SVNVERSION"; then
3587 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
3588else
3589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
3594 for ac_exec_ext in '' $ac_executable_extensions; do
3595 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003596 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003597 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3598 break 2
3599 fi
3600done
3601done
3602
3603fi
3604fi
3605SVNVERSION=$ac_cv_prog_SVNVERSION
3606if test -n "$SVNVERSION"; then
3607 echo "$as_me:$LINENO: result: $SVNVERSION" >&5
3608echo "${ECHO_T}$SVNVERSION" >&6
3609else
3610 echo "$as_me:$LINENO: result: no" >&5
3611echo "${ECHO_T}no" >&6
3612fi
3613
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003614if test $SVNVERSION = found
3615then
3616 SVNVERSION="svnversion \$(srcdir)"
3617else
3618 SVNVERSION="echo exported"
3619fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003620
Neil Schemenauera42c8272001-03-31 00:01:55 +00003621case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003622bsdos*|hp*|HP*)
3623 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003624 if test -z "$INSTALL"
3625 then
3626 INSTALL="${srcdir}/install-sh -c"
3627 fi
3628esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003629ac_aux_dir=
3630for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3631 if test -f $ac_dir/install-sh; then
3632 ac_aux_dir=$ac_dir
3633 ac_install_sh="$ac_aux_dir/install-sh -c"
3634 break
3635 elif test -f $ac_dir/install.sh; then
3636 ac_aux_dir=$ac_dir
3637 ac_install_sh="$ac_aux_dir/install.sh -c"
3638 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 elif test -f $ac_dir/shtool; then
3640 ac_aux_dir=$ac_dir
3641 ac_install_sh="$ac_aux_dir/shtool install -c"
3642 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003643 fi
3644done
3645if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3647echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3648 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003650ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3651ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3652ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003653
3654# Find a good install program. We prefer a C program (faster),
3655# so one script is as good as another. But avoid the broken or
3656# incompatible versions:
3657# SysV /etc/install, /usr/sbin/install
3658# SunOS /usr/etc/install
3659# IRIX /sbin/install
3660# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003661# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003662# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3663# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3664# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003665# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003666# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003667echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3668echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003669if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003670if test "${ac_cv_path_install+set}" = set; then
3671 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003672else
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674for as_dir in $PATH
3675do
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
3678 # Account for people who put trailing slashes in PATH elements.
3679case $as_dir/ in
3680 ./ | .// | /cC/* | \
3681 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003682 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 /usr/ucb/* ) ;;
3684 *)
3685 # OSF1 and SCO ODT 3.0 have their own names for install.
3686 # Don't use installbsd from OSF since it installs stuff as root
3687 # by default.
3688 for ac_prog in ginstall scoinst install; do
3689 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003690 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3691 if test $ac_prog = install &&
3692 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3693 # AIX install. It has an incompatible calling convention.
3694 :
3695 elif test $ac_prog = install &&
3696 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3697 # program-specific install script used by HP pwplus--don't use.
3698 :
3699 else
3700 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3701 break 3
3702 fi
3703 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003704 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 done
3706 ;;
3707esac
3708done
3709
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003710
3711fi
3712 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003714 else
3715 # As a last resort, use the slow shell script. We don't cache a
3716 # path for INSTALL within a source directory, because that will
3717 # break other packages using the cache if that directory is
3718 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003720 fi
3721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003722echo "$as_me:$LINENO: result: $INSTALL" >&5
3723echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003724
3725# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3726# It thinks the first close brace ends the variable substitution.
3727test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3728
Martin v. Löwis11437992002-04-12 09:54:03 +00003729test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003730
3731test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3732
Michael W. Hudson54241132001-12-07 15:38:26 +00003733
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003734# Not every filesystem supports hard links
3735
3736if test -z "$LN" ; then
3737 case $ac_sys_system in
3738 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003739 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003740 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003741 *) LN=ln;;
3742 esac
3743fi
3744
Fred Drake109d9862001-07-11 06:27:56 +00003745# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003746echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3747echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3748
Fred Drake109d9862001-07-11 06:27:56 +00003749# Check whether --with-pydebug or --without-pydebug was given.
3750if test "${with_pydebug+set}" = set; then
3751 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003752
Fred Drake109d9862001-07-11 06:27:56 +00003753if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003754then
3755
3756cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003757#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003758_ACEOF
3759
3760 echo "$as_me:$LINENO: result: yes" >&5
3761echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003762 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003763else echo "$as_me:$LINENO: result: no" >&5
3764echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003765fi
3766else
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 echo "$as_me:$LINENO: result: no" >&5
3768echo "${ECHO_T}no" >&6
3769fi;
Fred Drake109d9862001-07-11 06:27:56 +00003770
Skip Montanarodecc6a42003-01-01 20:07:49 +00003771# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3772# merged with this chunk of code?
3773
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003774# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003775# ------------------------
3776# (The following bit of code is complicated enough - please keep things
3777# indented properly. Just pretend you're editing Python code. ;-)
3778
3779# There are two parallel sets of case statements below, one that checks to
3780# see if OPT was set and one that does BASECFLAGS setting based upon
3781# compiler and platform. BASECFLAGS tweaks need to be made even if the
3782# user set OPT.
3783
3784# tweak OPT based on compiler and platform, only if the user didn't set
3785# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003786
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003787if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003788then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003789 case $GCC in
3790 yes)
3791 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003792 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003793 if test "$Py_DEBUG" = 'true' ; then
3794 # Optimization messes up debuggers, so turn it off for
3795 # debug builds.
3796 OPT="-g -Wall -Wstrict-prototypes"
3797 else
3798 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003799 fi
3800 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003801 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003802 OPT="-O3 -Wall -Wstrict-prototypes"
3803 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003804 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003805 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003806 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3807 ;;
3808 esac
Fred Drake109d9862001-07-11 06:27:56 +00003809 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003810
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003811 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003812 OPT="-O"
3813 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003814 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003815
3816 # The current (beta) Monterey compiler dies with optimizations
3817 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003818 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003819 Monterey*)
3820 OPT=""
3821 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003822 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003823
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003824fi
3825
Skip Montanarodecc6a42003-01-01 20:07:49 +00003826
3827# tweak BASECFLAGS based on compiler and platform
3828case $GCC in
3829yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003830 # Python violates C99 rules, by casting between incompatible
3831 # pointer types. GCC may generate bad code as a result of that,
3832 # so use -fno-strict-aliasing if supported.
3833 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3834echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3835 ac_save_cc="$CC"
3836 CC="$CC -fno-strict-aliasing"
3837 if test "$cross_compiling" = yes; then
3838 ac_cv_no_strict_aliasing_ok=no
3839else
3840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003841/* confdefs.h. */
3842_ACEOF
3843cat confdefs.h >>conftest.$ac_ext
3844cat >>conftest.$ac_ext <<_ACEOF
3845/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003846int main() { return 0; }
3847_ACEOF
3848rm -f conftest$ac_exeext
3849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3850 (eval $ac_link) 2>&5
3851 ac_status=$?
3852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3855 (eval $ac_try) 2>&5
3856 ac_status=$?
3857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858 (exit $ac_status); }; }; then
3859 ac_cv_no_strict_aliasing_ok=yes
3860else
3861 echo "$as_me: program exited with status $ac_status" >&5
3862echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003863sed 's/^/| /' conftest.$ac_ext >&5
3864
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003865( exit $ac_status )
3866ac_cv_no_strict_aliasing_ok=no
3867fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003868rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003869fi
3870 CC="$ac_save_cc"
3871 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3872echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3873 if test $ac_cv_no_strict_aliasing_ok = yes
3874 then
3875 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3876 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003877 case $ac_sys_system in
3878 SCO_SV*)
3879 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3880 ;;
3881 # is there any other compiler on Darwin besides gcc?
3882 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003883 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003884 ;;
3885 esac
3886 ;;
3887
3888*)
3889 case $ac_sys_system in
3890 OpenUNIX*|UnixWare*)
3891 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3892 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003893 OSF*)
3894 BASECFLAGS="$BASECFLAGS -ieee -std"
3895 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003896 SCO_SV*)
3897 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3898 ;;
3899 esac
3900 ;;
3901esac
3902
Fred Drakee1ceaa02001-12-04 20:55:47 +00003903if test "$Py_DEBUG" = 'true'; then
3904 :
3905else
3906 OPT="-DNDEBUG $OPT"
3907fi
3908
Guido van Rossum563e7081996-09-10 18:20:48 +00003909if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003910then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003911 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003912fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003913
Neal Norwitz020c46a2006-01-07 21:39:28 +00003914# disable check for icc since it seems to pass, but generates a warning
3915if test "$CC" = icc
3916then
3917 ac_cv_opt_olimit_ok=no
3918fi
3919
Martin v. Löwis11437992002-04-12 09:54:03 +00003920echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3921echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3922if test "${ac_cv_opt_olimit_ok+set}" = set; then
3923 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003924else
3925 ac_save_cc="$CC"
3926CC="$CC -OPT:Olimit=0"
3927if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003928 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003929else
Martin v. Löwis11437992002-04-12 09:54:03 +00003930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003931/* confdefs.h. */
3932_ACEOF
3933cat confdefs.h >>conftest.$ac_ext
3934cat >>conftest.$ac_ext <<_ACEOF
3935/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003936int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003937_ACEOF
3938rm -f conftest$ac_exeext
3939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3940 (eval $ac_link) 2>&5
3941 ac_status=$?
3942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3945 (eval $ac_try) 2>&5
3946 ac_status=$?
3947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3948 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003949 ac_cv_opt_olimit_ok=yes
3950else
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 echo "$as_me: program exited with status $ac_status" >&5
3952echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003953sed 's/^/| /' conftest.$ac_ext >&5
3954
Martin v. Löwis11437992002-04-12 09:54:03 +00003955( exit $ac_status )
3956ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003957fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003958rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003959fi
Guido van Rossum91922671997-10-09 20:24:13 +00003960CC="$ac_save_cc"
3961fi
3962
Martin v. Löwis11437992002-04-12 09:54:03 +00003963echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3964echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003965if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003966 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003967 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3968 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3969 # environment?
3970 Darwin*)
3971 ;;
3972 *)
3973 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3974 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003975 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003976else
Martin v. Löwis11437992002-04-12 09:54:03 +00003977 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3978echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3979 if test "${ac_cv_olimit_ok+set}" = set; then
3980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003981else
3982 ac_save_cc="$CC"
3983 CC="$CC -Olimit 1500"
3984 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003985 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003986else
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003988/* confdefs.h. */
3989_ACEOF
3990cat confdefs.h >>conftest.$ac_ext
3991cat >>conftest.$ac_ext <<_ACEOF
3992/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003993int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003994_ACEOF
3995rm -f conftest$ac_exeext
3996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3997 (eval $ac_link) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4002 (eval $ac_try) 2>&5
4003 ac_status=$?
4004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4005 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004006 ac_cv_olimit_ok=yes
4007else
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 echo "$as_me: program exited with status $ac_status" >&5
4009echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004010sed 's/^/| /' conftest.$ac_ext >&5
4011
Martin v. Löwis11437992002-04-12 09:54:03 +00004012( exit $ac_status )
4013ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004014fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004015rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004016fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004017 CC="$ac_save_cc"
4018fi
4019
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4021echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004022 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004023 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004024 fi
4025fi
4026
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004027# On some compilers, pthreads are available without further options
4028# (e.g. MacOS X). On some of these systems, the compiler will not
4029# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4030# So we have to see first whether pthreads are available without
4031# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004032echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4033echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4034if test "${ac_cv_pthread_is_default+set}" = set; then
4035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004036else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004037 if test "$cross_compiling" = yes; then
4038 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004039else
Martin v. Löwis11437992002-04-12 09:54:03 +00004040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004041/* confdefs.h. */
4042_ACEOF
4043cat confdefs.h >>conftest.$ac_ext
4044cat >>conftest.$ac_ext <<_ACEOF
4045/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004046
Martin v. Löwis130fb172001-07-19 11:00:41 +00004047#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004048
4049void* routine(void* p){return NULL;}
4050
4051int main(){
4052 pthread_t p;
4053 if(pthread_create(&p,NULL,routine,NULL)!=0)
4054 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004055 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004056 return 0;
4057}
4058
Martin v. Löwis11437992002-04-12 09:54:03 +00004059_ACEOF
4060rm -f conftest$ac_exeext
4061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4062 (eval $ac_link) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4067 (eval $ac_try) 2>&5
4068 ac_status=$?
4069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4070 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004071
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004072 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004073 ac_cv_kthread=no
4074 ac_cv_pthread=no
4075
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004076else
Martin v. Löwis11437992002-04-12 09:54:03 +00004077 echo "$as_me: program exited with status $ac_status" >&5
4078echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004079sed 's/^/| /' conftest.$ac_ext >&5
4080
Martin v. Löwis11437992002-04-12 09:54:03 +00004081( exit $ac_status )
4082ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004084rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004085fi
4086
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004087fi
4088
Martin v. Löwis11437992002-04-12 09:54:03 +00004089echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4090echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004091
Michael W. Hudson54241132001-12-07 15:38:26 +00004092
Martin v. Löwis11437992002-04-12 09:54:03 +00004093if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004094then
4095 ac_cv_kpthread=no
4096else
4097# -Kpthread, if available, provides the right #defines
4098# and linker options to make pthread_create available
4099# Some compilers won't report that they do not support -Kpthread,
4100# so we need to run a program to see whether it really made the
4101# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004102echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4103echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4104if test "${ac_cv_kpthread+set}" = set; then
4105 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004106else
4107 ac_save_cc="$CC"
4108CC="$CC -Kpthread"
4109if test "$cross_compiling" = yes; then
4110 ac_cv_kpthread=no
4111else
Martin v. Löwis11437992002-04-12 09:54:03 +00004112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004113/* confdefs.h. */
4114_ACEOF
4115cat confdefs.h >>conftest.$ac_ext
4116cat >>conftest.$ac_ext <<_ACEOF
4117/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004118
4119#include <pthread.h>
4120
4121void* routine(void* p){return NULL;}
4122
4123int main(){
4124 pthread_t p;
4125 if(pthread_create(&p,NULL,routine,NULL)!=0)
4126 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004127 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004128 return 0;
4129}
4130
Martin v. Löwis11437992002-04-12 09:54:03 +00004131_ACEOF
4132rm -f conftest$ac_exeext
4133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4134 (eval $ac_link) 2>&5
4135 ac_status=$?
4136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4137 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4139 (eval $ac_try) 2>&5
4140 ac_status=$?
4141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004143 ac_cv_kpthread=yes
4144else
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 echo "$as_me: program exited with status $ac_status" >&5
4146echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004147sed 's/^/| /' conftest.$ac_ext >&5
4148
Martin v. Löwis11437992002-04-12 09:54:03 +00004149( exit $ac_status )
4150ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004151fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004152rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004153fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004154CC="$ac_save_cc"
4155fi
4156
Martin v. Löwis11437992002-04-12 09:54:03 +00004157echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4158echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004159fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004160
Skip Montanarod8d39a02003-07-10 20:44:10 +00004161if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004162then
4163# -Kthread, if available, provides the right #defines
4164# and linker options to make pthread_create available
4165# Some compilers won't report that they do not support -Kthread,
4166# so we need to run a program to see whether it really made the
4167# function available.
4168echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4169echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4170if test "${ac_cv_kthread+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
4172else
4173 ac_save_cc="$CC"
4174CC="$CC -Kthread"
4175if test "$cross_compiling" = yes; then
4176 ac_cv_kthread=no
4177else
4178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* confdefs.h. */
4180_ACEOF
4181cat confdefs.h >>conftest.$ac_ext
4182cat >>conftest.$ac_ext <<_ACEOF
4183/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004184
4185#include <pthread.h>
4186
4187void* routine(void* p){return NULL;}
4188
4189int main(){
4190 pthread_t p;
4191 if(pthread_create(&p,NULL,routine,NULL)!=0)
4192 return 1;
4193 (void)pthread_detach(p);
4194 return 0;
4195}
4196
4197_ACEOF
4198rm -f conftest$ac_exeext
4199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4200 (eval $ac_link) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4205 (eval $ac_try) 2>&5
4206 ac_status=$?
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); }; }; then
4209 ac_cv_kthread=yes
4210else
4211 echo "$as_me: program exited with status $ac_status" >&5
4212echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004213sed 's/^/| /' conftest.$ac_ext >&5
4214
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004215( exit $ac_status )
4216ac_cv_kthread=no
4217fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004218rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004219fi
4220CC="$ac_save_cc"
4221fi
4222
4223echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4224echo "${ECHO_T}$ac_cv_kthread" >&6
4225fi
4226
Skip Montanarod8d39a02003-07-10 20:44:10 +00004227if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004228then
4229# -pthread, if available, provides the right #defines
4230# and linker options to make pthread_create available
4231# Some compilers won't report that they do not support -pthread,
4232# so we need to run a program to see whether it really made the
4233# function available.
4234echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4235echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4236if test "${ac_cv_thread+set}" = set; then
4237 echo $ECHO_N "(cached) $ECHO_C" >&6
4238else
4239 ac_save_cc="$CC"
4240CC="$CC -pthread"
4241if test "$cross_compiling" = yes; then
4242 ac_cv_pthread=no
4243else
4244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004245/* confdefs.h. */
4246_ACEOF
4247cat confdefs.h >>conftest.$ac_ext
4248cat >>conftest.$ac_ext <<_ACEOF
4249/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004250
4251#include <pthread.h>
4252
4253void* routine(void* p){return NULL;}
4254
4255int main(){
4256 pthread_t p;
4257 if(pthread_create(&p,NULL,routine,NULL)!=0)
4258 return 1;
4259 (void)pthread_detach(p);
4260 return 0;
4261}
4262
4263_ACEOF
4264rm -f conftest$ac_exeext
4265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4266 (eval $ac_link) 2>&5
4267 ac_status=$?
4268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4269 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4271 (eval $ac_try) 2>&5
4272 ac_status=$?
4273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4274 (exit $ac_status); }; }; then
4275 ac_cv_pthread=yes
4276else
4277 echo "$as_me: program exited with status $ac_status" >&5
4278echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004279sed 's/^/| /' conftest.$ac_ext >&5
4280
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004281( exit $ac_status )
4282ac_cv_pthread=no
4283fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004285fi
4286CC="$ac_save_cc"
4287fi
4288
4289echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4290echo "${ECHO_T}$ac_cv_pthread" >&6
4291fi
4292
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004293# If we have set a CC compiler flag for thread support then
4294# check if it works for CXX, too.
4295ac_cv_cxx_thread=no
4296if test ! -z "$CXX"
4297then
4298echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4299echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4300ac_save_cxx="$CXX"
4301
4302if test "$ac_cv_kpthread" = "yes"
4303then
4304 CXX="$CXX -Kpthread"
4305 ac_cv_cxx_thread=yes
4306elif test "$ac_cv_kthread" = "yes"
4307then
4308 CXX="$CXX -Kthread"
4309 ac_cv_cxx_thread=yes
4310elif test "$ac_cv_pthread" = "yes"
4311then
4312 CXX="$CXX -pthread"
4313 ac_cv_cxx_thread=yes
4314fi
4315
4316if test $ac_cv_cxx_thread = yes
4317then
4318 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4319 $CXX -c conftest.$ac_ext 2>&5
4320 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4321 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4322 then
4323 ac_cv_cxx_thread=yes
4324 else
4325 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004326 fi
4327 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004328fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004329echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4330echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004331fi
4332CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004333
Michael W. Hudson54241132001-12-07 15:38:26 +00004334
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004335# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004336echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4337echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4338if test "${ac_cv_header_stdc+set}" = set; then
4339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004340else
Martin v. Löwis11437992002-04-12 09:54:03 +00004341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004342/* confdefs.h. */
4343_ACEOF
4344cat confdefs.h >>conftest.$ac_ext
4345cat >>conftest.$ac_ext <<_ACEOF
4346/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004347#include <stdlib.h>
4348#include <stdarg.h>
4349#include <string.h>
4350#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004351
Skip Montanaro6dead952003-09-25 14:50:04 +00004352int
4353main ()
4354{
4355
4356 ;
4357 return 0;
4358}
Martin v. Löwis11437992002-04-12 09:54:03 +00004359_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004360rm -f conftest.$ac_objext
4361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004362 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004364 grep -v '^ *+' conftest.er1 >conftest.err
4365 rm -f conftest.er1
4366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004368 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004369 { ac_try='test -z "$ac_c_werror_flag"
4370 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4372 (eval $ac_try) 2>&5
4373 ac_status=$?
4374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4375 (exit $ac_status); }; } &&
4376 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4378 (eval $ac_try) 2>&5
4379 ac_status=$?
4380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4381 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382 ac_cv_header_stdc=yes
4383else
Martin v. Löwis11437992002-04-12 09:54:03 +00004384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004385sed 's/^/| /' conftest.$ac_ext >&5
4386
4387ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390
4391if test $ac_cv_header_stdc = yes; then
4392 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004394/* confdefs.h. */
4395_ACEOF
4396cat confdefs.h >>conftest.$ac_ext
4397cat >>conftest.$ac_ext <<_ACEOF
4398/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004399#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004400
4401_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004403 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404 :
4405else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406 ac_cv_header_stdc=no
4407fi
4408rm -f conftest*
4409
4410fi
4411
4412if test $ac_cv_header_stdc = yes; then
4413 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004415/* confdefs.h. */
4416_ACEOF
4417cat confdefs.h >>conftest.$ac_ext
4418cat >>conftest.$ac_ext <<_ACEOF
4419/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004421
4422_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004423if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004424 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004425 :
4426else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427 ac_cv_header_stdc=no
4428fi
4429rm -f conftest*
4430
4431fi
4432
4433if test $ac_cv_header_stdc = yes; then
4434 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004435 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004436 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437else
Martin v. Löwis11437992002-04-12 09:54:03 +00004438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004439/* confdefs.h. */
4440_ACEOF
4441cat confdefs.h >>conftest.$ac_ext
4442cat >>conftest.$ac_ext <<_ACEOF
4443/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004444#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004445#if ((' ' & 0x0FF) == 0x020)
4446# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4447# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4448#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004449# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004450 (('a' <= (c) && (c) <= 'i') \
4451 || ('j' <= (c) && (c) <= 'r') \
4452 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004453# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4454#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004455
Martin v. Löwis11437992002-04-12 09:54:03 +00004456#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4457int
4458main ()
4459{
4460 int i;
4461 for (i = 0; i < 256; i++)
4462 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004463 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004464 exit(2);
4465 exit (0);
4466}
4467_ACEOF
4468rm -f conftest$ac_exeext
4469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4470 (eval $ac_link) 2>&5
4471 ac_status=$?
4472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475 (eval $ac_try) 2>&5
4476 ac_status=$?
4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004479 :
4480else
Martin v. Löwis11437992002-04-12 09:54:03 +00004481 echo "$as_me: program exited with status $ac_status" >&5
4482echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004483sed 's/^/| /' conftest.$ac_ext >&5
4484
Martin v. Löwis11437992002-04-12 09:54:03 +00004485( exit $ac_status )
4486ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004487fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004488rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004489fi
4490fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004491fi
4492echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4493echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004494if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004495
4496cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004497#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004498_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499
4500fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501
Skip Montanarob9820a32004-01-17 00:16:12 +00004502# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004513 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004514do
4515as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4516echo "$as_me:$LINENO: checking for $ac_header" >&5
4517echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4518if eval "test \"\${$as_ac_Header+set}\" = set"; then
4519 echo $ECHO_N "(cached) $ECHO_C" >&6
4520else
4521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004522/* confdefs.h. */
4523_ACEOF
4524cat confdefs.h >>conftest.$ac_ext
4525cat >>conftest.$ac_ext <<_ACEOF
4526/* end confdefs.h. */
4527$ac_includes_default
4528
4529#include <$ac_header>
4530_ACEOF
4531rm -f conftest.$ac_objext
4532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004533 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004535 grep -v '^ *+' conftest.er1 >conftest.err
4536 rm -f conftest.er1
4537 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4539 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004540 { ac_try='test -z "$ac_c_werror_flag"
4541 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); }; } &&
4547 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4549 (eval $ac_try) 2>&5
4550 ac_status=$?
4551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552 (exit $ac_status); }; }; then
4553 eval "$as_ac_Header=yes"
4554else
4555 echo "$as_me: failed program was:" >&5
4556sed 's/^/| /' conftest.$ac_ext >&5
4557
4558eval "$as_ac_Header=no"
4559fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004560rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004561fi
4562echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4563echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4564if test `eval echo '${'$as_ac_Header'}'` = yes; then
4565 cat >>confdefs.h <<_ACEOF
4566#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4567_ACEOF
4568
4569fi
4570
4571done
4572
4573
Martin v. Löwis11437992002-04-12 09:54:03 +00004574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
Anthony Baxter8a560de2004-10-13 15:30:56 +00004610
Martin v. Löwisc3001752005-01-23 09:27:24 +00004611
Martin v. Löwis11017b12006-01-14 18:12:57 +00004612
4613for ac_header in asm/types.h curses.h dlfcn.h fcntl.h grp.h \
4614shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004615stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004616unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004617sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4618sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004619sys/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 +00004620sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004621sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4622bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004623do
Martin v. Löwis11437992002-04-12 09:54:03 +00004624as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4625if eval "test \"\${$as_ac_Header+set}\" = set"; then
4626 echo "$as_me:$LINENO: checking for $ac_header" >&5
4627echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4628if eval "test \"\${$as_ac_Header+set}\" = set"; then
4629 echo $ECHO_N "(cached) $ECHO_C" >&6
4630fi
4631echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4632echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633else
Martin v. Löwis11437992002-04-12 09:54:03 +00004634 # Is the header compilable?
4635echo "$as_me:$LINENO: checking $ac_header usability" >&5
4636echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004638/* confdefs.h. */
4639_ACEOF
4640cat confdefs.h >>conftest.$ac_ext
4641cat >>conftest.$ac_ext <<_ACEOF
4642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004643$ac_includes_default
4644#include <$ac_header>
4645_ACEOF
4646rm -f conftest.$ac_objext
4647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004648 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004650 grep -v '^ *+' conftest.er1 >conftest.err
4651 rm -f conftest.er1
4652 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4654 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004655 { ac_try='test -z "$ac_c_werror_flag"
4656 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4658 (eval $ac_try) 2>&5
4659 ac_status=$?
4660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4661 (exit $ac_status); }; } &&
4662 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4664 (eval $ac_try) 2>&5
4665 ac_status=$?
4666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4667 (exit $ac_status); }; }; then
4668 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004669else
Martin v. Löwis11437992002-04-12 09:54:03 +00004670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004671sed 's/^/| /' conftest.$ac_ext >&5
4672
Martin v. Löwis11437992002-04-12 09:54:03 +00004673ac_header_compiler=no
4674fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004675rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004676echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4677echo "${ECHO_T}$ac_header_compiler" >&6
4678
4679# Is the header present?
4680echo "$as_me:$LINENO: checking $ac_header presence" >&5
4681echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004683/* confdefs.h. */
4684_ACEOF
4685cat confdefs.h >>conftest.$ac_ext
4686cat >>conftest.$ac_ext <<_ACEOF
4687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004688#include <$ac_header>
4689_ACEOF
4690if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4691 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4692 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004693 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 rm -f conftest.er1
4695 cat conftest.err >&5
4696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4697 (exit $ac_status); } >/dev/null; then
4698 if test -s conftest.err; then
4699 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004700 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004701 else
4702 ac_cpp_err=
4703 fi
4704else
4705 ac_cpp_err=yes
4706fi
4707if test -z "$ac_cpp_err"; then
4708 ac_header_preproc=yes
4709else
4710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004711sed 's/^/| /' conftest.$ac_ext >&5
4712
Martin v. Löwis11437992002-04-12 09:54:03 +00004713 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004714fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004715rm -f conftest.err conftest.$ac_ext
4716echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4717echo "${ECHO_T}$ac_header_preproc" >&6
4718
4719# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004720case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4721 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004722 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4723echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004724 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4725echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4726 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004727 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004728 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004729 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4730echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004731 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4732echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4733 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4734echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4735 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4736echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004737 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4738echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004739 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4740echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004741 (
4742 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004743## ------------------------------------------------ ##
4744## Report this to http://www.python.org/python-bugs ##
4745## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004746_ASBOX
4747 ) |
4748 sed "s/^/$as_me: WARNING: /" >&2
4749 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004750esac
4751echo "$as_me:$LINENO: checking for $ac_header" >&5
4752echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4753if eval "test \"\${$as_ac_Header+set}\" = set"; then
4754 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004755else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004756 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004757fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004758echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4759echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4760
4761fi
4762if test `eval echo '${'$as_ac_Header'}'` = yes; then
4763 cat >>confdefs.h <<_ACEOF
4764#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4765_ACEOF
4766
4767fi
4768
Guido van Rossum627b2d71993-12-24 10:39:16 +00004769done
4770
Martin v. Löwis11437992002-04-12 09:54:03 +00004771
4772
4773
4774
4775
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004776ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004777for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4778 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4779echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4780echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4781if eval "test \"\${$as_ac_Header+set}\" = set"; then
4782 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004783else
Martin v. Löwis11437992002-04-12 09:54:03 +00004784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004785/* confdefs.h. */
4786_ACEOF
4787cat confdefs.h >>conftest.$ac_ext
4788cat >>conftest.$ac_ext <<_ACEOF
4789/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004790#include <sys/types.h>
4791#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004792
Martin v. Löwis11437992002-04-12 09:54:03 +00004793int
4794main ()
4795{
4796if ((DIR *) 0)
4797return 0;
4798 ;
4799 return 0;
4800}
4801_ACEOF
4802rm -f conftest.$ac_objext
4803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004804 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004806 grep -v '^ *+' conftest.er1 >conftest.err
4807 rm -f conftest.er1
4808 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004811 { ac_try='test -z "$ac_c_werror_flag"
4812 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4814 (eval $ac_try) 2>&5
4815 ac_status=$?
4816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4817 (exit $ac_status); }; } &&
4818 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4820 (eval $ac_try) 2>&5
4821 ac_status=$?
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); }; }; then
4824 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004825else
Martin v. Löwis11437992002-04-12 09:54:03 +00004826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004827sed 's/^/| /' conftest.$ac_ext >&5
4828
Martin v. Löwis11437992002-04-12 09:54:03 +00004829eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004830fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004831rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004832fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004833echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4834echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4835if test `eval echo '${'$as_ac_Header'}'` = yes; then
4836 cat >>confdefs.h <<_ACEOF
4837#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4838_ACEOF
4839
4840ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004841fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004842
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004843done
4844# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4845if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004846 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4847echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4848if test "${ac_cv_search_opendir+set}" = set; then
4849 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004850else
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 ac_func_search_save_LIBS=$LIBS
4852ac_cv_search_opendir=no
4853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004854/* confdefs.h. */
4855_ACEOF
4856cat confdefs.h >>conftest.$ac_ext
4857cat >>conftest.$ac_ext <<_ACEOF
4858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004859
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004860/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004861#ifdef __cplusplus
4862extern "C"
4863#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004864/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004865 builtin and then its argument prototype would still apply. */
4866char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004867int
4868main ()
4869{
4870opendir ();
4871 ;
4872 return 0;
4873}
4874_ACEOF
4875rm -f conftest.$ac_objext conftest$ac_exeext
4876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004877 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004879 grep -v '^ *+' conftest.er1 >conftest.err
4880 rm -f conftest.er1
4881 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4883 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004884 { ac_try='test -z "$ac_c_werror_flag"
4885 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4887 (eval $ac_try) 2>&5
4888 ac_status=$?
4889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4890 (exit $ac_status); }; } &&
4891 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4893 (eval $ac_try) 2>&5
4894 ac_status=$?
4895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896 (exit $ac_status); }; }; then
4897 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004898else
Martin v. Löwis11437992002-04-12 09:54:03 +00004899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004900sed 's/^/| /' conftest.$ac_ext >&5
4901
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004902fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004903rm -f conftest.err conftest.$ac_objext \
4904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004905if test "$ac_cv_search_opendir" = no; then
4906 for ac_lib in dir; do
4907 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004909/* confdefs.h. */
4910_ACEOF
4911cat confdefs.h >>conftest.$ac_ext
4912cat >>conftest.$ac_ext <<_ACEOF
4913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004914
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004915/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004916#ifdef __cplusplus
4917extern "C"
4918#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004919/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004920 builtin and then its argument prototype would still apply. */
4921char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004922int
4923main ()
4924{
4925opendir ();
4926 ;
4927 return 0;
4928}
4929_ACEOF
4930rm -f conftest.$ac_objext conftest$ac_exeext
4931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004932 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004934 grep -v '^ *+' conftest.er1 >conftest.err
4935 rm -f conftest.er1
4936 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004939 { ac_try='test -z "$ac_c_werror_flag"
4940 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4942 (eval $ac_try) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; } &&
4946 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4948 (eval $ac_try) 2>&5
4949 ac_status=$?
4950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4951 (exit $ac_status); }; }; then
4952 ac_cv_search_opendir="-l$ac_lib"
4953break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004954else
Martin v. Löwis11437992002-04-12 09:54:03 +00004955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004956sed 's/^/| /' conftest.$ac_ext >&5
4957
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004958fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004959rm -f conftest.err conftest.$ac_objext \
4960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004961 done
4962fi
4963LIBS=$ac_func_search_save_LIBS
4964fi
4965echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4966echo "${ECHO_T}$ac_cv_search_opendir" >&6
4967if test "$ac_cv_search_opendir" != no; then
4968 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004969
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004970fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004971
Michael W. Hudson54241132001-12-07 15:38:26 +00004972else
Martin v. Löwis11437992002-04-12 09:54:03 +00004973 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4974echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4975if test "${ac_cv_search_opendir+set}" = set; then
4976 echo $ECHO_N "(cached) $ECHO_C" >&6
4977else
4978 ac_func_search_save_LIBS=$LIBS
4979ac_cv_search_opendir=no
4980cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004981/* confdefs.h. */
4982_ACEOF
4983cat confdefs.h >>conftest.$ac_ext
4984cat >>conftest.$ac_ext <<_ACEOF
4985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004986
4987/* Override any gcc2 internal prototype to avoid an error. */
4988#ifdef __cplusplus
4989extern "C"
4990#endif
4991/* We use char because int might match the return type of a gcc2
4992 builtin and then its argument prototype would still apply. */
4993char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004994int
4995main ()
4996{
4997opendir ();
4998 ;
4999 return 0;
5000}
5001_ACEOF
5002rm -f conftest.$ac_objext conftest$ac_exeext
5003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005004 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005006 grep -v '^ *+' conftest.er1 >conftest.err
5007 rm -f conftest.er1
5008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5010 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005011 { ac_try='test -z "$ac_c_werror_flag"
5012 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5014 (eval $ac_try) 2>&5
5015 ac_status=$?
5016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5017 (exit $ac_status); }; } &&
5018 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5020 (eval $ac_try) 2>&5
5021 ac_status=$?
5022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5023 (exit $ac_status); }; }; then
5024 ac_cv_search_opendir="none required"
5025else
5026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005027sed 's/^/| /' conftest.$ac_ext >&5
5028
Martin v. Löwis11437992002-04-12 09:54:03 +00005029fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005030rm -f conftest.err conftest.$ac_objext \
5031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005032if test "$ac_cv_search_opendir" = no; then
5033 for ac_lib in x; do
5034 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005036/* confdefs.h. */
5037_ACEOF
5038cat confdefs.h >>conftest.$ac_ext
5039cat >>conftest.$ac_ext <<_ACEOF
5040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005041
5042/* Override any gcc2 internal prototype to avoid an error. */
5043#ifdef __cplusplus
5044extern "C"
5045#endif
5046/* We use char because int might match the return type of a gcc2
5047 builtin and then its argument prototype would still apply. */
5048char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005049int
5050main ()
5051{
5052opendir ();
5053 ;
5054 return 0;
5055}
5056_ACEOF
5057rm -f conftest.$ac_objext conftest$ac_exeext
5058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005059 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005061 grep -v '^ *+' conftest.er1 >conftest.err
5062 rm -f conftest.er1
5063 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005066 { ac_try='test -z "$ac_c_werror_flag"
5067 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5069 (eval $ac_try) 2>&5
5070 ac_status=$?
5071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); }; } &&
5073 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5075 (eval $ac_try) 2>&5
5076 ac_status=$?
5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078 (exit $ac_status); }; }; then
5079 ac_cv_search_opendir="-l$ac_lib"
5080break
5081else
5082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005083sed 's/^/| /' conftest.$ac_ext >&5
5084
Martin v. Löwis11437992002-04-12 09:54:03 +00005085fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005086rm -f conftest.err conftest.$ac_objext \
5087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005088 done
5089fi
5090LIBS=$ac_func_search_save_LIBS
5091fi
5092echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5093echo "${ECHO_T}$ac_cv_search_opendir" >&6
5094if test "$ac_cv_search_opendir" != no; then
5095 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005097fi
5098
5099fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005100
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005101echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5102echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5103if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5104 echo $ECHO_N "(cached) $ECHO_C" >&6
5105else
5106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005107/* confdefs.h. */
5108_ACEOF
5109cat confdefs.h >>conftest.$ac_ext
5110cat >>conftest.$ac_ext <<_ACEOF
5111/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005112#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005113int
5114main ()
5115{
5116return makedev(0, 0);
5117 ;
5118 return 0;
5119}
5120_ACEOF
5121rm -f conftest.$ac_objext conftest$ac_exeext
5122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005123 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005125 grep -v '^ *+' conftest.er1 >conftest.err
5126 rm -f conftest.er1
5127 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005130 { ac_try='test -z "$ac_c_werror_flag"
5131 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5133 (eval $ac_try) 2>&5
5134 ac_status=$?
5135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5136 (exit $ac_status); }; } &&
5137 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5139 (eval $ac_try) 2>&5
5140 ac_status=$?
5141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5142 (exit $ac_status); }; }; then
5143 ac_cv_header_sys_types_h_makedev=yes
5144else
5145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005146sed 's/^/| /' conftest.$ac_ext >&5
5147
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005148ac_cv_header_sys_types_h_makedev=no
5149fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005150rm -f conftest.err conftest.$ac_objext \
5151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005152
5153fi
5154echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5155echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5156
5157if test $ac_cv_header_sys_types_h_makedev = no; then
5158if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5159 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5160echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5161if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5162 echo $ECHO_N "(cached) $ECHO_C" >&6
5163fi
5164echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5165echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5166else
5167 # Is the header compilable?
5168echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5169echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5170cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005171/* confdefs.h. */
5172_ACEOF
5173cat confdefs.h >>conftest.$ac_ext
5174cat >>conftest.$ac_ext <<_ACEOF
5175/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005176$ac_includes_default
5177#include <sys/mkdev.h>
5178_ACEOF
5179rm -f conftest.$ac_objext
5180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005181 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005183 grep -v '^ *+' conftest.er1 >conftest.err
5184 rm -f conftest.er1
5185 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5187 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005188 { ac_try='test -z "$ac_c_werror_flag"
5189 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5191 (eval $ac_try) 2>&5
5192 ac_status=$?
5193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5194 (exit $ac_status); }; } &&
5195 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5197 (eval $ac_try) 2>&5
5198 ac_status=$?
5199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5200 (exit $ac_status); }; }; then
5201 ac_header_compiler=yes
5202else
5203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005204sed 's/^/| /' conftest.$ac_ext >&5
5205
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005206ac_header_compiler=no
5207fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005209echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5210echo "${ECHO_T}$ac_header_compiler" >&6
5211
5212# Is the header present?
5213echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5214echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005216/* confdefs.h. */
5217_ACEOF
5218cat confdefs.h >>conftest.$ac_ext
5219cat >>conftest.$ac_ext <<_ACEOF
5220/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005221#include <sys/mkdev.h>
5222_ACEOF
5223if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5224 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5225 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005226 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005227 rm -f conftest.er1
5228 cat conftest.err >&5
5229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5230 (exit $ac_status); } >/dev/null; then
5231 if test -s conftest.err; then
5232 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005233 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005234 else
5235 ac_cpp_err=
5236 fi
5237else
5238 ac_cpp_err=yes
5239fi
5240if test -z "$ac_cpp_err"; then
5241 ac_header_preproc=yes
5242else
5243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005244sed 's/^/| /' conftest.$ac_ext >&5
5245
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005246 ac_header_preproc=no
5247fi
5248rm -f conftest.err conftest.$ac_ext
5249echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5250echo "${ECHO_T}$ac_header_preproc" >&6
5251
5252# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005253case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5254 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005255 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5256echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005257 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5258echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5259 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005260 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005261 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005262 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5263echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005264 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5265echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5266 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5267echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5268 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5269echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005270 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5271echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005272 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5273echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005274 (
5275 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005276## ------------------------------------------------ ##
5277## Report this to http://www.python.org/python-bugs ##
5278## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005279_ASBOX
5280 ) |
5281 sed "s/^/$as_me: WARNING: /" >&2
5282 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005283esac
5284echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5285echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5286if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5287 echo $ECHO_N "(cached) $ECHO_C" >&6
5288else
5289 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5290fi
5291echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5292echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5293
5294fi
5295if test $ac_cv_header_sys_mkdev_h = yes; then
5296
5297cat >>confdefs.h <<\_ACEOF
5298#define MAJOR_IN_MKDEV 1
5299_ACEOF
5300
5301fi
5302
5303
5304
5305 if test $ac_cv_header_sys_mkdev_h = no; then
5306 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5307 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5308echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5309if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5310 echo $ECHO_N "(cached) $ECHO_C" >&6
5311fi
5312echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5313echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5314else
5315 # Is the header compilable?
5316echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5317echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5318cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005319/* confdefs.h. */
5320_ACEOF
5321cat confdefs.h >>conftest.$ac_ext
5322cat >>conftest.$ac_ext <<_ACEOF
5323/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005324$ac_includes_default
5325#include <sys/sysmacros.h>
5326_ACEOF
5327rm -f conftest.$ac_objext
5328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005329 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005331 grep -v '^ *+' conftest.er1 >conftest.err
5332 rm -f conftest.er1
5333 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5335 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005336 { ac_try='test -z "$ac_c_werror_flag"
5337 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5339 (eval $ac_try) 2>&5
5340 ac_status=$?
5341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); }; } &&
5343 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5345 (eval $ac_try) 2>&5
5346 ac_status=$?
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); }; }; then
5349 ac_header_compiler=yes
5350else
5351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005352sed 's/^/| /' conftest.$ac_ext >&5
5353
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005354ac_header_compiler=no
5355fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005356rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005357echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5358echo "${ECHO_T}$ac_header_compiler" >&6
5359
5360# Is the header present?
5361echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5362echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5363cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005364/* confdefs.h. */
5365_ACEOF
5366cat confdefs.h >>conftest.$ac_ext
5367cat >>conftest.$ac_ext <<_ACEOF
5368/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005369#include <sys/sysmacros.h>
5370_ACEOF
5371if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5372 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5373 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005374 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005375 rm -f conftest.er1
5376 cat conftest.err >&5
5377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5378 (exit $ac_status); } >/dev/null; then
5379 if test -s conftest.err; then
5380 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005381 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005382 else
5383 ac_cpp_err=
5384 fi
5385else
5386 ac_cpp_err=yes
5387fi
5388if test -z "$ac_cpp_err"; then
5389 ac_header_preproc=yes
5390else
5391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005392sed 's/^/| /' conftest.$ac_ext >&5
5393
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005394 ac_header_preproc=no
5395fi
5396rm -f conftest.err conftest.$ac_ext
5397echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5398echo "${ECHO_T}$ac_header_preproc" >&6
5399
5400# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005401case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5402 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005403 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5404echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005405 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5406echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5407 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005408 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005409 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005410 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5411echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005412 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5413echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5414 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5415echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5416 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5417echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005418 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5419echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005420 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5421echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005422 (
5423 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005424## ------------------------------------------------ ##
5425## Report this to http://www.python.org/python-bugs ##
5426## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005427_ASBOX
5428 ) |
5429 sed "s/^/$as_me: WARNING: /" >&2
5430 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005431esac
5432echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5433echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5434if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5435 echo $ECHO_N "(cached) $ECHO_C" >&6
5436else
5437 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5438fi
5439echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5440echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5441
5442fi
5443if test $ac_cv_header_sys_sysmacros_h = yes; then
5444
5445cat >>confdefs.h <<\_ACEOF
5446#define MAJOR_IN_SYSMACROS 1
5447_ACEOF
5448
5449fi
5450
5451
5452 fi
5453fi
5454
Michael W. Hudson54241132001-12-07 15:38:26 +00005455
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005456# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005457
5458for ac_header in term.h
5459do
5460as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5461echo "$as_me:$LINENO: checking for $ac_header" >&5
5462echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5463if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005464 echo $ECHO_N "(cached) $ECHO_C" >&6
5465else
5466 cat >conftest.$ac_ext <<_ACEOF
5467/* confdefs.h. */
5468_ACEOF
5469cat confdefs.h >>conftest.$ac_ext
5470cat >>conftest.$ac_ext <<_ACEOF
5471/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005472
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005473#ifdef HAVE_CURSES_H
5474#include <curses.h>
5475#endif
5476
5477
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005478#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005479_ACEOF
5480rm -f conftest.$ac_objext
5481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5482 (eval $ac_compile) 2>conftest.er1
5483 ac_status=$?
5484 grep -v '^ *+' conftest.er1 >conftest.err
5485 rm -f conftest.er1
5486 cat conftest.err >&5
5487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5488 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005489 { ac_try='test -z "$ac_c_werror_flag"
5490 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5492 (eval $ac_try) 2>&5
5493 ac_status=$?
5494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5495 (exit $ac_status); }; } &&
5496 { ac_try='test -s conftest.$ac_objext'
5497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5498 (eval $ac_try) 2>&5
5499 ac_status=$?
5500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005502 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005503else
5504 echo "$as_me: failed program was:" >&5
5505sed 's/^/| /' conftest.$ac_ext >&5
5506
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005507eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005508fi
5509rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5510fi
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005511echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5512echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5513if test `eval echo '${'$as_ac_Header'}'` = yes; then
5514 cat >>confdefs.h <<_ACEOF
5515#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5516_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005517
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005518fi
5519
5520done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005521
5522
Martin v. Löwis11017b12006-01-14 18:12:57 +00005523# On Linux, netlink.h requires asm/types.h
5524
5525for ac_header in linux/netlink.h
5526do
5527as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5528echo "$as_me:$LINENO: checking for $ac_header" >&5
5529echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5530if eval "test \"\${$as_ac_Header+set}\" = set"; then
5531 echo $ECHO_N "(cached) $ECHO_C" >&6
5532else
5533 cat >conftest.$ac_ext <<_ACEOF
5534/* confdefs.h. */
5535_ACEOF
5536cat confdefs.h >>conftest.$ac_ext
5537cat >>conftest.$ac_ext <<_ACEOF
5538/* end confdefs.h. */
5539
5540#ifdef HAVE_ASM_TYPES_H
5541#include <asm/types.h>
5542#endif
5543#ifdef HAVE_SYS_SOCKET_H
5544#include <sys/socket.h>
5545#endif
5546
5547
5548#include <$ac_header>
5549_ACEOF
5550rm -f conftest.$ac_objext
5551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5552 (eval $ac_compile) 2>conftest.er1
5553 ac_status=$?
5554 grep -v '^ *+' conftest.er1 >conftest.err
5555 rm -f conftest.er1
5556 cat conftest.err >&5
5557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5558 (exit $ac_status); } &&
5559 { ac_try='test -z "$ac_c_werror_flag"
5560 || test ! -s conftest.err'
5561 { (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_objext'
5567 { (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 eval "$as_ac_Header=yes"
5573else
5574 echo "$as_me: failed program was:" >&5
5575sed 's/^/| /' conftest.$ac_ext >&5
5576
5577eval "$as_ac_Header=no"
5578fi
5579rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5580fi
5581echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5582echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5583if test `eval echo '${'$as_ac_Header'}'` = yes; then
5584 cat >>confdefs.h <<_ACEOF
5585#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5586_ACEOF
5587
5588fi
5589
5590done
5591
5592
Guido van Rossum627b2d71993-12-24 10:39:16 +00005593# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005594was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005595echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5596echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005598/* confdefs.h. */
5599_ACEOF
5600cat confdefs.h >>conftest.$ac_ext
5601cat >>conftest.$ac_ext <<_ACEOF
5602/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005603#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005604
5605_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005607 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005608 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005609else
Martin v. Löwis11437992002-04-12 09:54:03 +00005610
5611
5612cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005613#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005614_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005615
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005616
Guido van Rossum627b2d71993-12-24 10:39:16 +00005617fi
5618rm -f conftest*
5619
Martin v. Löwis11437992002-04-12 09:54:03 +00005620echo "$as_me:$LINENO: result: $was_it_defined" >&5
5621echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005622
Neal Norwitz11690112002-07-30 01:08:28 +00005623# Check whether using makedev requires defining _OSF_SOURCE
5624echo "$as_me:$LINENO: checking for makedev" >&5
5625echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005627/* confdefs.h. */
5628_ACEOF
5629cat confdefs.h >>conftest.$ac_ext
5630cat >>conftest.$ac_ext <<_ACEOF
5631/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005632#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005633int
5634main ()
5635{
5636 makedev(0, 0)
5637 ;
5638 return 0;
5639}
5640_ACEOF
5641rm -f conftest.$ac_objext conftest$ac_exeext
5642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005643 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005645 grep -v '^ *+' conftest.er1 >conftest.err
5646 rm -f conftest.er1
5647 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5649 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005650 { ac_try='test -z "$ac_c_werror_flag"
5651 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5653 (eval $ac_try) 2>&5
5654 ac_status=$?
5655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5656 (exit $ac_status); }; } &&
5657 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5659 (eval $ac_try) 2>&5
5660 ac_status=$?
5661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5662 (exit $ac_status); }; }; then
5663 ac_cv_has_makedev=yes
5664else
5665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005666sed 's/^/| /' conftest.$ac_ext >&5
5667
Neal Norwitz11690112002-07-30 01:08:28 +00005668ac_cv_has_makedev=no
5669fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005670rm -f conftest.err conftest.$ac_objext \
5671 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005672if test "$ac_cv_has_makedev" = "no"; then
5673 # we didn't link, try if _OSF_SOURCE will allow us to link
5674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005675/* confdefs.h. */
5676_ACEOF
5677cat confdefs.h >>conftest.$ac_ext
5678cat >>conftest.$ac_ext <<_ACEOF
5679/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005680
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005681#define _OSF_SOURCE 1
5682#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005683
Neal Norwitz11690112002-07-30 01:08:28 +00005684int
5685main ()
5686{
5687 makedev(0, 0)
5688 ;
5689 return 0;
5690}
5691_ACEOF
5692rm -f conftest.$ac_objext conftest$ac_exeext
5693if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005694 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005696 grep -v '^ *+' conftest.er1 >conftest.err
5697 rm -f conftest.er1
5698 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5700 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005701 { ac_try='test -z "$ac_c_werror_flag"
5702 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5704 (eval $ac_try) 2>&5
5705 ac_status=$?
5706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707 (exit $ac_status); }; } &&
5708 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5710 (eval $ac_try) 2>&5
5711 ac_status=$?
5712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5713 (exit $ac_status); }; }; then
5714 ac_cv_has_makedev=yes
5715else
5716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005717sed 's/^/| /' conftest.$ac_ext >&5
5718
Neal Norwitz11690112002-07-30 01:08:28 +00005719ac_cv_has_makedev=no
5720fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005721rm -f conftest.err conftest.$ac_objext \
5722 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005723 if test "$ac_cv_has_makedev" = "yes"; then
5724
5725cat >>confdefs.h <<\_ACEOF
5726#define _OSF_SOURCE 1
5727_ACEOF
5728
5729 fi
5730fi
5731echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5732echo "${ECHO_T}$ac_cv_has_makedev" >&6
5733if test "$ac_cv_has_makedev" = "yes"; then
5734
5735cat >>confdefs.h <<\_ACEOF
5736#define HAVE_MAKEDEV 1
5737_ACEOF
5738
5739fi
5740
Martin v. Löwis399a6892002-10-04 10:22:02 +00005741# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5742# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5743# defined, but the compiler does not support pragma redefine_extname,
5744# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5745# structures (such as rlimit64) without declaring them. As a
5746# work-around, disable LFS on such configurations
5747
5748use_lfs=yes
5749echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5750echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5751cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005752/* confdefs.h. */
5753_ACEOF
5754cat confdefs.h >>conftest.$ac_ext
5755cat >>conftest.$ac_ext <<_ACEOF
5756/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005757
5758#define _LARGEFILE_SOURCE 1
5759#define _FILE_OFFSET_BITS 64
5760#include <sys/resource.h>
5761
Martin v. Löwis399a6892002-10-04 10:22:02 +00005762int
5763main ()
5764{
5765struct rlimit foo;
5766 ;
5767 return 0;
5768}
5769_ACEOF
5770rm -f conftest.$ac_objext
5771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005772 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005774 grep -v '^ *+' conftest.er1 >conftest.err
5775 rm -f conftest.er1
5776 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5778 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005779 { ac_try='test -z "$ac_c_werror_flag"
5780 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5782 (eval $ac_try) 2>&5
5783 ac_status=$?
5784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5785 (exit $ac_status); }; } &&
5786 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5788 (eval $ac_try) 2>&5
5789 ac_status=$?
5790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5791 (exit $ac_status); }; }; then
5792 sol_lfs_bug=no
5793else
5794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005795sed 's/^/| /' conftest.$ac_ext >&5
5796
Martin v. Löwis399a6892002-10-04 10:22:02 +00005797sol_lfs_bug=yes
5798fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005800echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5801echo "${ECHO_T}$sol_lfs_bug" >&6
5802if test "$sol_lfs_bug" = "yes"; then
5803 use_lfs=no
5804fi
5805
5806if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005807# Two defines needed to enable largefile support on various platforms
5808# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005809
Martin v. Löwis11437992002-04-12 09:54:03 +00005810cat >>confdefs.h <<\_ACEOF
5811#define _LARGEFILE_SOURCE 1
5812_ACEOF
5813
5814
5815cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005816#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005817_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005818
Martin v. Löwis399a6892002-10-04 10:22:02 +00005819fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005820
Guido van Rossum84e7b241996-08-19 21:59:00 +00005821# Add some code to confdefs.h so that the test for off_t works on SCO
5822cat >> confdefs.h <<\EOF
5823#if defined(SCO_DS)
5824#undef _OFF_T
5825#endif
5826EOF
5827
Guido van Rossumef2255b2000-03-10 22:30:29 +00005828# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005829echo "$as_me:$LINENO: checking for mode_t" >&5
5830echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5831if test "${ac_cv_type_mode_t+set}" = set; then
5832 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005833else
Martin v. Löwis11437992002-04-12 09:54:03 +00005834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005835/* confdefs.h. */
5836_ACEOF
5837cat confdefs.h >>conftest.$ac_ext
5838cat >>conftest.$ac_ext <<_ACEOF
5839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005840$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005841int
5842main ()
5843{
5844if ((mode_t *) 0)
5845 return 0;
5846if (sizeof (mode_t))
5847 return 0;
5848 ;
5849 return 0;
5850}
5851_ACEOF
5852rm -f conftest.$ac_objext
5853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005854 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005856 grep -v '^ *+' conftest.er1 >conftest.err
5857 rm -f conftest.er1
5858 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005861 { ac_try='test -z "$ac_c_werror_flag"
5862 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5864 (eval $ac_try) 2>&5
5865 ac_status=$?
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); }; } &&
5868 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5870 (eval $ac_try) 2>&5
5871 ac_status=$?
5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005874 ac_cv_type_mode_t=yes
5875else
Martin v. Löwis11437992002-04-12 09:54:03 +00005876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005877sed 's/^/| /' conftest.$ac_ext >&5
5878
Martin v. Löwis11437992002-04-12 09:54:03 +00005879ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005880fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005881rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005882fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005883echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5884echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5885if test $ac_cv_type_mode_t = yes; then
5886 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005887else
Martin v. Löwis11437992002-04-12 09:54:03 +00005888
5889cat >>confdefs.h <<_ACEOF
5890#define mode_t int
5891_ACEOF
5892
5893fi
5894
5895echo "$as_me:$LINENO: checking for off_t" >&5
5896echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5897if test "${ac_cv_type_off_t+set}" = set; then
5898 echo $ECHO_N "(cached) $ECHO_C" >&6
5899else
5900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005901/* confdefs.h. */
5902_ACEOF
5903cat confdefs.h >>conftest.$ac_ext
5904cat >>conftest.$ac_ext <<_ACEOF
5905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005906$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005907int
5908main ()
5909{
5910if ((off_t *) 0)
5911 return 0;
5912if (sizeof (off_t))
5913 return 0;
5914 ;
5915 return 0;
5916}
5917_ACEOF
5918rm -f conftest.$ac_objext
5919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005920 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005922 grep -v '^ *+' conftest.er1 >conftest.err
5923 rm -f conftest.er1
5924 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5926 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005927 { ac_try='test -z "$ac_c_werror_flag"
5928 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5930 (eval $ac_try) 2>&5
5931 ac_status=$?
5932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5933 (exit $ac_status); }; } &&
5934 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5936 (eval $ac_try) 2>&5
5937 ac_status=$?
5938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5939 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005940 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005941else
Martin v. Löwis11437992002-04-12 09:54:03 +00005942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005943sed 's/^/| /' conftest.$ac_ext >&5
5944
Martin v. Löwis11437992002-04-12 09:54:03 +00005945ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005946fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005949echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5950echo "${ECHO_T}$ac_cv_type_off_t" >&6
5951if test $ac_cv_type_off_t = yes; then
5952 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005953else
Martin v. Löwis11437992002-04-12 09:54:03 +00005954
5955cat >>confdefs.h <<_ACEOF
5956#define off_t long
5957_ACEOF
5958
5959fi
5960
5961echo "$as_me:$LINENO: checking for pid_t" >&5
5962echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5963if test "${ac_cv_type_pid_t+set}" = set; then
5964 echo $ECHO_N "(cached) $ECHO_C" >&6
5965else
5966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005967/* confdefs.h. */
5968_ACEOF
5969cat confdefs.h >>conftest.$ac_ext
5970cat >>conftest.$ac_ext <<_ACEOF
5971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005972$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005973int
5974main ()
5975{
5976if ((pid_t *) 0)
5977 return 0;
5978if (sizeof (pid_t))
5979 return 0;
5980 ;
5981 return 0;
5982}
5983_ACEOF
5984rm -f conftest.$ac_objext
5985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005986 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005988 grep -v '^ *+' conftest.er1 >conftest.err
5989 rm -f conftest.er1
5990 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5992 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005993 { ac_try='test -z "$ac_c_werror_flag"
5994 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5996 (eval $ac_try) 2>&5
5997 ac_status=$?
5998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999 (exit $ac_status); }; } &&
6000 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6002 (eval $ac_try) 2>&5
6003 ac_status=$?
6004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6005 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006006 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006007else
Martin v. Löwis11437992002-04-12 09:54:03 +00006008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006009sed 's/^/| /' conftest.$ac_ext >&5
6010
Martin v. Löwis11437992002-04-12 09:54:03 +00006011ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006012fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006014fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006015echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6016echo "${ECHO_T}$ac_cv_type_pid_t" >&6
6017if test $ac_cv_type_pid_t = yes; then
6018 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006019else
Martin v. Löwis11437992002-04-12 09:54:03 +00006020
6021cat >>confdefs.h <<_ACEOF
6022#define pid_t int
6023_ACEOF
6024
6025fi
6026
6027echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6028echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6029if test "${ac_cv_type_signal+set}" = set; then
6030 echo $ECHO_N "(cached) $ECHO_C" >&6
6031else
6032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006033/* confdefs.h. */
6034_ACEOF
6035cat confdefs.h >>conftest.$ac_ext
6036cat >>conftest.$ac_ext <<_ACEOF
6037/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006038#include <sys/types.h>
6039#include <signal.h>
6040#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006041# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00006042#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006043#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006044extern "C" void (*signal (int, void (*)(int)))(int);
6045#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006046void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006047#endif
6048
Martin v. Löwis11437992002-04-12 09:54:03 +00006049int
6050main ()
6051{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006052int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00006053 ;
6054 return 0;
6055}
6056_ACEOF
6057rm -f conftest.$ac_objext
6058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006059 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006061 grep -v '^ *+' conftest.er1 >conftest.err
6062 rm -f conftest.er1
6063 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6065 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006066 { ac_try='test -z "$ac_c_werror_flag"
6067 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6069 (eval $ac_try) 2>&5
6070 ac_status=$?
6071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6072 (exit $ac_status); }; } &&
6073 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6075 (eval $ac_try) 2>&5
6076 ac_status=$?
6077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6078 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006079 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006080else
Martin v. Löwis11437992002-04-12 09:54:03 +00006081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006082sed 's/^/| /' conftest.$ac_ext >&5
6083
Martin v. Löwis11437992002-04-12 09:54:03 +00006084ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006085fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006086rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006088echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6089echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006090
Martin v. Löwis11437992002-04-12 09:54:03 +00006091cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006092#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006093_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006094
Michael W. Hudson54241132001-12-07 15:38:26 +00006095
Martin v. Löwis11437992002-04-12 09:54:03 +00006096echo "$as_me:$LINENO: checking for size_t" >&5
6097echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6098if test "${ac_cv_type_size_t+set}" = set; then
6099 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006100else
Martin v. Löwis11437992002-04-12 09:54:03 +00006101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006102/* confdefs.h. */
6103_ACEOF
6104cat confdefs.h >>conftest.$ac_ext
6105cat >>conftest.$ac_ext <<_ACEOF
6106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006107$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006108int
6109main ()
6110{
6111if ((size_t *) 0)
6112 return 0;
6113if (sizeof (size_t))
6114 return 0;
6115 ;
6116 return 0;
6117}
6118_ACEOF
6119rm -f conftest.$ac_objext
6120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006121 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006123 grep -v '^ *+' conftest.er1 >conftest.err
6124 rm -f conftest.er1
6125 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006128 { ac_try='test -z "$ac_c_werror_flag"
6129 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6131 (eval $ac_try) 2>&5
6132 ac_status=$?
6133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6134 (exit $ac_status); }; } &&
6135 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6137 (eval $ac_try) 2>&5
6138 ac_status=$?
6139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6140 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006141 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006142else
Martin v. Löwis11437992002-04-12 09:54:03 +00006143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006144sed 's/^/| /' conftest.$ac_ext >&5
6145
Martin v. Löwis11437992002-04-12 09:54:03 +00006146ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006147fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006148rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006150echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6151echo "${ECHO_T}$ac_cv_type_size_t" >&6
6152if test $ac_cv_type_size_t = yes; then
6153 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006154else
Martin v. Löwis11437992002-04-12 09:54:03 +00006155
6156cat >>confdefs.h <<_ACEOF
6157#define size_t unsigned
6158_ACEOF
6159
6160fi
6161
6162echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6163echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6164if test "${ac_cv_type_uid_t+set}" = set; then
6165 echo $ECHO_N "(cached) $ECHO_C" >&6
6166else
6167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006168/* confdefs.h. */
6169_ACEOF
6170cat confdefs.h >>conftest.$ac_ext
6171cat >>conftest.$ac_ext <<_ACEOF
6172/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006173#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006174
6175_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006177 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006178 ac_cv_type_uid_t=yes
6179else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006180 ac_cv_type_uid_t=no
6181fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006182rm -f conftest*
6183
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006185echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6186echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006187if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006188
Martin v. Löwis11437992002-04-12 09:54:03 +00006189cat >>confdefs.h <<\_ACEOF
6190#define uid_t int
6191_ACEOF
6192
6193
6194cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006195#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006196_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006197
6198fi
6199
Jack Jansendd19cf82001-12-06 22:36:17 +00006200
Michael W. Hudson54241132001-12-07 15:38:26 +00006201# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006202# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006203echo "$as_me:$LINENO: checking for int" >&5
6204echo $ECHO_N "checking for int... $ECHO_C" >&6
6205if test "${ac_cv_type_int+set}" = set; then
6206 echo $ECHO_N "(cached) $ECHO_C" >&6
6207else
6208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006209/* confdefs.h. */
6210_ACEOF
6211cat confdefs.h >>conftest.$ac_ext
6212cat >>conftest.$ac_ext <<_ACEOF
6213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006214$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006215int
6216main ()
6217{
6218if ((int *) 0)
6219 return 0;
6220if (sizeof (int))
6221 return 0;
6222 ;
6223 return 0;
6224}
6225_ACEOF
6226rm -f conftest.$ac_objext
6227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006228 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006230 grep -v '^ *+' conftest.er1 >conftest.err
6231 rm -f conftest.er1
6232 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6234 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006235 { ac_try='test -z "$ac_c_werror_flag"
6236 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6238 (eval $ac_try) 2>&5
6239 ac_status=$?
6240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6241 (exit $ac_status); }; } &&
6242 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6244 (eval $ac_try) 2>&5
6245 ac_status=$?
6246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6247 (exit $ac_status); }; }; then
6248 ac_cv_type_int=yes
6249else
6250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006251sed 's/^/| /' conftest.$ac_ext >&5
6252
Martin v. Löwis11437992002-04-12 09:54:03 +00006253ac_cv_type_int=no
6254fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006255rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006256fi
6257echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6258echo "${ECHO_T}$ac_cv_type_int" >&6
6259
6260echo "$as_me:$LINENO: checking size of int" >&5
6261echo $ECHO_N "checking size of int... $ECHO_C" >&6
6262if test "${ac_cv_sizeof_int+set}" = set; then
6263 echo $ECHO_N "(cached) $ECHO_C" >&6
6264else
6265 if test "$ac_cv_type_int" = yes; then
6266 # The cast to unsigned long works around a bug in the HP C Compiler
6267 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6268 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6269 # This bug is HP SR number 8606223364.
6270 if test "$cross_compiling" = yes; then
6271 # Depending upon the size, compute the lo and hi bounds.
6272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006273/* confdefs.h. */
6274_ACEOF
6275cat confdefs.h >>conftest.$ac_ext
6276cat >>conftest.$ac_ext <<_ACEOF
6277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006278$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006279int
6280main ()
6281{
6282static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6283test_array [0] = 0
6284
6285 ;
6286 return 0;
6287}
6288_ACEOF
6289rm -f conftest.$ac_objext
6290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006291 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006293 grep -v '^ *+' conftest.er1 >conftest.err
6294 rm -f conftest.er1
6295 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006298 { ac_try='test -z "$ac_c_werror_flag"
6299 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6301 (eval $ac_try) 2>&5
6302 ac_status=$?
6303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6304 (exit $ac_status); }; } &&
6305 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6307 (eval $ac_try) 2>&5
6308 ac_status=$?
6309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310 (exit $ac_status); }; }; then
6311 ac_lo=0 ac_mid=0
6312 while :; do
6313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006314/* confdefs.h. */
6315_ACEOF
6316cat confdefs.h >>conftest.$ac_ext
6317cat >>conftest.$ac_ext <<_ACEOF
6318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006319$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006320int
6321main ()
6322{
6323static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6324test_array [0] = 0
6325
6326 ;
6327 return 0;
6328}
6329_ACEOF
6330rm -f conftest.$ac_objext
6331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006332 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006334 grep -v '^ *+' conftest.er1 >conftest.err
6335 rm -f conftest.er1
6336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006339 { ac_try='test -z "$ac_c_werror_flag"
6340 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6342 (eval $ac_try) 2>&5
6343 ac_status=$?
6344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6345 (exit $ac_status); }; } &&
6346 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6348 (eval $ac_try) 2>&5
6349 ac_status=$?
6350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6351 (exit $ac_status); }; }; then
6352 ac_hi=$ac_mid; break
6353else
6354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006355sed 's/^/| /' conftest.$ac_ext >&5
6356
Martin v. Löwis11437992002-04-12 09:54:03 +00006357ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006358 if test $ac_lo -le $ac_mid; then
6359 ac_lo= ac_hi=
6360 break
6361 fi
6362 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006363fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006365 done
6366else
6367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006368sed 's/^/| /' conftest.$ac_ext >&5
6369
Martin v. Löwis11437992002-04-12 09:54:03 +00006370cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006371/* confdefs.h. */
6372_ACEOF
6373cat confdefs.h >>conftest.$ac_ext
6374cat >>conftest.$ac_ext <<_ACEOF
6375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006376$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006377int
6378main ()
6379{
6380static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6381test_array [0] = 0
6382
6383 ;
6384 return 0;
6385}
6386_ACEOF
6387rm -f conftest.$ac_objext
6388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006389 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006391 grep -v '^ *+' conftest.er1 >conftest.err
6392 rm -f conftest.er1
6393 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6395 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006396 { ac_try='test -z "$ac_c_werror_flag"
6397 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6399 (eval $ac_try) 2>&5
6400 ac_status=$?
6401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6402 (exit $ac_status); }; } &&
6403 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6405 (eval $ac_try) 2>&5
6406 ac_status=$?
6407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6408 (exit $ac_status); }; }; then
6409 ac_hi=-1 ac_mid=-1
6410 while :; do
6411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006412/* confdefs.h. */
6413_ACEOF
6414cat confdefs.h >>conftest.$ac_ext
6415cat >>conftest.$ac_ext <<_ACEOF
6416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006417$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006418int
6419main ()
6420{
6421static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6422test_array [0] = 0
6423
6424 ;
6425 return 0;
6426}
6427_ACEOF
6428rm -f conftest.$ac_objext
6429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006430 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006432 grep -v '^ *+' conftest.er1 >conftest.err
6433 rm -f conftest.er1
6434 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6436 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006437 { ac_try='test -z "$ac_c_werror_flag"
6438 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6440 (eval $ac_try) 2>&5
6441 ac_status=$?
6442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443 (exit $ac_status); }; } &&
6444 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6446 (eval $ac_try) 2>&5
6447 ac_status=$?
6448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6449 (exit $ac_status); }; }; then
6450 ac_lo=$ac_mid; break
6451else
6452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006453sed 's/^/| /' conftest.$ac_ext >&5
6454
Martin v. Löwis11437992002-04-12 09:54:03 +00006455ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006456 if test $ac_mid -le $ac_hi; then
6457 ac_lo= ac_hi=
6458 break
6459 fi
6460 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006461fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006462rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006463 done
6464else
6465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006466sed 's/^/| /' conftest.$ac_ext >&5
6467
Martin v. Löwis11437992002-04-12 09:54:03 +00006468ac_lo= ac_hi=
6469fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006470rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006471fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006472rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006473# Binary search between lo and hi bounds.
6474while test "x$ac_lo" != "x$ac_hi"; do
6475 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006477/* confdefs.h. */
6478_ACEOF
6479cat confdefs.h >>conftest.$ac_ext
6480cat >>conftest.$ac_ext <<_ACEOF
6481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006482$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006483int
6484main ()
6485{
6486static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6487test_array [0] = 0
6488
6489 ;
6490 return 0;
6491}
6492_ACEOF
6493rm -f conftest.$ac_objext
6494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006495 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006497 grep -v '^ *+' conftest.er1 >conftest.err
6498 rm -f conftest.er1
6499 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6501 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006502 { ac_try='test -z "$ac_c_werror_flag"
6503 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6505 (eval $ac_try) 2>&5
6506 ac_status=$?
6507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6508 (exit $ac_status); }; } &&
6509 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6511 (eval $ac_try) 2>&5
6512 ac_status=$?
6513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6514 (exit $ac_status); }; }; then
6515 ac_hi=$ac_mid
6516else
6517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006518sed 's/^/| /' conftest.$ac_ext >&5
6519
Martin v. Löwis11437992002-04-12 09:54:03 +00006520ac_lo=`expr '(' $ac_mid ')' + 1`
6521fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006522rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006523done
6524case $ac_lo in
6525?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006526'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6527See \`config.log' for more details." >&5
6528echo "$as_me: error: cannot compute sizeof (int), 77
6529See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006530 { (exit 1); exit 1; }; } ;;
6531esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006532else
6533 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006534 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6535See \`config.log' for more details." >&5
6536echo "$as_me: error: cannot run test program while cross compiling
6537See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006538 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006539else
Martin v. Löwis11437992002-04-12 09:54:03 +00006540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006541/* confdefs.h. */
6542_ACEOF
6543cat confdefs.h >>conftest.$ac_ext
6544cat >>conftest.$ac_ext <<_ACEOF
6545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006546$ac_includes_default
6547long longval () { return (long) (sizeof (int)); }
6548unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006549#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006550#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006551int
6552main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006553{
Martin v. Löwis11437992002-04-12 09:54:03 +00006554
6555 FILE *f = fopen ("conftest.val", "w");
6556 if (! f)
6557 exit (1);
6558 if (((long) (sizeof (int))) < 0)
6559 {
6560 long i = longval ();
6561 if (i != ((long) (sizeof (int))))
6562 exit (1);
6563 fprintf (f, "%ld\n", i);
6564 }
6565 else
6566 {
6567 unsigned long i = ulongval ();
6568 if (i != ((long) (sizeof (int))))
6569 exit (1);
6570 fprintf (f, "%lu\n", i);
6571 }
6572 exit (ferror (f) || fclose (f) != 0);
6573
6574 ;
6575 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006576}
Martin v. Löwis11437992002-04-12 09:54:03 +00006577_ACEOF
6578rm -f conftest$ac_exeext
6579if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6580 (eval $ac_link) 2>&5
6581 ac_status=$?
6582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6585 (eval $ac_try) 2>&5
6586 ac_status=$?
6587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6588 (exit $ac_status); }; }; then
6589 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006590else
Martin v. Löwis11437992002-04-12 09:54:03 +00006591 echo "$as_me: program exited with status $ac_status" >&5
6592echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006593sed 's/^/| /' conftest.$ac_ext >&5
6594
Martin v. Löwis11437992002-04-12 09:54:03 +00006595( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006596{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6597See \`config.log' for more details." >&5
6598echo "$as_me: error: cannot compute sizeof (int), 77
6599See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006600 { (exit 1); exit 1; }; }
6601fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006602rm -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 +00006603fi
6604fi
6605rm -f conftest.val
6606else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006607 ac_cv_sizeof_int=0
6608fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006609fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006610echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6611echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6612cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006613#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006614_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006615
6616
Martin v. Löwis11437992002-04-12 09:54:03 +00006617echo "$as_me:$LINENO: checking for long" >&5
6618echo $ECHO_N "checking for long... $ECHO_C" >&6
6619if test "${ac_cv_type_long+set}" = set; then
6620 echo $ECHO_N "(cached) $ECHO_C" >&6
6621else
6622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006623/* confdefs.h. */
6624_ACEOF
6625cat confdefs.h >>conftest.$ac_ext
6626cat >>conftest.$ac_ext <<_ACEOF
6627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006628$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006629int
6630main ()
6631{
6632if ((long *) 0)
6633 return 0;
6634if (sizeof (long))
6635 return 0;
6636 ;
6637 return 0;
6638}
6639_ACEOF
6640rm -f conftest.$ac_objext
6641if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006642 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006644 grep -v '^ *+' conftest.er1 >conftest.err
6645 rm -f conftest.er1
6646 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6648 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006649 { ac_try='test -z "$ac_c_werror_flag"
6650 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6652 (eval $ac_try) 2>&5
6653 ac_status=$?
6654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6655 (exit $ac_status); }; } &&
6656 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6658 (eval $ac_try) 2>&5
6659 ac_status=$?
6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6661 (exit $ac_status); }; }; then
6662 ac_cv_type_long=yes
6663else
6664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006665sed 's/^/| /' conftest.$ac_ext >&5
6666
Martin v. Löwis11437992002-04-12 09:54:03 +00006667ac_cv_type_long=no
6668fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006669rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006670fi
6671echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6672echo "${ECHO_T}$ac_cv_type_long" >&6
6673
6674echo "$as_me:$LINENO: checking size of long" >&5
6675echo $ECHO_N "checking size of long... $ECHO_C" >&6
6676if test "${ac_cv_sizeof_long+set}" = set; then
6677 echo $ECHO_N "(cached) $ECHO_C" >&6
6678else
6679 if test "$ac_cv_type_long" = yes; then
6680 # The cast to unsigned long works around a bug in the HP C Compiler
6681 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6682 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6683 # This bug is HP SR number 8606223364.
6684 if test "$cross_compiling" = yes; then
6685 # Depending upon the size, compute the lo and hi bounds.
6686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006687/* confdefs.h. */
6688_ACEOF
6689cat confdefs.h >>conftest.$ac_ext
6690cat >>conftest.$ac_ext <<_ACEOF
6691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006692$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006693int
6694main ()
6695{
6696static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6697test_array [0] = 0
6698
6699 ;
6700 return 0;
6701}
6702_ACEOF
6703rm -f conftest.$ac_objext
6704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006705 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006707 grep -v '^ *+' conftest.er1 >conftest.err
6708 rm -f conftest.er1
6709 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6711 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006712 { ac_try='test -z "$ac_c_werror_flag"
6713 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6715 (eval $ac_try) 2>&5
6716 ac_status=$?
6717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6718 (exit $ac_status); }; } &&
6719 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6721 (eval $ac_try) 2>&5
6722 ac_status=$?
6723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6724 (exit $ac_status); }; }; then
6725 ac_lo=0 ac_mid=0
6726 while :; do
6727 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006728/* confdefs.h. */
6729_ACEOF
6730cat confdefs.h >>conftest.$ac_ext
6731cat >>conftest.$ac_ext <<_ACEOF
6732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006733$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006734int
6735main ()
6736{
6737static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6738test_array [0] = 0
6739
6740 ;
6741 return 0;
6742}
6743_ACEOF
6744rm -f conftest.$ac_objext
6745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006746 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006748 grep -v '^ *+' conftest.er1 >conftest.err
6749 rm -f conftest.er1
6750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6752 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006753 { ac_try='test -z "$ac_c_werror_flag"
6754 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6756 (eval $ac_try) 2>&5
6757 ac_status=$?
6758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6759 (exit $ac_status); }; } &&
6760 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6762 (eval $ac_try) 2>&5
6763 ac_status=$?
6764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6765 (exit $ac_status); }; }; then
6766 ac_hi=$ac_mid; break
6767else
6768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006769sed 's/^/| /' conftest.$ac_ext >&5
6770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006772 if test $ac_lo -le $ac_mid; then
6773 ac_lo= ac_hi=
6774 break
6775 fi
6776 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006777fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006778rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006779 done
6780else
6781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006782sed 's/^/| /' conftest.$ac_ext >&5
6783
Martin v. Löwis11437992002-04-12 09:54:03 +00006784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006785/* confdefs.h. */
6786_ACEOF
6787cat confdefs.h >>conftest.$ac_ext
6788cat >>conftest.$ac_ext <<_ACEOF
6789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006790$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006791int
6792main ()
6793{
6794static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6795test_array [0] = 0
6796
6797 ;
6798 return 0;
6799}
6800_ACEOF
6801rm -f conftest.$ac_objext
6802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006803 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006805 grep -v '^ *+' conftest.er1 >conftest.err
6806 rm -f conftest.er1
6807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6809 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006810 { ac_try='test -z "$ac_c_werror_flag"
6811 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6813 (eval $ac_try) 2>&5
6814 ac_status=$?
6815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6816 (exit $ac_status); }; } &&
6817 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6819 (eval $ac_try) 2>&5
6820 ac_status=$?
6821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6822 (exit $ac_status); }; }; then
6823 ac_hi=-1 ac_mid=-1
6824 while :; do
6825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006826/* confdefs.h. */
6827_ACEOF
6828cat confdefs.h >>conftest.$ac_ext
6829cat >>conftest.$ac_ext <<_ACEOF
6830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006831$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006832int
6833main ()
6834{
6835static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6836test_array [0] = 0
6837
6838 ;
6839 return 0;
6840}
6841_ACEOF
6842rm -f conftest.$ac_objext
6843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006844 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006846 grep -v '^ *+' conftest.er1 >conftest.err
6847 rm -f conftest.er1
6848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006851 { ac_try='test -z "$ac_c_werror_flag"
6852 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6854 (eval $ac_try) 2>&5
6855 ac_status=$?
6856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6857 (exit $ac_status); }; } &&
6858 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6860 (eval $ac_try) 2>&5
6861 ac_status=$?
6862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6863 (exit $ac_status); }; }; then
6864 ac_lo=$ac_mid; break
6865else
6866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006867sed 's/^/| /' conftest.$ac_ext >&5
6868
Martin v. Löwis11437992002-04-12 09:54:03 +00006869ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006870 if test $ac_mid -le $ac_hi; then
6871 ac_lo= ac_hi=
6872 break
6873 fi
6874 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006875fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006876rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006877 done
6878else
6879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006880sed 's/^/| /' conftest.$ac_ext >&5
6881
Martin v. Löwis11437992002-04-12 09:54:03 +00006882ac_lo= ac_hi=
6883fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006884rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006885fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006886rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006887# Binary search between lo and hi bounds.
6888while test "x$ac_lo" != "x$ac_hi"; do
6889 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006891/* confdefs.h. */
6892_ACEOF
6893cat confdefs.h >>conftest.$ac_ext
6894cat >>conftest.$ac_ext <<_ACEOF
6895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006896$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006897int
6898main ()
6899{
6900static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6901test_array [0] = 0
6902
6903 ;
6904 return 0;
6905}
6906_ACEOF
6907rm -f conftest.$ac_objext
6908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006909 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006911 grep -v '^ *+' conftest.er1 >conftest.err
6912 rm -f conftest.er1
6913 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6915 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006916 { ac_try='test -z "$ac_c_werror_flag"
6917 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6919 (eval $ac_try) 2>&5
6920 ac_status=$?
6921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6922 (exit $ac_status); }; } &&
6923 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6925 (eval $ac_try) 2>&5
6926 ac_status=$?
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6928 (exit $ac_status); }; }; then
6929 ac_hi=$ac_mid
6930else
6931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006932sed 's/^/| /' conftest.$ac_ext >&5
6933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934ac_lo=`expr '(' $ac_mid ')' + 1`
6935fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006936rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006937done
6938case $ac_lo in
6939?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006940'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6941See \`config.log' for more details." >&5
6942echo "$as_me: error: cannot compute sizeof (long), 77
6943See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006944 { (exit 1); exit 1; }; } ;;
6945esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006946else
6947 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006948 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6949See \`config.log' for more details." >&5
6950echo "$as_me: error: cannot run test program while cross compiling
6951See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006952 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006953else
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006955/* confdefs.h. */
6956_ACEOF
6957cat confdefs.h >>conftest.$ac_ext
6958cat >>conftest.$ac_ext <<_ACEOF
6959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006960$ac_includes_default
6961long longval () { return (long) (sizeof (long)); }
6962unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006963#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006964#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006965int
6966main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006967{
Martin v. Löwis11437992002-04-12 09:54:03 +00006968
6969 FILE *f = fopen ("conftest.val", "w");
6970 if (! f)
6971 exit (1);
6972 if (((long) (sizeof (long))) < 0)
6973 {
6974 long i = longval ();
6975 if (i != ((long) (sizeof (long))))
6976 exit (1);
6977 fprintf (f, "%ld\n", i);
6978 }
6979 else
6980 {
6981 unsigned long i = ulongval ();
6982 if (i != ((long) (sizeof (long))))
6983 exit (1);
6984 fprintf (f, "%lu\n", i);
6985 }
6986 exit (ferror (f) || fclose (f) != 0);
6987
6988 ;
6989 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006990}
Martin v. Löwis11437992002-04-12 09:54:03 +00006991_ACEOF
6992rm -f conftest$ac_exeext
6993if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6994 (eval $ac_link) 2>&5
6995 ac_status=$?
6996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6997 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6999 (eval $ac_try) 2>&5
7000 ac_status=$?
7001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7002 (exit $ac_status); }; }; then
7003 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007004else
Martin v. Löwis11437992002-04-12 09:54:03 +00007005 echo "$as_me: program exited with status $ac_status" >&5
7006echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007007sed 's/^/| /' conftest.$ac_ext >&5
7008
Martin v. Löwis11437992002-04-12 09:54:03 +00007009( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007010{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7011See \`config.log' for more details." >&5
7012echo "$as_me: error: cannot compute sizeof (long), 77
7013See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007014 { (exit 1); exit 1; }; }
7015fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007016rm -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 +00007017fi
7018fi
7019rm -f conftest.val
7020else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007021 ac_cv_sizeof_long=0
7022fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007023fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007024echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7025echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7026cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007027#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007028_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007029
7030
Martin v. Löwis11437992002-04-12 09:54:03 +00007031echo "$as_me:$LINENO: checking for void *" >&5
7032echo $ECHO_N "checking for void *... $ECHO_C" >&6
7033if test "${ac_cv_type_void_p+set}" = set; then
7034 echo $ECHO_N "(cached) $ECHO_C" >&6
7035else
7036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007037/* confdefs.h. */
7038_ACEOF
7039cat confdefs.h >>conftest.$ac_ext
7040cat >>conftest.$ac_ext <<_ACEOF
7041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007042$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007043int
7044main ()
7045{
7046if ((void * *) 0)
7047 return 0;
7048if (sizeof (void *))
7049 return 0;
7050 ;
7051 return 0;
7052}
7053_ACEOF
7054rm -f conftest.$ac_objext
7055if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007056 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007058 grep -v '^ *+' conftest.er1 >conftest.err
7059 rm -f conftest.er1
7060 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007063 { ac_try='test -z "$ac_c_werror_flag"
7064 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7066 (eval $ac_try) 2>&5
7067 ac_status=$?
7068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069 (exit $ac_status); }; } &&
7070 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7072 (eval $ac_try) 2>&5
7073 ac_status=$?
7074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7075 (exit $ac_status); }; }; then
7076 ac_cv_type_void_p=yes
7077else
7078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007079sed 's/^/| /' conftest.$ac_ext >&5
7080
Martin v. Löwis11437992002-04-12 09:54:03 +00007081ac_cv_type_void_p=no
7082fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007083rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007084fi
7085echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7086echo "${ECHO_T}$ac_cv_type_void_p" >&6
7087
7088echo "$as_me:$LINENO: checking size of void *" >&5
7089echo $ECHO_N "checking size of void *... $ECHO_C" >&6
7090if test "${ac_cv_sizeof_void_p+set}" = set; then
7091 echo $ECHO_N "(cached) $ECHO_C" >&6
7092else
7093 if test "$ac_cv_type_void_p" = yes; then
7094 # The cast to unsigned long works around a bug in the HP C Compiler
7095 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7096 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7097 # This bug is HP SR number 8606223364.
7098 if test "$cross_compiling" = yes; then
7099 # Depending upon the size, compute the lo and hi bounds.
7100cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007101/* confdefs.h. */
7102_ACEOF
7103cat confdefs.h >>conftest.$ac_ext
7104cat >>conftest.$ac_ext <<_ACEOF
7105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007106$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007107int
7108main ()
7109{
7110static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
7111test_array [0] = 0
7112
7113 ;
7114 return 0;
7115}
7116_ACEOF
7117rm -f conftest.$ac_objext
7118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007119 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007121 grep -v '^ *+' conftest.er1 >conftest.err
7122 rm -f conftest.er1
7123 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007126 { ac_try='test -z "$ac_c_werror_flag"
7127 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7129 (eval $ac_try) 2>&5
7130 ac_status=$?
7131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7132 (exit $ac_status); }; } &&
7133 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7135 (eval $ac_try) 2>&5
7136 ac_status=$?
7137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7138 (exit $ac_status); }; }; then
7139 ac_lo=0 ac_mid=0
7140 while :; do
7141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007142/* confdefs.h. */
7143_ACEOF
7144cat confdefs.h >>conftest.$ac_ext
7145cat >>conftest.$ac_ext <<_ACEOF
7146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007147$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007148int
7149main ()
7150{
7151static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7152test_array [0] = 0
7153
7154 ;
7155 return 0;
7156}
7157_ACEOF
7158rm -f conftest.$ac_objext
7159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007160 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007162 grep -v '^ *+' conftest.er1 >conftest.err
7163 rm -f conftest.er1
7164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7166 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007167 { ac_try='test -z "$ac_c_werror_flag"
7168 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7170 (eval $ac_try) 2>&5
7171 ac_status=$?
7172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7173 (exit $ac_status); }; } &&
7174 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7176 (eval $ac_try) 2>&5
7177 ac_status=$?
7178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7179 (exit $ac_status); }; }; then
7180 ac_hi=$ac_mid; break
7181else
7182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007183sed 's/^/| /' conftest.$ac_ext >&5
7184
Martin v. Löwis11437992002-04-12 09:54:03 +00007185ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007186 if test $ac_lo -le $ac_mid; then
7187 ac_lo= ac_hi=
7188 break
7189 fi
7190 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007191fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007192rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007193 done
7194else
7195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007196sed 's/^/| /' conftest.$ac_ext >&5
7197
Martin v. Löwis11437992002-04-12 09:54:03 +00007198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007199/* confdefs.h. */
7200_ACEOF
7201cat confdefs.h >>conftest.$ac_ext
7202cat >>conftest.$ac_ext <<_ACEOF
7203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007204$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007205int
7206main ()
7207{
7208static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7209test_array [0] = 0
7210
7211 ;
7212 return 0;
7213}
7214_ACEOF
7215rm -f conftest.$ac_objext
7216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007217 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007219 grep -v '^ *+' conftest.er1 >conftest.err
7220 rm -f conftest.er1
7221 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7223 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007224 { ac_try='test -z "$ac_c_werror_flag"
7225 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7227 (eval $ac_try) 2>&5
7228 ac_status=$?
7229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7230 (exit $ac_status); }; } &&
7231 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7233 (eval $ac_try) 2>&5
7234 ac_status=$?
7235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7236 (exit $ac_status); }; }; then
7237 ac_hi=-1 ac_mid=-1
7238 while :; do
7239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007245$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007246int
7247main ()
7248{
7249static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
7257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007258 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007260 grep -v '^ *+' conftest.er1 >conftest.err
7261 rm -f conftest.er1
7262 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7264 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007265 { ac_try='test -z "$ac_c_werror_flag"
7266 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7268 (eval $ac_try) 2>&5
7269 ac_status=$?
7270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271 (exit $ac_status); }; } &&
7272 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7274 (eval $ac_try) 2>&5
7275 ac_status=$?
7276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7277 (exit $ac_status); }; }; then
7278 ac_lo=$ac_mid; break
7279else
7280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007281sed 's/^/| /' conftest.$ac_ext >&5
7282
Martin v. Löwis11437992002-04-12 09:54:03 +00007283ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007284 if test $ac_mid -le $ac_hi; then
7285 ac_lo= ac_hi=
7286 break
7287 fi
7288 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007289fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007290rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007291 done
7292else
7293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007294sed 's/^/| /' conftest.$ac_ext >&5
7295
Martin v. Löwis11437992002-04-12 09:54:03 +00007296ac_lo= ac_hi=
7297fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007298rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007299fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007300rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007301# Binary search between lo and hi bounds.
7302while test "x$ac_lo" != "x$ac_hi"; do
7303 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007305/* confdefs.h. */
7306_ACEOF
7307cat confdefs.h >>conftest.$ac_ext
7308cat >>conftest.$ac_ext <<_ACEOF
7309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007310$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007311int
7312main ()
7313{
7314static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7315test_array [0] = 0
7316
7317 ;
7318 return 0;
7319}
7320_ACEOF
7321rm -f conftest.$ac_objext
7322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007323 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007325 grep -v '^ *+' conftest.er1 >conftest.err
7326 rm -f conftest.er1
7327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7329 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007330 { ac_try='test -z "$ac_c_werror_flag"
7331 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7333 (eval $ac_try) 2>&5
7334 ac_status=$?
7335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7336 (exit $ac_status); }; } &&
7337 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7339 (eval $ac_try) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); }; }; then
7343 ac_hi=$ac_mid
7344else
7345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007346sed 's/^/| /' conftest.$ac_ext >&5
7347
Martin v. Löwis11437992002-04-12 09:54:03 +00007348ac_lo=`expr '(' $ac_mid ')' + 1`
7349fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007351done
7352case $ac_lo in
7353?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007354'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7355See \`config.log' for more details." >&5
7356echo "$as_me: error: cannot compute sizeof (void *), 77
7357See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007358 { (exit 1); exit 1; }; } ;;
7359esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007360else
7361 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007362 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7363See \`config.log' for more details." >&5
7364echo "$as_me: error: cannot run test program while cross compiling
7365See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007366 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007367else
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007369/* confdefs.h. */
7370_ACEOF
7371cat confdefs.h >>conftest.$ac_ext
7372cat >>conftest.$ac_ext <<_ACEOF
7373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007374$ac_includes_default
7375long longval () { return (long) (sizeof (void *)); }
7376unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007377#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007378#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007379int
7380main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007381{
Martin v. Löwis11437992002-04-12 09:54:03 +00007382
7383 FILE *f = fopen ("conftest.val", "w");
7384 if (! f)
7385 exit (1);
7386 if (((long) (sizeof (void *))) < 0)
7387 {
7388 long i = longval ();
7389 if (i != ((long) (sizeof (void *))))
7390 exit (1);
7391 fprintf (f, "%ld\n", i);
7392 }
7393 else
7394 {
7395 unsigned long i = ulongval ();
7396 if (i != ((long) (sizeof (void *))))
7397 exit (1);
7398 fprintf (f, "%lu\n", i);
7399 }
7400 exit (ferror (f) || fclose (f) != 0);
7401
7402 ;
7403 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007404}
Martin v. Löwis11437992002-04-12 09:54:03 +00007405_ACEOF
7406rm -f conftest$ac_exeext
7407if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7408 (eval $ac_link) 2>&5
7409 ac_status=$?
7410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7413 (eval $ac_try) 2>&5
7414 ac_status=$?
7415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7416 (exit $ac_status); }; }; then
7417 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007418else
Martin v. Löwis11437992002-04-12 09:54:03 +00007419 echo "$as_me: program exited with status $ac_status" >&5
7420echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007421sed 's/^/| /' conftest.$ac_ext >&5
7422
Martin v. Löwis11437992002-04-12 09:54:03 +00007423( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007424{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7425See \`config.log' for more details." >&5
7426echo "$as_me: error: cannot compute sizeof (void *), 77
7427See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007428 { (exit 1); exit 1; }; }
7429fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007430rm -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 +00007431fi
7432fi
7433rm -f conftest.val
7434else
Guido van Rossumad678af1998-10-02 14:42:15 +00007435 ac_cv_sizeof_void_p=0
7436fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007438echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7439echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7440cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007441#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007442_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007443
7444
Martin v. Löwis11437992002-04-12 09:54:03 +00007445echo "$as_me:$LINENO: checking for short" >&5
7446echo $ECHO_N "checking for short... $ECHO_C" >&6
7447if test "${ac_cv_type_short+set}" = set; then
7448 echo $ECHO_N "(cached) $ECHO_C" >&6
7449else
7450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007451/* confdefs.h. */
7452_ACEOF
7453cat confdefs.h >>conftest.$ac_ext
7454cat >>conftest.$ac_ext <<_ACEOF
7455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007456$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007457int
7458main ()
7459{
7460if ((short *) 0)
7461 return 0;
7462if (sizeof (short))
7463 return 0;
7464 ;
7465 return 0;
7466}
7467_ACEOF
7468rm -f conftest.$ac_objext
7469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007470 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007472 grep -v '^ *+' conftest.er1 >conftest.err
7473 rm -f conftest.er1
7474 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7476 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007477 { ac_try='test -z "$ac_c_werror_flag"
7478 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7480 (eval $ac_try) 2>&5
7481 ac_status=$?
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); }; } &&
7484 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7486 (eval $ac_try) 2>&5
7487 ac_status=$?
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); }; }; then
7490 ac_cv_type_short=yes
7491else
7492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007493sed 's/^/| /' conftest.$ac_ext >&5
7494
Martin v. Löwis11437992002-04-12 09:54:03 +00007495ac_cv_type_short=no
7496fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007497rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007498fi
7499echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7500echo "${ECHO_T}$ac_cv_type_short" >&6
7501
7502echo "$as_me:$LINENO: checking size of short" >&5
7503echo $ECHO_N "checking size of short... $ECHO_C" >&6
7504if test "${ac_cv_sizeof_short+set}" = set; then
7505 echo $ECHO_N "(cached) $ECHO_C" >&6
7506else
7507 if test "$ac_cv_type_short" = yes; then
7508 # The cast to unsigned long works around a bug in the HP C Compiler
7509 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7510 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7511 # This bug is HP SR number 8606223364.
7512 if test "$cross_compiling" = yes; then
7513 # Depending upon the size, compute the lo and hi bounds.
7514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007515/* confdefs.h. */
7516_ACEOF
7517cat confdefs.h >>conftest.$ac_ext
7518cat >>conftest.$ac_ext <<_ACEOF
7519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007521int
7522main ()
7523{
7524static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7525test_array [0] = 0
7526
7527 ;
7528 return 0;
7529}
7530_ACEOF
7531rm -f conftest.$ac_objext
7532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007533 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007535 grep -v '^ *+' conftest.er1 >conftest.err
7536 rm -f conftest.er1
7537 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007540 { ac_try='test -z "$ac_c_werror_flag"
7541 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7543 (eval $ac_try) 2>&5
7544 ac_status=$?
7545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546 (exit $ac_status); }; } &&
7547 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7549 (eval $ac_try) 2>&5
7550 ac_status=$?
7551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7552 (exit $ac_status); }; }; then
7553 ac_lo=0 ac_mid=0
7554 while :; do
7555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007556/* confdefs.h. */
7557_ACEOF
7558cat confdefs.h >>conftest.$ac_ext
7559cat >>conftest.$ac_ext <<_ACEOF
7560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007561$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007562int
7563main ()
7564{
7565static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7566test_array [0] = 0
7567
7568 ;
7569 return 0;
7570}
7571_ACEOF
7572rm -f conftest.$ac_objext
7573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007574 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007576 grep -v '^ *+' conftest.er1 >conftest.err
7577 rm -f conftest.er1
7578 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7580 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007581 { ac_try='test -z "$ac_c_werror_flag"
7582 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
7588 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7590 (eval $ac_try) 2>&5
7591 ac_status=$?
7592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7593 (exit $ac_status); }; }; then
7594 ac_hi=$ac_mid; break
7595else
7596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007597sed 's/^/| /' conftest.$ac_ext >&5
7598
Martin v. Löwis11437992002-04-12 09:54:03 +00007599ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007600 if test $ac_lo -le $ac_mid; then
7601 ac_lo= ac_hi=
7602 break
7603 fi
7604 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007605fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007606rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007607 done
7608else
7609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007610sed 's/^/| /' conftest.$ac_ext >&5
7611
Martin v. Löwis11437992002-04-12 09:54:03 +00007612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007613/* confdefs.h. */
7614_ACEOF
7615cat confdefs.h >>conftest.$ac_ext
7616cat >>conftest.$ac_ext <<_ACEOF
7617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007618$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007619int
7620main ()
7621{
7622static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7623test_array [0] = 0
7624
7625 ;
7626 return 0;
7627}
7628_ACEOF
7629rm -f conftest.$ac_objext
7630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007631 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007633 grep -v '^ *+' conftest.er1 >conftest.err
7634 rm -f conftest.er1
7635 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7637 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007638 { ac_try='test -z "$ac_c_werror_flag"
7639 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7641 (eval $ac_try) 2>&5
7642 ac_status=$?
7643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7644 (exit $ac_status); }; } &&
7645 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7647 (eval $ac_try) 2>&5
7648 ac_status=$?
7649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7650 (exit $ac_status); }; }; then
7651 ac_hi=-1 ac_mid=-1
7652 while :; do
7653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007654/* confdefs.h. */
7655_ACEOF
7656cat confdefs.h >>conftest.$ac_ext
7657cat >>conftest.$ac_ext <<_ACEOF
7658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007659$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007660int
7661main ()
7662{
7663static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7664test_array [0] = 0
7665
7666 ;
7667 return 0;
7668}
7669_ACEOF
7670rm -f conftest.$ac_objext
7671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007672 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007674 grep -v '^ *+' conftest.er1 >conftest.err
7675 rm -f conftest.er1
7676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7678 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007679 { ac_try='test -z "$ac_c_werror_flag"
7680 || 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_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007698 if test $ac_mid -le $ac_hi; then
7699 ac_lo= ac_hi=
7700 break
7701 fi
7702 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007704rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 done
7706else
7707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007708sed 's/^/| /' conftest.$ac_ext >&5
7709
Martin v. Löwis11437992002-04-12 09:54:03 +00007710ac_lo= ac_hi=
7711fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007712rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007713fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007714rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007715# Binary search between lo and hi bounds.
7716while test "x$ac_lo" != "x$ac_hi"; do
7717 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007719/* confdefs.h. */
7720_ACEOF
7721cat confdefs.h >>conftest.$ac_ext
7722cat >>conftest.$ac_ext <<_ACEOF
7723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007724$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007725int
7726main ()
7727{
7728static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7729test_array [0] = 0
7730
7731 ;
7732 return 0;
7733}
7734_ACEOF
7735rm -f conftest.$ac_objext
7736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007737 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007739 grep -v '^ *+' conftest.er1 >conftest.err
7740 rm -f conftest.er1
7741 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7743 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007744 { ac_try='test -z "$ac_c_werror_flag"
7745 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7747 (eval $ac_try) 2>&5
7748 ac_status=$?
7749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7750 (exit $ac_status); }; } &&
7751 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7753 (eval $ac_try) 2>&5
7754 ac_status=$?
7755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7756 (exit $ac_status); }; }; then
7757 ac_hi=$ac_mid
7758else
7759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007760sed 's/^/| /' conftest.$ac_ext >&5
7761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762ac_lo=`expr '(' $ac_mid ')' + 1`
7763fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007764rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007765done
7766case $ac_lo in
7767?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007768'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7769See \`config.log' for more details." >&5
7770echo "$as_me: error: cannot compute sizeof (short), 77
7771See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 { (exit 1); exit 1; }; } ;;
7773esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007774else
7775 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007776 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7777See \`config.log' for more details." >&5
7778echo "$as_me: error: cannot run test program while cross compiling
7779See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007780 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007781else
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007783/* confdefs.h. */
7784_ACEOF
7785cat confdefs.h >>conftest.$ac_ext
7786cat >>conftest.$ac_ext <<_ACEOF
7787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007788$ac_includes_default
7789long longval () { return (long) (sizeof (short)); }
7790unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007791#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007792#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007793int
7794main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007795{
Martin v. Löwis11437992002-04-12 09:54:03 +00007796
7797 FILE *f = fopen ("conftest.val", "w");
7798 if (! f)
7799 exit (1);
7800 if (((long) (sizeof (short))) < 0)
7801 {
7802 long i = longval ();
7803 if (i != ((long) (sizeof (short))))
7804 exit (1);
7805 fprintf (f, "%ld\n", i);
7806 }
7807 else
7808 {
7809 unsigned long i = ulongval ();
7810 if (i != ((long) (sizeof (short))))
7811 exit (1);
7812 fprintf (f, "%lu\n", i);
7813 }
7814 exit (ferror (f) || fclose (f) != 0);
7815
7816 ;
7817 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007818}
Martin v. Löwis11437992002-04-12 09:54:03 +00007819_ACEOF
7820rm -f conftest$ac_exeext
7821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7822 (eval $ac_link) 2>&5
7823 ac_status=$?
7824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7825 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7827 (eval $ac_try) 2>&5
7828 ac_status=$?
7829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7830 (exit $ac_status); }; }; then
7831 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007832else
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 echo "$as_me: program exited with status $ac_status" >&5
7834echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007835sed 's/^/| /' conftest.$ac_ext >&5
7836
Martin v. Löwis11437992002-04-12 09:54:03 +00007837( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007838{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7839See \`config.log' for more details." >&5
7840echo "$as_me: error: cannot compute sizeof (short), 77
7841See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 { (exit 1); exit 1; }; }
7843fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007844rm -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 +00007845fi
7846fi
7847rm -f conftest.val
7848else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007849 ac_cv_sizeof_short=0
7850fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007852echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7853echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7854cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007855#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007856_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007857
7858
Martin v. Löwis11437992002-04-12 09:54:03 +00007859echo "$as_me:$LINENO: checking for float" >&5
7860echo $ECHO_N "checking for float... $ECHO_C" >&6
7861if test "${ac_cv_type_float+set}" = set; then
7862 echo $ECHO_N "(cached) $ECHO_C" >&6
7863else
7864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007865/* confdefs.h. */
7866_ACEOF
7867cat confdefs.h >>conftest.$ac_ext
7868cat >>conftest.$ac_ext <<_ACEOF
7869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007870$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007871int
7872main ()
7873{
7874if ((float *) 0)
7875 return 0;
7876if (sizeof (float))
7877 return 0;
7878 ;
7879 return 0;
7880}
7881_ACEOF
7882rm -f conftest.$ac_objext
7883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007884 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007886 grep -v '^ *+' conftest.er1 >conftest.err
7887 rm -f conftest.er1
7888 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7890 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007891 { ac_try='test -z "$ac_c_werror_flag"
7892 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
7898 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7900 (eval $ac_try) 2>&5
7901 ac_status=$?
7902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7903 (exit $ac_status); }; }; then
7904 ac_cv_type_float=yes
7905else
7906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007907sed 's/^/| /' conftest.$ac_ext >&5
7908
Martin v. Löwis11437992002-04-12 09:54:03 +00007909ac_cv_type_float=no
7910fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007911rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
7913echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7914echo "${ECHO_T}$ac_cv_type_float" >&6
7915
7916echo "$as_me:$LINENO: checking size of float" >&5
7917echo $ECHO_N "checking size of float... $ECHO_C" >&6
7918if test "${ac_cv_sizeof_float+set}" = set; then
7919 echo $ECHO_N "(cached) $ECHO_C" >&6
7920else
7921 if test "$ac_cv_type_float" = yes; then
7922 # The cast to unsigned long works around a bug in the HP C Compiler
7923 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7924 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7925 # This bug is HP SR number 8606223364.
7926 if test "$cross_compiling" = yes; then
7927 # Depending upon the size, compute the lo and hi bounds.
7928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007929/* confdefs.h. */
7930_ACEOF
7931cat confdefs.h >>conftest.$ac_ext
7932cat >>conftest.$ac_ext <<_ACEOF
7933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007934$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
7938static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7939test_array [0] = 0
7940
7941 ;
7942 return 0;
7943}
7944_ACEOF
7945rm -f conftest.$ac_objext
7946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007947 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007949 grep -v '^ *+' conftest.er1 >conftest.err
7950 rm -f conftest.er1
7951 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007954 { ac_try='test -z "$ac_c_werror_flag"
7955 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7957 (eval $ac_try) 2>&5
7958 ac_status=$?
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); }; } &&
7961 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7963 (eval $ac_try) 2>&5
7964 ac_status=$?
7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966 (exit $ac_status); }; }; then
7967 ac_lo=0 ac_mid=0
7968 while :; do
7969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007970/* confdefs.h. */
7971_ACEOF
7972cat confdefs.h >>conftest.$ac_ext
7973cat >>conftest.$ac_ext <<_ACEOF
7974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007975$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007976int
7977main ()
7978{
7979static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7980test_array [0] = 0
7981
7982 ;
7983 return 0;
7984}
7985_ACEOF
7986rm -f conftest.$ac_objext
7987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007988 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007990 grep -v '^ *+' conftest.er1 >conftest.err
7991 rm -f conftest.er1
7992 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007995 { ac_try='test -z "$ac_c_werror_flag"
7996 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7998 (eval $ac_try) 2>&5
7999 ac_status=$?
8000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8001 (exit $ac_status); }; } &&
8002 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8004 (eval $ac_try) 2>&5
8005 ac_status=$?
8006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8007 (exit $ac_status); }; }; then
8008 ac_hi=$ac_mid; break
8009else
8010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008011sed 's/^/| /' conftest.$ac_ext >&5
8012
Martin v. Löwis11437992002-04-12 09:54:03 +00008013ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008014 if test $ac_lo -le $ac_mid; then
8015 ac_lo= ac_hi=
8016 break
8017 fi
8018 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008019fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008020rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008021 done
8022else
8023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008024sed 's/^/| /' conftest.$ac_ext >&5
8025
Martin v. Löwis11437992002-04-12 09:54:03 +00008026cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008027/* confdefs.h. */
8028_ACEOF
8029cat confdefs.h >>conftest.$ac_ext
8030cat >>conftest.$ac_ext <<_ACEOF
8031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008033int
8034main ()
8035{
8036static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
8037test_array [0] = 0
8038
8039 ;
8040 return 0;
8041}
8042_ACEOF
8043rm -f conftest.$ac_objext
8044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008045 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008047 grep -v '^ *+' conftest.er1 >conftest.err
8048 rm -f conftest.er1
8049 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008052 { ac_try='test -z "$ac_c_werror_flag"
8053 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8055 (eval $ac_try) 2>&5
8056 ac_status=$?
8057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8058 (exit $ac_status); }; } &&
8059 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8061 (eval $ac_try) 2>&5
8062 ac_status=$?
8063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8064 (exit $ac_status); }; }; then
8065 ac_hi=-1 ac_mid=-1
8066 while :; do
8067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* confdefs.h. */
8069_ACEOF
8070cat confdefs.h >>conftest.$ac_ext
8071cat >>conftest.$ac_ext <<_ACEOF
8072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008073$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008074int
8075main ()
8076{
8077static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
8078test_array [0] = 0
8079
8080 ;
8081 return 0;
8082}
8083_ACEOF
8084rm -f conftest.$ac_objext
8085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008086 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008088 grep -v '^ *+' conftest.er1 >conftest.err
8089 rm -f conftest.er1
8090 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008093 { ac_try='test -z "$ac_c_werror_flag"
8094 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8096 (eval $ac_try) 2>&5
8097 ac_status=$?
8098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8099 (exit $ac_status); }; } &&
8100 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8102 (eval $ac_try) 2>&5
8103 ac_status=$?
8104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8105 (exit $ac_status); }; }; then
8106 ac_lo=$ac_mid; break
8107else
8108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008109sed 's/^/| /' conftest.$ac_ext >&5
8110
Martin v. Löwis11437992002-04-12 09:54:03 +00008111ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008112 if test $ac_mid -le $ac_hi; then
8113 ac_lo= ac_hi=
8114 break
8115 fi
8116 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008117fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008118rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 done
8120else
8121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008122sed 's/^/| /' conftest.$ac_ext >&5
8123
Martin v. Löwis11437992002-04-12 09:54:03 +00008124ac_lo= ac_hi=
8125fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008126rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008127fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008128rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008129# Binary search between lo and hi bounds.
8130while test "x$ac_lo" != "x$ac_hi"; do
8131 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008133/* confdefs.h. */
8134_ACEOF
8135cat confdefs.h >>conftest.$ac_ext
8136cat >>conftest.$ac_ext <<_ACEOF
8137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008138$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008139int
8140main ()
8141{
8142static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8143test_array [0] = 0
8144
8145 ;
8146 return 0;
8147}
8148_ACEOF
8149rm -f conftest.$ac_objext
8150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008151 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008153 grep -v '^ *+' conftest.er1 >conftest.err
8154 rm -f conftest.er1
8155 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8157 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008158 { ac_try='test -z "$ac_c_werror_flag"
8159 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8161 (eval $ac_try) 2>&5
8162 ac_status=$?
8163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8164 (exit $ac_status); }; } &&
8165 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8167 (eval $ac_try) 2>&5
8168 ac_status=$?
8169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8170 (exit $ac_status); }; }; then
8171 ac_hi=$ac_mid
8172else
8173 echo "$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 +00008176ac_lo=`expr '(' $ac_mid ')' + 1`
8177fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008179done
8180case $ac_lo in
8181?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008182'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8183See \`config.log' for more details." >&5
8184echo "$as_me: error: cannot compute sizeof (float), 77
8185See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008186 { (exit 1); exit 1; }; } ;;
8187esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008188else
8189 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008190 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8191See \`config.log' for more details." >&5
8192echo "$as_me: error: cannot run test program while cross compiling
8193See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008195else
Martin v. Löwis11437992002-04-12 09:54:03 +00008196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008197/* confdefs.h. */
8198_ACEOF
8199cat confdefs.h >>conftest.$ac_ext
8200cat >>conftest.$ac_ext <<_ACEOF
8201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008202$ac_includes_default
8203long longval () { return (long) (sizeof (float)); }
8204unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008205#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008206#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008207int
8208main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008209{
Martin v. Löwis11437992002-04-12 09:54:03 +00008210
8211 FILE *f = fopen ("conftest.val", "w");
8212 if (! f)
8213 exit (1);
8214 if (((long) (sizeof (float))) < 0)
8215 {
8216 long i = longval ();
8217 if (i != ((long) (sizeof (float))))
8218 exit (1);
8219 fprintf (f, "%ld\n", i);
8220 }
8221 else
8222 {
8223 unsigned long i = ulongval ();
8224 if (i != ((long) (sizeof (float))))
8225 exit (1);
8226 fprintf (f, "%lu\n", i);
8227 }
8228 exit (ferror (f) || fclose (f) != 0);
8229
8230 ;
8231 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008232}
Martin v. Löwis11437992002-04-12 09:54:03 +00008233_ACEOF
8234rm -f conftest$ac_exeext
8235if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8236 (eval $ac_link) 2>&5
8237 ac_status=$?
8238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8241 (eval $ac_try) 2>&5
8242 ac_status=$?
8243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8244 (exit $ac_status); }; }; then
8245 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008246else
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 echo "$as_me: program exited with status $ac_status" >&5
8248echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008249sed 's/^/| /' conftest.$ac_ext >&5
8250
Martin v. Löwis11437992002-04-12 09:54:03 +00008251( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008252{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8253See \`config.log' for more details." >&5
8254echo "$as_me: error: cannot compute sizeof (float), 77
8255See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008256 { (exit 1); exit 1; }; }
8257fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008258rm -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 +00008259fi
8260fi
8261rm -f conftest.val
8262else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008263 ac_cv_sizeof_float=0
8264fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008265fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008266echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8267echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8268cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008269#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008270_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008271
8272
Martin v. Löwis11437992002-04-12 09:54:03 +00008273echo "$as_me:$LINENO: checking for double" >&5
8274echo $ECHO_N "checking for double... $ECHO_C" >&6
8275if test "${ac_cv_type_double+set}" = set; then
8276 echo $ECHO_N "(cached) $ECHO_C" >&6
8277else
8278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008279/* confdefs.h. */
8280_ACEOF
8281cat confdefs.h >>conftest.$ac_ext
8282cat >>conftest.$ac_ext <<_ACEOF
8283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008284$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008285int
8286main ()
8287{
8288if ((double *) 0)
8289 return 0;
8290if (sizeof (double))
8291 return 0;
8292 ;
8293 return 0;
8294}
8295_ACEOF
8296rm -f conftest.$ac_objext
8297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008298 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008300 grep -v '^ *+' conftest.er1 >conftest.err
8301 rm -f conftest.er1
8302 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8304 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008305 { ac_try='test -z "$ac_c_werror_flag"
8306 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8308 (eval $ac_try) 2>&5
8309 ac_status=$?
8310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311 (exit $ac_status); }; } &&
8312 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8314 (eval $ac_try) 2>&5
8315 ac_status=$?
8316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317 (exit $ac_status); }; }; then
8318 ac_cv_type_double=yes
8319else
8320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008321sed 's/^/| /' conftest.$ac_ext >&5
8322
Martin v. Löwis11437992002-04-12 09:54:03 +00008323ac_cv_type_double=no
8324fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008325rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008326fi
8327echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8328echo "${ECHO_T}$ac_cv_type_double" >&6
8329
8330echo "$as_me:$LINENO: checking size of double" >&5
8331echo $ECHO_N "checking size of double... $ECHO_C" >&6
8332if test "${ac_cv_sizeof_double+set}" = set; then
8333 echo $ECHO_N "(cached) $ECHO_C" >&6
8334else
8335 if test "$ac_cv_type_double" = yes; then
8336 # The cast to unsigned long works around a bug in the HP C Compiler
8337 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8338 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8339 # This bug is HP SR number 8606223364.
8340 if test "$cross_compiling" = yes; then
8341 # Depending upon the size, compute the lo and hi bounds.
8342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008343/* confdefs.h. */
8344_ACEOF
8345cat confdefs.h >>conftest.$ac_ext
8346cat >>conftest.$ac_ext <<_ACEOF
8347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008348$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008349int
8350main ()
8351{
8352static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8353test_array [0] = 0
8354
8355 ;
8356 return 0;
8357}
8358_ACEOF
8359rm -f conftest.$ac_objext
8360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008361 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008363 grep -v '^ *+' conftest.er1 >conftest.err
8364 rm -f conftest.er1
8365 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8367 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008368 { ac_try='test -z "$ac_c_werror_flag"
8369 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8371 (eval $ac_try) 2>&5
8372 ac_status=$?
8373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8374 (exit $ac_status); }; } &&
8375 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8377 (eval $ac_try) 2>&5
8378 ac_status=$?
8379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8380 (exit $ac_status); }; }; then
8381 ac_lo=0 ac_mid=0
8382 while :; do
8383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008384/* confdefs.h. */
8385_ACEOF
8386cat confdefs.h >>conftest.$ac_ext
8387cat >>conftest.$ac_ext <<_ACEOF
8388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008389$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008390int
8391main ()
8392{
8393static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8394test_array [0] = 0
8395
8396 ;
8397 return 0;
8398}
8399_ACEOF
8400rm -f conftest.$ac_objext
8401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008402 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008404 grep -v '^ *+' conftest.er1 >conftest.err
8405 rm -f conftest.er1
8406 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8408 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008409 { ac_try='test -z "$ac_c_werror_flag"
8410 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8412 (eval $ac_try) 2>&5
8413 ac_status=$?
8414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8415 (exit $ac_status); }; } &&
8416 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8418 (eval $ac_try) 2>&5
8419 ac_status=$?
8420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8421 (exit $ac_status); }; }; then
8422 ac_hi=$ac_mid; break
8423else
8424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008425sed 's/^/| /' conftest.$ac_ext >&5
8426
Martin v. Löwis11437992002-04-12 09:54:03 +00008427ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008428 if test $ac_lo -le $ac_mid; then
8429 ac_lo= ac_hi=
8430 break
8431 fi
8432 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008433fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 done
8436else
8437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008438sed 's/^/| /' conftest.$ac_ext >&5
8439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* confdefs.h. */
8442_ACEOF
8443cat confdefs.h >>conftest.$ac_ext
8444cat >>conftest.$ac_ext <<_ACEOF
8445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008447int
8448main ()
8449{
8450static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8451test_array [0] = 0
8452
8453 ;
8454 return 0;
8455}
8456_ACEOF
8457rm -f conftest.$ac_objext
8458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008459 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008461 grep -v '^ *+' conftest.er1 >conftest.err
8462 rm -f conftest.er1
8463 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8465 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008466 { ac_try='test -z "$ac_c_werror_flag"
8467 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8469 (eval $ac_try) 2>&5
8470 ac_status=$?
8471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8472 (exit $ac_status); }; } &&
8473 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8475 (eval $ac_try) 2>&5
8476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); }; }; then
8479 ac_hi=-1 ac_mid=-1
8480 while :; do
8481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008482/* confdefs.h. */
8483_ACEOF
8484cat confdefs.h >>conftest.$ac_ext
8485cat >>conftest.$ac_ext <<_ACEOF
8486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008487$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008488int
8489main ()
8490{
8491static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8492test_array [0] = 0
8493
8494 ;
8495 return 0;
8496}
8497_ACEOF
8498rm -f conftest.$ac_objext
8499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008500 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008502 grep -v '^ *+' conftest.er1 >conftest.err
8503 rm -f conftest.er1
8504 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8506 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008507 { ac_try='test -z "$ac_c_werror_flag"
8508 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8510 (eval $ac_try) 2>&5
8511 ac_status=$?
8512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8513 (exit $ac_status); }; } &&
8514 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8516 (eval $ac_try) 2>&5
8517 ac_status=$?
8518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8519 (exit $ac_status); }; }; then
8520 ac_lo=$ac_mid; break
8521else
8522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008523sed 's/^/| /' conftest.$ac_ext >&5
8524
Martin v. Löwis11437992002-04-12 09:54:03 +00008525ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008526 if test $ac_mid -le $ac_hi; then
8527 ac_lo= ac_hi=
8528 break
8529 fi
8530 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 done
8534else
8535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008536sed 's/^/| /' conftest.$ac_ext >&5
8537
Martin v. Löwis11437992002-04-12 09:54:03 +00008538ac_lo= ac_hi=
8539fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008540rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008541fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008542rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008543# Binary search between lo and hi bounds.
8544while test "x$ac_lo" != "x$ac_hi"; do
8545 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008547/* confdefs.h. */
8548_ACEOF
8549cat confdefs.h >>conftest.$ac_ext
8550cat >>conftest.$ac_ext <<_ACEOF
8551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008552$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008553int
8554main ()
8555{
8556static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8557test_array [0] = 0
8558
8559 ;
8560 return 0;
8561}
8562_ACEOF
8563rm -f conftest.$ac_objext
8564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008565 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008567 grep -v '^ *+' conftest.er1 >conftest.err
8568 rm -f conftest.er1
8569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8571 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008572 { ac_try='test -z "$ac_c_werror_flag"
8573 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8575 (eval $ac_try) 2>&5
8576 ac_status=$?
8577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8578 (exit $ac_status); }; } &&
8579 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8581 (eval $ac_try) 2>&5
8582 ac_status=$?
8583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8584 (exit $ac_status); }; }; then
8585 ac_hi=$ac_mid
8586else
8587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008588sed 's/^/| /' conftest.$ac_ext >&5
8589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590ac_lo=`expr '(' $ac_mid ')' + 1`
8591fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008592rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008593done
8594case $ac_lo in
8595?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008596'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8597See \`config.log' for more details." >&5
8598echo "$as_me: error: cannot compute sizeof (double), 77
8599See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008600 { (exit 1); exit 1; }; } ;;
8601esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008602else
8603 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008604 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8605See \`config.log' for more details." >&5
8606echo "$as_me: error: cannot run test program while cross compiling
8607See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008609else
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008611/* confdefs.h. */
8612_ACEOF
8613cat confdefs.h >>conftest.$ac_ext
8614cat >>conftest.$ac_ext <<_ACEOF
8615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008616$ac_includes_default
8617long longval () { return (long) (sizeof (double)); }
8618unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008619#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008620#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008621int
8622main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008623{
Martin v. Löwis11437992002-04-12 09:54:03 +00008624
8625 FILE *f = fopen ("conftest.val", "w");
8626 if (! f)
8627 exit (1);
8628 if (((long) (sizeof (double))) < 0)
8629 {
8630 long i = longval ();
8631 if (i != ((long) (sizeof (double))))
8632 exit (1);
8633 fprintf (f, "%ld\n", i);
8634 }
8635 else
8636 {
8637 unsigned long i = ulongval ();
8638 if (i != ((long) (sizeof (double))))
8639 exit (1);
8640 fprintf (f, "%lu\n", i);
8641 }
8642 exit (ferror (f) || fclose (f) != 0);
8643
8644 ;
8645 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008646}
Martin v. Löwis11437992002-04-12 09:54:03 +00008647_ACEOF
8648rm -f conftest$ac_exeext
8649if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8650 (eval $ac_link) 2>&5
8651 ac_status=$?
8652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8653 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8655 (eval $ac_try) 2>&5
8656 ac_status=$?
8657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8658 (exit $ac_status); }; }; then
8659 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008660else
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 echo "$as_me: program exited with status $ac_status" >&5
8662echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008663sed 's/^/| /' conftest.$ac_ext >&5
8664
Martin v. Löwis11437992002-04-12 09:54:03 +00008665( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008666{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8667See \`config.log' for more details." >&5
8668echo "$as_me: error: cannot compute sizeof (double), 77
8669See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 { (exit 1); exit 1; }; }
8671fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008672rm -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 +00008673fi
8674fi
8675rm -f conftest.val
8676else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008677 ac_cv_sizeof_double=0
8678fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008679fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008680echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8681echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8682cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008683#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008684_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008685
8686
Martin v. Löwis11437992002-04-12 09:54:03 +00008687echo "$as_me:$LINENO: checking for fpos_t" >&5
8688echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8689if test "${ac_cv_type_fpos_t+set}" = set; then
8690 echo $ECHO_N "(cached) $ECHO_C" >&6
8691else
8692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008693/* confdefs.h. */
8694_ACEOF
8695cat confdefs.h >>conftest.$ac_ext
8696cat >>conftest.$ac_ext <<_ACEOF
8697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008698$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008699int
8700main ()
8701{
8702if ((fpos_t *) 0)
8703 return 0;
8704if (sizeof (fpos_t))
8705 return 0;
8706 ;
8707 return 0;
8708}
8709_ACEOF
8710rm -f conftest.$ac_objext
8711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008712 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008714 grep -v '^ *+' conftest.er1 >conftest.err
8715 rm -f conftest.er1
8716 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8718 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008719 { ac_try='test -z "$ac_c_werror_flag"
8720 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8722 (eval $ac_try) 2>&5
8723 ac_status=$?
8724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8725 (exit $ac_status); }; } &&
8726 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8728 (eval $ac_try) 2>&5
8729 ac_status=$?
8730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8731 (exit $ac_status); }; }; then
8732 ac_cv_type_fpos_t=yes
8733else
8734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008735sed 's/^/| /' conftest.$ac_ext >&5
8736
Martin v. Löwis11437992002-04-12 09:54:03 +00008737ac_cv_type_fpos_t=no
8738fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008739rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008740fi
8741echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8742echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8743
8744echo "$as_me:$LINENO: checking size of fpos_t" >&5
8745echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8746if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8747 echo $ECHO_N "(cached) $ECHO_C" >&6
8748else
8749 if test "$ac_cv_type_fpos_t" = yes; then
8750 # The cast to unsigned long works around a bug in the HP C Compiler
8751 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8752 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8753 # This bug is HP SR number 8606223364.
8754 if test "$cross_compiling" = yes; then
8755 # Depending upon the size, compute the lo and hi bounds.
8756cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008757/* confdefs.h. */
8758_ACEOF
8759cat confdefs.h >>conftest.$ac_ext
8760cat >>conftest.$ac_ext <<_ACEOF
8761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008763int
8764main ()
8765{
8766static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8767test_array [0] = 0
8768
8769 ;
8770 return 0;
8771}
8772_ACEOF
8773rm -f conftest.$ac_objext
8774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008775 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008777 grep -v '^ *+' conftest.er1 >conftest.err
8778 rm -f conftest.er1
8779 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8781 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008782 { ac_try='test -z "$ac_c_werror_flag"
8783 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8785 (eval $ac_try) 2>&5
8786 ac_status=$?
8787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8788 (exit $ac_status); }; } &&
8789 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8791 (eval $ac_try) 2>&5
8792 ac_status=$?
8793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8794 (exit $ac_status); }; }; then
8795 ac_lo=0 ac_mid=0
8796 while :; do
8797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008798/* confdefs.h. */
8799_ACEOF
8800cat confdefs.h >>conftest.$ac_ext
8801cat >>conftest.$ac_ext <<_ACEOF
8802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008803$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008804int
8805main ()
8806{
8807static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8808test_array [0] = 0
8809
8810 ;
8811 return 0;
8812}
8813_ACEOF
8814rm -f conftest.$ac_objext
8815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008816 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008818 grep -v '^ *+' conftest.er1 >conftest.err
8819 rm -f conftest.er1
8820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8822 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008823 { ac_try='test -z "$ac_c_werror_flag"
8824 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8826 (eval $ac_try) 2>&5
8827 ac_status=$?
8828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8829 (exit $ac_status); }; } &&
8830 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8832 (eval $ac_try) 2>&5
8833 ac_status=$?
8834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8835 (exit $ac_status); }; }; then
8836 ac_hi=$ac_mid; break
8837else
8838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008839sed 's/^/| /' conftest.$ac_ext >&5
8840
Martin v. Löwis11437992002-04-12 09:54:03 +00008841ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008842 if test $ac_lo -le $ac_mid; then
8843 ac_lo= ac_hi=
8844 break
8845 fi
8846 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008847fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008848rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 done
8850else
8851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008852sed 's/^/| /' conftest.$ac_ext >&5
8853
Martin v. Löwis11437992002-04-12 09:54:03 +00008854cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008855/* confdefs.h. */
8856_ACEOF
8857cat confdefs.h >>conftest.$ac_ext
8858cat >>conftest.$ac_ext <<_ACEOF
8859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008860$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008861int
8862main ()
8863{
8864static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8865test_array [0] = 0
8866
8867 ;
8868 return 0;
8869}
8870_ACEOF
8871rm -f conftest.$ac_objext
8872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008873 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008875 grep -v '^ *+' conftest.er1 >conftest.err
8876 rm -f conftest.er1
8877 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8879 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008880 { ac_try='test -z "$ac_c_werror_flag"
8881 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8883 (eval $ac_try) 2>&5
8884 ac_status=$?
8885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8886 (exit $ac_status); }; } &&
8887 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8889 (eval $ac_try) 2>&5
8890 ac_status=$?
8891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8892 (exit $ac_status); }; }; then
8893 ac_hi=-1 ac_mid=-1
8894 while :; do
8895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008896/* confdefs.h. */
8897_ACEOF
8898cat confdefs.h >>conftest.$ac_ext
8899cat >>conftest.$ac_ext <<_ACEOF
8900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008901$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008902int
8903main ()
8904{
8905static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8906test_array [0] = 0
8907
8908 ;
8909 return 0;
8910}
8911_ACEOF
8912rm -f conftest.$ac_objext
8913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008914 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008916 grep -v '^ *+' conftest.er1 >conftest.err
8917 rm -f conftest.er1
8918 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008921 { ac_try='test -z "$ac_c_werror_flag"
8922 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8924 (eval $ac_try) 2>&5
8925 ac_status=$?
8926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8927 (exit $ac_status); }; } &&
8928 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8930 (eval $ac_try) 2>&5
8931 ac_status=$?
8932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8933 (exit $ac_status); }; }; then
8934 ac_lo=$ac_mid; break
8935else
8936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008937sed 's/^/| /' conftest.$ac_ext >&5
8938
Martin v. Löwis11437992002-04-12 09:54:03 +00008939ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008940 if test $ac_mid -le $ac_hi; then
8941 ac_lo= ac_hi=
8942 break
8943 fi
8944 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008945fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008946rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008947 done
8948else
8949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008950sed 's/^/| /' conftest.$ac_ext >&5
8951
Martin v. Löwis11437992002-04-12 09:54:03 +00008952ac_lo= ac_hi=
8953fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008955fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008956rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008957# Binary search between lo and hi bounds.
8958while test "x$ac_lo" != "x$ac_hi"; do
8959 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008961/* confdefs.h. */
8962_ACEOF
8963cat confdefs.h >>conftest.$ac_ext
8964cat >>conftest.$ac_ext <<_ACEOF
8965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008966$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008967int
8968main ()
8969{
8970static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8971test_array [0] = 0
8972
8973 ;
8974 return 0;
8975}
8976_ACEOF
8977rm -f conftest.$ac_objext
8978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008979 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008981 grep -v '^ *+' conftest.er1 >conftest.err
8982 rm -f conftest.er1
8983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8985 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008986 { ac_try='test -z "$ac_c_werror_flag"
8987 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8989 (eval $ac_try) 2>&5
8990 ac_status=$?
8991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8992 (exit $ac_status); }; } &&
8993 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8995 (eval $ac_try) 2>&5
8996 ac_status=$?
8997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998 (exit $ac_status); }; }; then
8999 ac_hi=$ac_mid
9000else
9001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009002sed 's/^/| /' conftest.$ac_ext >&5
9003
Martin v. Löwis11437992002-04-12 09:54:03 +00009004ac_lo=`expr '(' $ac_mid ')' + 1`
9005fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009006rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009007done
9008case $ac_lo in
9009?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009010'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9011See \`config.log' for more details." >&5
9012echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9013See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 { (exit 1); exit 1; }; } ;;
9015esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009016else
9017 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009018 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9019See \`config.log' for more details." >&5
9020echo "$as_me: error: cannot run test program while cross compiling
9021See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009023else
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* confdefs.h. */
9026_ACEOF
9027cat confdefs.h >>conftest.$ac_ext
9028cat >>conftest.$ac_ext <<_ACEOF
9029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009030$ac_includes_default
9031long longval () { return (long) (sizeof (fpos_t)); }
9032unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009033#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009034#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009035int
9036main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009037{
Martin v. Löwis11437992002-04-12 09:54:03 +00009038
9039 FILE *f = fopen ("conftest.val", "w");
9040 if (! f)
9041 exit (1);
9042 if (((long) (sizeof (fpos_t))) < 0)
9043 {
9044 long i = longval ();
9045 if (i != ((long) (sizeof (fpos_t))))
9046 exit (1);
9047 fprintf (f, "%ld\n", i);
9048 }
9049 else
9050 {
9051 unsigned long i = ulongval ();
9052 if (i != ((long) (sizeof (fpos_t))))
9053 exit (1);
9054 fprintf (f, "%lu\n", i);
9055 }
9056 exit (ferror (f) || fclose (f) != 0);
9057
9058 ;
9059 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009060}
Martin v. Löwis11437992002-04-12 09:54:03 +00009061_ACEOF
9062rm -f conftest$ac_exeext
9063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9064 (eval $ac_link) 2>&5
9065 ac_status=$?
9066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9069 (eval $ac_try) 2>&5
9070 ac_status=$?
9071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9072 (exit $ac_status); }; }; then
9073 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009074else
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 echo "$as_me: program exited with status $ac_status" >&5
9076echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009077sed 's/^/| /' conftest.$ac_ext >&5
9078
Martin v. Löwis11437992002-04-12 09:54:03 +00009079( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009080{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9081See \`config.log' for more details." >&5
9082echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9083See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 { (exit 1); exit 1; }; }
9085fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009086rm -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 +00009087fi
9088fi
9089rm -f conftest.val
9090else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009091 ac_cv_sizeof_fpos_t=0
9092fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009093fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009094echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9095echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
9096cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009097#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009098_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009099
Michael W. Hudson54241132001-12-07 15:38:26 +00009100
9101
Martin v. Löwis11437992002-04-12 09:54:03 +00009102echo "$as_me:$LINENO: checking for long long support" >&5
9103echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009104have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009105cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009106/* confdefs.h. */
9107_ACEOF
9108cat confdefs.h >>conftest.$ac_ext
9109cat >>conftest.$ac_ext <<_ACEOF
9110/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009111
Martin v. Löwis11437992002-04-12 09:54:03 +00009112int
9113main ()
9114{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009115long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 ;
9117 return 0;
9118}
9119_ACEOF
9120rm -f conftest.$ac_objext
9121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009122 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009124 grep -v '^ *+' conftest.er1 >conftest.err
9125 rm -f conftest.er1
9126 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9128 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009129 { ac_try='test -z "$ac_c_werror_flag"
9130 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9132 (eval $ac_try) 2>&5
9133 ac_status=$?
9134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9135 (exit $ac_status); }; } &&
9136 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9138 (eval $ac_try) 2>&5
9139 ac_status=$?
9140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9141 (exit $ac_status); }; }; then
9142
9143
9144cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009145#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009146_ACEOF
9147
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009148 have_long_long=yes
9149
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009150else
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009152sed 's/^/| /' conftest.$ac_ext >&5
9153
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009154fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009155rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009156echo "$as_me:$LINENO: result: $have_long_long" >&5
9157echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009158if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009159echo "$as_me:$LINENO: checking for long long" >&5
9160echo $ECHO_N "checking for long long... $ECHO_C" >&6
9161if test "${ac_cv_type_long_long+set}" = set; then
9162 echo $ECHO_N "(cached) $ECHO_C" >&6
9163else
9164 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009165/* confdefs.h. */
9166_ACEOF
9167cat confdefs.h >>conftest.$ac_ext
9168cat >>conftest.$ac_ext <<_ACEOF
9169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009170$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009171int
9172main ()
9173{
9174if ((long long *) 0)
9175 return 0;
9176if (sizeof (long long))
9177 return 0;
9178 ;
9179 return 0;
9180}
9181_ACEOF
9182rm -f conftest.$ac_objext
9183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009184 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009186 grep -v '^ *+' conftest.er1 >conftest.err
9187 rm -f conftest.er1
9188 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9190 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009191 { ac_try='test -z "$ac_c_werror_flag"
9192 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9194 (eval $ac_try) 2>&5
9195 ac_status=$?
9196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9197 (exit $ac_status); }; } &&
9198 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9200 (eval $ac_try) 2>&5
9201 ac_status=$?
9202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9203 (exit $ac_status); }; }; then
9204 ac_cv_type_long_long=yes
9205else
9206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009207sed 's/^/| /' conftest.$ac_ext >&5
9208
Martin v. Löwis11437992002-04-12 09:54:03 +00009209ac_cv_type_long_long=no
9210fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009211rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009212fi
9213echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9214echo "${ECHO_T}$ac_cv_type_long_long" >&6
9215
9216echo "$as_me:$LINENO: checking size of long long" >&5
9217echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9218if test "${ac_cv_sizeof_long_long+set}" = set; then
9219 echo $ECHO_N "(cached) $ECHO_C" >&6
9220else
9221 if test "$ac_cv_type_long_long" = yes; then
9222 # The cast to unsigned long works around a bug in the HP C Compiler
9223 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9224 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9225 # This bug is HP SR number 8606223364.
9226 if test "$cross_compiling" = yes; then
9227 # Depending upon the size, compute the lo and hi bounds.
9228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009229/* confdefs.h. */
9230_ACEOF
9231cat confdefs.h >>conftest.$ac_ext
9232cat >>conftest.$ac_ext <<_ACEOF
9233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009234$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009235int
9236main ()
9237{
9238static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9239test_array [0] = 0
9240
9241 ;
9242 return 0;
9243}
9244_ACEOF
9245rm -f conftest.$ac_objext
9246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009247 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009249 grep -v '^ *+' conftest.er1 >conftest.err
9250 rm -f conftest.er1
9251 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9253 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009254 { ac_try='test -z "$ac_c_werror_flag"
9255 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9257 (eval $ac_try) 2>&5
9258 ac_status=$?
9259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9260 (exit $ac_status); }; } &&
9261 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9263 (eval $ac_try) 2>&5
9264 ac_status=$?
9265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9266 (exit $ac_status); }; }; then
9267 ac_lo=0 ac_mid=0
9268 while :; do
9269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009270/* confdefs.h. */
9271_ACEOF
9272cat confdefs.h >>conftest.$ac_ext
9273cat >>conftest.$ac_ext <<_ACEOF
9274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009275$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009276int
9277main ()
9278{
9279static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9280test_array [0] = 0
9281
9282 ;
9283 return 0;
9284}
9285_ACEOF
9286rm -f conftest.$ac_objext
9287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009288 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009290 grep -v '^ *+' conftest.er1 >conftest.err
9291 rm -f conftest.er1
9292 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9294 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009295 { ac_try='test -z "$ac_c_werror_flag"
9296 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9298 (eval $ac_try) 2>&5
9299 ac_status=$?
9300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9301 (exit $ac_status); }; } &&
9302 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9304 (eval $ac_try) 2>&5
9305 ac_status=$?
9306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9307 (exit $ac_status); }; }; then
9308 ac_hi=$ac_mid; break
9309else
9310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009311sed 's/^/| /' conftest.$ac_ext >&5
9312
Martin v. Löwis11437992002-04-12 09:54:03 +00009313ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009314 if test $ac_lo -le $ac_mid; then
9315 ac_lo= ac_hi=
9316 break
9317 fi
9318 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009319fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009320rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009321 done
9322else
9323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009324sed 's/^/| /' conftest.$ac_ext >&5
9325
Martin v. Löwis11437992002-04-12 09:54:03 +00009326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* confdefs.h. */
9328_ACEOF
9329cat confdefs.h >>conftest.$ac_ext
9330cat >>conftest.$ac_ext <<_ACEOF
9331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009332$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009333int
9334main ()
9335{
9336static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9337test_array [0] = 0
9338
9339 ;
9340 return 0;
9341}
9342_ACEOF
9343rm -f conftest.$ac_objext
9344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009345 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009347 grep -v '^ *+' conftest.er1 >conftest.err
9348 rm -f conftest.er1
9349 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9351 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009352 { ac_try='test -z "$ac_c_werror_flag"
9353 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9355 (eval $ac_try) 2>&5
9356 ac_status=$?
9357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9358 (exit $ac_status); }; } &&
9359 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9361 (eval $ac_try) 2>&5
9362 ac_status=$?
9363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9364 (exit $ac_status); }; }; then
9365 ac_hi=-1 ac_mid=-1
9366 while :; do
9367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009368/* confdefs.h. */
9369_ACEOF
9370cat confdefs.h >>conftest.$ac_ext
9371cat >>conftest.$ac_ext <<_ACEOF
9372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009373$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009374int
9375main ()
9376{
9377static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9378test_array [0] = 0
9379
9380 ;
9381 return 0;
9382}
9383_ACEOF
9384rm -f conftest.$ac_objext
9385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009386 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009388 grep -v '^ *+' conftest.er1 >conftest.err
9389 rm -f conftest.er1
9390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9392 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009393 { ac_try='test -z "$ac_c_werror_flag"
9394 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9396 (eval $ac_try) 2>&5
9397 ac_status=$?
9398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399 (exit $ac_status); }; } &&
9400 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9402 (eval $ac_try) 2>&5
9403 ac_status=$?
9404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9405 (exit $ac_status); }; }; then
9406 ac_lo=$ac_mid; break
9407else
9408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009409sed 's/^/| /' conftest.$ac_ext >&5
9410
Martin v. Löwis11437992002-04-12 09:54:03 +00009411ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009412 if test $ac_mid -le $ac_hi; then
9413 ac_lo= ac_hi=
9414 break
9415 fi
9416 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009417fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009418rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 done
9420else
9421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009422sed 's/^/| /' conftest.$ac_ext >&5
9423
Martin v. Löwis11437992002-04-12 09:54:03 +00009424ac_lo= ac_hi=
9425fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009426rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009427fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009429# Binary search between lo and hi bounds.
9430while test "x$ac_lo" != "x$ac_hi"; do
9431 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009433/* confdefs.h. */
9434_ACEOF
9435cat confdefs.h >>conftest.$ac_ext
9436cat >>conftest.$ac_ext <<_ACEOF
9437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009439int
9440main ()
9441{
9442static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9443test_array [0] = 0
9444
9445 ;
9446 return 0;
9447}
9448_ACEOF
9449rm -f conftest.$ac_objext
9450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009451 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009453 grep -v '^ *+' conftest.er1 >conftest.err
9454 rm -f conftest.er1
9455 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9457 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009458 { ac_try='test -z "$ac_c_werror_flag"
9459 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9461 (eval $ac_try) 2>&5
9462 ac_status=$?
9463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9464 (exit $ac_status); }; } &&
9465 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9467 (eval $ac_try) 2>&5
9468 ac_status=$?
9469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9470 (exit $ac_status); }; }; then
9471 ac_hi=$ac_mid
9472else
9473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009474sed 's/^/| /' conftest.$ac_ext >&5
9475
Martin v. Löwis11437992002-04-12 09:54:03 +00009476ac_lo=`expr '(' $ac_mid ')' + 1`
9477fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009478rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009479done
9480case $ac_lo in
9481?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009482'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9483See \`config.log' for more details." >&5
9484echo "$as_me: error: cannot compute sizeof (long long), 77
9485See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 { (exit 1); exit 1; }; } ;;
9487esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009488else
9489 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009490 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9491See \`config.log' for more details." >&5
9492echo "$as_me: error: cannot run test program while cross compiling
9493See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009495else
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009497/* confdefs.h. */
9498_ACEOF
9499cat confdefs.h >>conftest.$ac_ext
9500cat >>conftest.$ac_ext <<_ACEOF
9501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502$ac_includes_default
9503long longval () { return (long) (sizeof (long long)); }
9504unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009505#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009506#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009507int
9508main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009509{
Martin v. Löwis11437992002-04-12 09:54:03 +00009510
9511 FILE *f = fopen ("conftest.val", "w");
9512 if (! f)
9513 exit (1);
9514 if (((long) (sizeof (long long))) < 0)
9515 {
9516 long i = longval ();
9517 if (i != ((long) (sizeof (long long))))
9518 exit (1);
9519 fprintf (f, "%ld\n", i);
9520 }
9521 else
9522 {
9523 unsigned long i = ulongval ();
9524 if (i != ((long) (sizeof (long long))))
9525 exit (1);
9526 fprintf (f, "%lu\n", i);
9527 }
9528 exit (ferror (f) || fclose (f) != 0);
9529
9530 ;
9531 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009532}
Martin v. Löwis11437992002-04-12 09:54:03 +00009533_ACEOF
9534rm -f conftest$ac_exeext
9535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9536 (eval $ac_link) 2>&5
9537 ac_status=$?
9538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9539 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9541 (eval $ac_try) 2>&5
9542 ac_status=$?
9543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9544 (exit $ac_status); }; }; then
9545 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009546else
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 echo "$as_me: program exited with status $ac_status" >&5
9548echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009549sed 's/^/| /' conftest.$ac_ext >&5
9550
Martin v. Löwis11437992002-04-12 09:54:03 +00009551( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009552{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9553See \`config.log' for more details." >&5
9554echo "$as_me: error: cannot compute sizeof (long long), 77
9555See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 { (exit 1); exit 1; }; }
9557fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009558rm -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 +00009559fi
9560fi
9561rm -f conftest.val
9562else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009563 ac_cv_sizeof_long_long=0
9564fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009565fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009566echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9567echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9568cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009569#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009570_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009571
Michael W. Hudson54241132001-12-07 15:38:26 +00009572
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009573fi
9574
Martin v. Löwis11437992002-04-12 09:54:03 +00009575echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9576echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009577have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009578cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009579/* confdefs.h. */
9580_ACEOF
9581cat confdefs.h >>conftest.$ac_ext
9582cat >>conftest.$ac_ext <<_ACEOF
9583/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009584
Martin v. Löwis11437992002-04-12 09:54:03 +00009585int
9586main ()
9587{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009588uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ;
9590 return 0;
9591}
9592_ACEOF
9593rm -f conftest.$ac_objext
9594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009595 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009597 grep -v '^ *+' conftest.er1 >conftest.err
9598 rm -f conftest.er1
9599 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9601 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009602 { ac_try='test -z "$ac_c_werror_flag"
9603 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9605 (eval $ac_try) 2>&5
9606 ac_status=$?
9607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9608 (exit $ac_status); }; } &&
9609 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9611 (eval $ac_try) 2>&5
9612 ac_status=$?
9613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9614 (exit $ac_status); }; }; then
9615
9616
9617cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009618#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009619_ACEOF
9620
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009621 have_uintptr_t=yes
9622
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009623else
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009625sed 's/^/| /' conftest.$ac_ext >&5
9626
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009627fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009628rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009629echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9630echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009631if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009632echo "$as_me:$LINENO: checking for uintptr_t" >&5
9633echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9634if test "${ac_cv_type_uintptr_t+set}" = set; then
9635 echo $ECHO_N "(cached) $ECHO_C" >&6
9636else
9637 cat >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{
9647if ((uintptr_t *) 0)
9648 return 0;
9649if (sizeof (uintptr_t))
9650 return 0;
9651 ;
9652 return 0;
9653}
9654_ACEOF
9655rm -f conftest.$ac_objext
9656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009657 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009659 grep -v '^ *+' conftest.er1 >conftest.err
9660 rm -f conftest.er1
9661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9663 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009664 { ac_try='test -z "$ac_c_werror_flag"
9665 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9667 (eval $ac_try) 2>&5
9668 ac_status=$?
9669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9670 (exit $ac_status); }; } &&
9671 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9673 (eval $ac_try) 2>&5
9674 ac_status=$?
9675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9676 (exit $ac_status); }; }; then
9677 ac_cv_type_uintptr_t=yes
9678else
9679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009680sed 's/^/| /' conftest.$ac_ext >&5
9681
Martin v. Löwis11437992002-04-12 09:54:03 +00009682ac_cv_type_uintptr_t=no
9683fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009684rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009685fi
9686echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9687echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9688
9689echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9690echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9691if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9692 echo $ECHO_N "(cached) $ECHO_C" >&6
9693else
9694 if test "$ac_cv_type_uintptr_t" = yes; then
9695 # The cast to unsigned long works around a bug in the HP C Compiler
9696 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9697 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9698 # This bug is HP SR number 8606223364.
9699 if test "$cross_compiling" = yes; then
9700 # Depending upon the size, compute the lo and hi bounds.
9701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* confdefs.h. */
9703_ACEOF
9704cat confdefs.h >>conftest.$ac_ext
9705cat >>conftest.$ac_ext <<_ACEOF
9706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009708int
9709main ()
9710{
9711static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9712test_array [0] = 0
9713
9714 ;
9715 return 0;
9716}
9717_ACEOF
9718rm -f conftest.$ac_objext
9719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009720 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009722 grep -v '^ *+' conftest.er1 >conftest.err
9723 rm -f conftest.er1
9724 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9726 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009727 { ac_try='test -z "$ac_c_werror_flag"
9728 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9730 (eval $ac_try) 2>&5
9731 ac_status=$?
9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733 (exit $ac_status); }; } &&
9734 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9736 (eval $ac_try) 2>&5
9737 ac_status=$?
9738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9739 (exit $ac_status); }; }; then
9740 ac_lo=0 ac_mid=0
9741 while :; do
9742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009743/* confdefs.h. */
9744_ACEOF
9745cat confdefs.h >>conftest.$ac_ext
9746cat >>conftest.$ac_ext <<_ACEOF
9747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009748$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009749int
9750main ()
9751{
9752static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9753test_array [0] = 0
9754
9755 ;
9756 return 0;
9757}
9758_ACEOF
9759rm -f conftest.$ac_objext
9760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009761 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009763 grep -v '^ *+' conftest.er1 >conftest.err
9764 rm -f conftest.er1
9765 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9767 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009768 { ac_try='test -z "$ac_c_werror_flag"
9769 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9771 (eval $ac_try) 2>&5
9772 ac_status=$?
9773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9774 (exit $ac_status); }; } &&
9775 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9777 (eval $ac_try) 2>&5
9778 ac_status=$?
9779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9780 (exit $ac_status); }; }; then
9781 ac_hi=$ac_mid; break
9782else
9783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009784sed 's/^/| /' conftest.$ac_ext >&5
9785
Martin v. Löwis11437992002-04-12 09:54:03 +00009786ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009787 if test $ac_lo -le $ac_mid; then
9788 ac_lo= ac_hi=
9789 break
9790 fi
9791 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009792fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009793rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 done
9795else
9796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009797sed 's/^/| /' conftest.$ac_ext >&5
9798
Martin v. Löwis11437992002-04-12 09:54:03 +00009799cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009800/* confdefs.h. */
9801_ACEOF
9802cat confdefs.h >>conftest.$ac_ext
9803cat >>conftest.$ac_ext <<_ACEOF
9804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009805$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009806int
9807main ()
9808{
9809static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9810test_array [0] = 0
9811
9812 ;
9813 return 0;
9814}
9815_ACEOF
9816rm -f conftest.$ac_objext
9817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009818 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009820 grep -v '^ *+' conftest.er1 >conftest.err
9821 rm -f conftest.er1
9822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9824 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009825 { ac_try='test -z "$ac_c_werror_flag"
9826 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9828 (eval $ac_try) 2>&5
9829 ac_status=$?
9830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9831 (exit $ac_status); }; } &&
9832 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9834 (eval $ac_try) 2>&5
9835 ac_status=$?
9836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9837 (exit $ac_status); }; }; then
9838 ac_hi=-1 ac_mid=-1
9839 while :; do
9840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* confdefs.h. */
9842_ACEOF
9843cat confdefs.h >>conftest.$ac_ext
9844cat >>conftest.$ac_ext <<_ACEOF
9845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009846$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009847int
9848main ()
9849{
9850static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9851test_array [0] = 0
9852
9853 ;
9854 return 0;
9855}
9856_ACEOF
9857rm -f conftest.$ac_objext
9858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009859 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009861 grep -v '^ *+' conftest.er1 >conftest.err
9862 rm -f conftest.er1
9863 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9865 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009866 { ac_try='test -z "$ac_c_werror_flag"
9867 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9869 (eval $ac_try) 2>&5
9870 ac_status=$?
9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872 (exit $ac_status); }; } &&
9873 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9875 (eval $ac_try) 2>&5
9876 ac_status=$?
9877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9878 (exit $ac_status); }; }; then
9879 ac_lo=$ac_mid; break
9880else
9881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009882sed 's/^/| /' conftest.$ac_ext >&5
9883
Martin v. Löwis11437992002-04-12 09:54:03 +00009884ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009885 if test $ac_mid -le $ac_hi; then
9886 ac_lo= ac_hi=
9887 break
9888 fi
9889 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009890fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009891rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 done
9893else
9894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009895sed 's/^/| /' conftest.$ac_ext >&5
9896
Martin v. Löwis11437992002-04-12 09:54:03 +00009897ac_lo= ac_hi=
9898fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009900fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009902# Binary search between lo and hi bounds.
9903while test "x$ac_lo" != "x$ac_hi"; do
9904 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009906/* confdefs.h. */
9907_ACEOF
9908cat confdefs.h >>conftest.$ac_ext
9909cat >>conftest.$ac_ext <<_ACEOF
9910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009911$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009912int
9913main ()
9914{
9915static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9916test_array [0] = 0
9917
9918 ;
9919 return 0;
9920}
9921_ACEOF
9922rm -f conftest.$ac_objext
9923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009924 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009926 grep -v '^ *+' conftest.er1 >conftest.err
9927 rm -f conftest.er1
9928 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9930 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009931 { ac_try='test -z "$ac_c_werror_flag"
9932 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9934 (eval $ac_try) 2>&5
9935 ac_status=$?
9936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9937 (exit $ac_status); }; } &&
9938 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9940 (eval $ac_try) 2>&5
9941 ac_status=$?
9942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9943 (exit $ac_status); }; }; then
9944 ac_hi=$ac_mid
9945else
9946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009947sed 's/^/| /' conftest.$ac_ext >&5
9948
Martin v. Löwis11437992002-04-12 09:54:03 +00009949ac_lo=`expr '(' $ac_mid ')' + 1`
9950fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009951rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009952done
9953case $ac_lo in
9954?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009955'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9956See \`config.log' for more details." >&5
9957echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9958See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009959 { (exit 1); exit 1; }; } ;;
9960esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009961else
9962 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009963 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9964See \`config.log' for more details." >&5
9965echo "$as_me: error: cannot run test program while cross compiling
9966See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009968else
Martin v. Löwis11437992002-04-12 09:54:03 +00009969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009970/* confdefs.h. */
9971_ACEOF
9972cat confdefs.h >>conftest.$ac_ext
9973cat >>conftest.$ac_ext <<_ACEOF
9974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009975$ac_includes_default
9976long longval () { return (long) (sizeof (uintptr_t)); }
9977unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009978#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009979#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009980int
9981main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009982{
Martin v. Löwis11437992002-04-12 09:54:03 +00009983
9984 FILE *f = fopen ("conftest.val", "w");
9985 if (! f)
9986 exit (1);
9987 if (((long) (sizeof (uintptr_t))) < 0)
9988 {
9989 long i = longval ();
9990 if (i != ((long) (sizeof (uintptr_t))))
9991 exit (1);
9992 fprintf (f, "%ld\n", i);
9993 }
9994 else
9995 {
9996 unsigned long i = ulongval ();
9997 if (i != ((long) (sizeof (uintptr_t))))
9998 exit (1);
9999 fprintf (f, "%lu\n", i);
10000 }
10001 exit (ferror (f) || fclose (f) != 0);
10002
10003 ;
10004 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010005}
Martin v. Löwis11437992002-04-12 09:54:03 +000010006_ACEOF
10007rm -f conftest$ac_exeext
10008if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10009 (eval $ac_link) 2>&5
10010 ac_status=$?
10011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10014 (eval $ac_try) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); }; }; then
10018 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010019else
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 echo "$as_me: program exited with status $ac_status" >&5
10021echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010022sed 's/^/| /' conftest.$ac_ext >&5
10023
Martin v. Löwis11437992002-04-12 09:54:03 +000010024( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000010025{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
10026See \`config.log' for more details." >&5
10027echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
10028See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 { (exit 1); exit 1; }; }
10030fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010031rm -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 +000010032fi
10033fi
10034rm -f conftest.val
10035else
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010036 ac_cv_sizeof_uintptr_t=0
10037fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010038fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010039echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
10040echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
10041cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010042#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010043_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010044
Michael W. Hudson54241132001-12-07 15:38:26 +000010045
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010046fi
10047
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010048# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010049echo "$as_me:$LINENO: checking size of off_t" >&5
10050echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
10051if test "${ac_cv_sizeof_off_t+set}" = set; then
10052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010053else
10054 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010055 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010056else
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010058/* confdefs.h. */
10059_ACEOF
10060cat confdefs.h >>conftest.$ac_ext
10061cat >>conftest.$ac_ext <<_ACEOF
10062/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010063#include <stdio.h>
10064#include <sys/types.h>
10065main()
10066{
10067 FILE *f=fopen("conftestval", "w");
10068 if (!f) exit(1);
10069 fprintf(f, "%d\n", sizeof(off_t));
10070 exit(0);
10071}
Martin v. Löwis11437992002-04-12 09:54:03 +000010072_ACEOF
10073rm -f conftest$ac_exeext
10074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10075 (eval $ac_link) 2>&5
10076 ac_status=$?
10077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10080 (eval $ac_try) 2>&5
10081 ac_status=$?
10082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10083 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010084 ac_cv_sizeof_off_t=`cat conftestval`
10085else
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 echo "$as_me: program exited with status $ac_status" >&5
10087echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010088sed 's/^/| /' conftest.$ac_ext >&5
10089
Martin v. Löwis11437992002-04-12 09:54:03 +000010090( exit $ac_status )
10091ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010092fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010093rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010094fi
10095
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010096fi
10097
Martin v. Löwis11437992002-04-12 09:54:03 +000010098echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
10099echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
10100
10101cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010102#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010103_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010104
Michael W. Hudson54241132001-12-07 15:38:26 +000010105
Martin v. Löwis11437992002-04-12 09:54:03 +000010106echo "$as_me:$LINENO: checking whether to enable large file support" >&5
10107echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010108if test "$have_long_long" = yes -a \
10109 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
10110 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010111
Martin v. Löwis11437992002-04-12 09:54:03 +000010112cat >>confdefs.h <<\_ACEOF
10113#define HAVE_LARGEFILE_SUPPORT 1
10114_ACEOF
10115
10116 echo "$as_me:$LINENO: result: yes" >&5
10117echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010118else
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 echo "$as_me:$LINENO: result: no" >&5
10120echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010121fi
10122
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010123# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010124echo "$as_me:$LINENO: checking size of time_t" >&5
10125echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
10126if test "${ac_cv_sizeof_time_t+set}" = set; then
10127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010128else
10129 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010130 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010131else
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010133/* confdefs.h. */
10134_ACEOF
10135cat confdefs.h >>conftest.$ac_ext
10136cat >>conftest.$ac_ext <<_ACEOF
10137/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010138#include <stdio.h>
10139#include <time.h>
10140main()
10141{
10142 FILE *f=fopen("conftestval", "w");
10143 if (!f) exit(1);
10144 fprintf(f, "%d\n", sizeof(time_t));
10145 exit(0);
10146}
Martin v. Löwis11437992002-04-12 09:54:03 +000010147_ACEOF
10148rm -f conftest$ac_exeext
10149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10150 (eval $ac_link) 2>&5
10151 ac_status=$?
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10155 (eval $ac_try) 2>&5
10156 ac_status=$?
10157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10158 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010159 ac_cv_sizeof_time_t=`cat conftestval`
10160else
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 echo "$as_me: program exited with status $ac_status" >&5
10162echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010163sed 's/^/| /' conftest.$ac_ext >&5
10164
Martin v. Löwis11437992002-04-12 09:54:03 +000010165( exit $ac_status )
10166ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010167fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010168rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010169fi
10170
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010171fi
10172
Martin v. Löwis11437992002-04-12 09:54:03 +000010173echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10174echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10175
10176cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010177#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010178_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010179
Michael W. Hudson54241132001-12-07 15:38:26 +000010180
10181
Trent Mick635f6fb2000-08-23 21:33:05 +000010182# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010183ac_save_cc="$CC"
10184if test "$ac_cv_kpthread" = "yes"
10185then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010186elif test "$ac_cv_kthread" = "yes"
10187then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010188elif test "$ac_cv_pthread" = "yes"
10189then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010191echo "$as_me:$LINENO: checking for pthread_t" >&5
10192echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010193have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010195/* confdefs.h. */
10196_ACEOF
10197cat confdefs.h >>conftest.$ac_ext
10198cat >>conftest.$ac_ext <<_ACEOF
10199/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010200#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010201int
10202main ()
10203{
Guido van Rossum12580492000-09-24 16:47:19 +000010204pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 ;
10206 return 0;
10207}
10208_ACEOF
10209rm -f conftest.$ac_objext
10210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010211 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010213 grep -v '^ *+' conftest.er1 >conftest.err
10214 rm -f conftest.er1
10215 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10217 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010218 { ac_try='test -z "$ac_c_werror_flag"
10219 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10221 (eval $ac_try) 2>&5
10222 ac_status=$?
10223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10224 (exit $ac_status); }; } &&
10225 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10227 (eval $ac_try) 2>&5
10228 ac_status=$?
10229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10230 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010231 have_pthread_t=yes
10232else
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010234sed 's/^/| /' conftest.$ac_ext >&5
10235
Trent Mick635f6fb2000-08-23 21:33:05 +000010236fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010237rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010238echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10239echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010240if test "$have_pthread_t" = yes ; then
10241 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10243echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10244 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10245 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010246else
10247 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010248 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010249else
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010251/* confdefs.h. */
10252_ACEOF
10253cat confdefs.h >>conftest.$ac_ext
10254cat >>conftest.$ac_ext <<_ACEOF
10255/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010256#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010257#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010258 main()
10259 {
10260 FILE *f=fopen("conftestval", "w");
10261 if (!f) exit(1);
10262 fprintf(f, "%d\n", sizeof(pthread_t));
10263 exit(0);
10264 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010265_ACEOF
10266rm -f conftest$ac_exeext
10267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10268 (eval $ac_link) 2>&5
10269 ac_status=$?
10270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10271 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10273 (eval $ac_try) 2>&5
10274 ac_status=$?
10275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10276 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010277 ac_cv_sizeof_pthread_t=`cat conftestval`
10278else
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 echo "$as_me: program exited with status $ac_status" >&5
10280echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010281sed 's/^/| /' conftest.$ac_ext >&5
10282
Martin v. Löwis11437992002-04-12 09:54:03 +000010283( exit $ac_status )
10284ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010285fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010286rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010287fi
10288
Trent Mick635f6fb2000-08-23 21:33:05 +000010289fi
10290
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10292echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10293
10294cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010295#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010296_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010297
10298fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010299CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010300
Martin v. Löwis11437992002-04-12 09:54:03 +000010301echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10302echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010303# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10304if test "${enable_toolbox_glue+set}" = set; then
10305 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010306
Martin v. Löwis11437992002-04-12 09:54:03 +000010307fi;
Jack Jansene578a632001-08-15 01:27:14 +000010308
10309if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010310then
Jack Jansene578a632001-08-15 01:27:14 +000010311 case $ac_sys_system/$ac_sys_release in
10312 Darwin/*)
10313 enable_toolbox_glue="yes";;
10314 *)
10315 enable_toolbox_glue="no";;
10316 esac
10317fi
10318case "$enable_toolbox_glue" in
10319yes)
Jack Jansene578a632001-08-15 01:27:14 +000010320 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010321 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010322
10323cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010324#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010325_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010326
10327 ;;
10328*)
Jack Jansene578a632001-08-15 01:27:14 +000010329 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010330 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010331 ;;
10332esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010333echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10334echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010335
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010336
10337case $ac_sys_system/$ac_sys_release in
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010338 Darwin/[01234567].*)
10339 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10340 ;;
10341 Darwin/*)
10342 OTHER_LIBTOOL_OPT=""
10343 ;;
10344esac
10345
10346
10347case $ac_sys_system/$ac_sys_release in
10348 Darwin/[01234567].*)
10349 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only ppc"
Jack Jansenb36687a2004-07-16 08:43:47 +000010350 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010351 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010352 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010353 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10354 if test ${gcc_version} '<' 4.0
10355 then
10356 LIBTOOL_CRUFT="-lcc_dynamic"
10357 else
10358 LIBTOOL_CRUFT=""
10359 fi
10360 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
Jack Jansenb36687a2004-07-16 08:43:47 +000010361 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010362 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010363esac
10364
Martin v. Löwis11437992002-04-12 09:54:03 +000010365echo "$as_me:$LINENO: checking for --enable-framework" >&5
10366echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010367if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010368then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010369 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010371 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010372
Martin v. Löwis11437992002-04-12 09:54:03 +000010373cat >>confdefs.h <<\_ACEOF
10374#define WITH_NEXT_FRAMEWORK 1
10375_ACEOF
10376
10377 echo "$as_me:$LINENO: result: yes" >&5
10378echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010379else
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 echo "$as_me:$LINENO: result: no" >&5
10381echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010382fi
10383
Martin v. Löwis11437992002-04-12 09:54:03 +000010384echo "$as_me:$LINENO: checking for dyld" >&5
10385echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010386case $ac_sys_system/$ac_sys_release in
10387 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010388
Martin v. Löwis11437992002-04-12 09:54:03 +000010389cat >>confdefs.h <<\_ACEOF
10390#define WITH_DYLD 1
10391_ACEOF
10392
10393 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10394echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010395 ;;
10396 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 echo "$as_me:$LINENO: result: no" >&5
10398echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010399 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010400esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010401
Guido van Rossum0a516c91994-09-12 10:58:40 +000010402# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010403
Michael W. Hudson54241132001-12-07 15:38:26 +000010404
10405
10406
10407
Guido van Rossum0a516c91994-09-12 10:58:40 +000010408# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010409# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010410echo "$as_me:$LINENO: checking SO" >&5
10411echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010412if test -z "$SO"
10413then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010414 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010415 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010416 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010417 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010418 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010419else
10420 # this might also be a termcap variable, see #610332
10421 echo
10422 echo '====================================================================='
10423 echo '+ +'
10424 echo '+ WARNING: You have set SO in your environment. +'
10425 echo '+ Do you really mean to change the extension for shared libraries? +'
10426 echo '+ Continuing in 10 seconds to let you to ponder. +'
10427 echo '+ +'
10428 echo '====================================================================='
10429 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010431echo "$as_me:$LINENO: result: $SO" >&5
10432echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010433# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010434# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010435# (Shared libraries in this instance are shared modules to be loaded into
10436# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010437echo "$as_me:$LINENO: checking LDSHARED" >&5
10438echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010439if test -z "$LDSHARED"
10440then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010441 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010442 AIX*)
10443 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010444 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010445 ;;
10446 BeOS*)
10447 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010448 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010449 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010450 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010451 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010453 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010454 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010455 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010456 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010457 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010458 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010459 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010460 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10461 if test "$enable_framework" ; then
10462 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010463 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10464 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010465 else
10466 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010467 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010468 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010469 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010470 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10471 if test "$enable_framework" ; then
10472 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010473 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10474 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010475 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010476 # No framework, use the Python app as bundle-loader
10477 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010478 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010479 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010480 Darwin/*)
10481 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10482 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010483 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010484 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010485 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010486 then
10487 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10488 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010489 else
10490 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10491 if test "$enable_framework" ; then
10492 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010493 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10494 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010495 else
10496 # No framework, use the Python app as bundle-loader
10497 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10498 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10499 fi
10500 fi
10501 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010502 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010503 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010504 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010505 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010506 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010507 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010508 else
10509 LDSHARED="ld -Bshareable ${LDFLAGS}"
10510 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010511 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010512 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010513 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010514 then LDSHARED='$(CC) -shared'
10515 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010516 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010517 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010518 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010519 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010520 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010521 *) LDSHARED="ld";;
10522 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010524echo "$as_me:$LINENO: result: $LDSHARED" >&5
10525echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010526BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010527# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010528# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010529echo "$as_me:$LINENO: checking CCSHARED" >&5
10530echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010531if test -z "$CCSHARED"
10532then
Guido van Rossum07397971997-04-29 21:49:50 +000010533 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010534 SunOS*) if test "$GCC" = yes;
10535 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000010536 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010537 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010538 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010539 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010540 else CCSHARED="+z";
10541 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010542 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010543 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010544 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010545 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010546 if test "$GCC" = "yes"
10547 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010548 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010549 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010550 SCO_SV*)
10551 if test "$GCC" = "yes"
10552 then CCSHARED="-fPIC"
10553 else CCSHARED="-Kpic -belf"
10554 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010555 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010556 IRIX*/6*) case $CC in
10557 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010558 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010559 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010560 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010561 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010563echo "$as_me:$LINENO: result: $CCSHARED" >&5
10564echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010565# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010566# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010567echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10568echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010569if test -z "$LINKFORSHARED"
10570then
Guido van Rossum07397971997-04-29 21:49:50 +000010571 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010572 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010573 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010574 LINKFORSHARED="-Wl,-E -Wl,+s";;
10575# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010576 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010577 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010578 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010580 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
10581 # which is
Jack Jansene578a632001-08-15 01:27:14 +000010582 # not used by the core itself but which needs to be in the core so
10583 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010584 # -prebind is no longer used, because it actually seems to give a
10585 # slowdown in stead of a speedup, maybe due to the large number of
10586 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010587
10588 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000010589 if test "$enable_framework"
10590 then
Jack Jansenda49e192005-01-07 13:08:22 +000010591 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010592 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010593 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010594 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010595 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010596 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010597 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010598 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10599 then
10600 LINKFORSHARED="-Wl,--export-dynamic"
10601 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010602 SunOS/5*) case $CC in
10603 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010604 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010605 then
10606 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010607 fi;;
10608 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010609 CYGWIN*)
10610 if test $enable_shared = "no"
10611 then
10612 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10613 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010614 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010615fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010616echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10617echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010618
Michael W. Hudson54241132001-12-07 15:38:26 +000010619
Martin v. Löwis11437992002-04-12 09:54:03 +000010620echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10621echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010622if test ! "$LIBRARY" = "$LDLIBRARY"
10623then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010624 case $ac_sys_system in
10625 CYGWIN*)
10626 # Cygwin needs CCSHARED when building extension DLLs
10627 # but not when building the interpreter DLL.
10628 CFLAGSFORSHARED='';;
10629 *)
10630 CFLAGSFORSHARED='$(CCSHARED)'
10631 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010633echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10634echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010635
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010636# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10637# library (with --enable-shared).
10638# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010639# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10640# if it is not required, since it creates a dependency of the shared library
10641# to LIBS. This, in turn, means that applications linking the shared libpython
10642# don't need to link LIBS explicitly. The default should be only changed
10643# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010644
10645echo "$as_me:$LINENO: checking SHLIBS" >&5
10646echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10647case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010648 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010649 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010650esac
10651echo "$as_me:$LINENO: result: $SHLIBS" >&5
10652echo "${ECHO_T}$SHLIBS" >&6
10653
10654
Guido van Rossum627b2d71993-12-24 10:39:16 +000010655# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
10657echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10658echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10659if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10660 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010661else
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010663LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* confdefs.h. */
10666_ACEOF
10667cat confdefs.h >>conftest.$ac_ext
10668cat >>conftest.$ac_ext <<_ACEOF
10669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010670
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010671/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010672#ifdef __cplusplus
10673extern "C"
10674#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010675/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010676 builtin and then its argument prototype would still apply. */
10677char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010678int
10679main ()
10680{
10681dlopen ();
10682 ;
10683 return 0;
10684}
10685_ACEOF
10686rm -f conftest.$ac_objext conftest$ac_exeext
10687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010688 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010690 grep -v '^ *+' conftest.er1 >conftest.err
10691 rm -f conftest.er1
10692 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010695 { ac_try='test -z "$ac_c_werror_flag"
10696 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10698 (eval $ac_try) 2>&5
10699 ac_status=$?
10700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10701 (exit $ac_status); }; } &&
10702 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10704 (eval $ac_try) 2>&5
10705 ac_status=$?
10706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10707 (exit $ac_status); }; }; then
10708 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010709else
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010711sed 's/^/| /' conftest.$ac_ext >&5
10712
Martin v. Löwis11437992002-04-12 09:54:03 +000010713ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010714fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010715rm -f conftest.err conftest.$ac_objext \
10716 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010717LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010719echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10720echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10721if test $ac_cv_lib_dl_dlopen = yes; then
10722 cat >>confdefs.h <<_ACEOF
10723#define HAVE_LIBDL 1
10724_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010725
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010726 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010728fi
10729 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010730
10731echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10732echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10733if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735else
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010737LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010739/* confdefs.h. */
10740_ACEOF
10741cat confdefs.h >>conftest.$ac_ext
10742cat >>conftest.$ac_ext <<_ACEOF
10743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010744
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010745/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010746#ifdef __cplusplus
10747extern "C"
10748#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010749/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010750 builtin and then its argument prototype would still apply. */
10751char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010752int
10753main ()
10754{
10755shl_load ();
10756 ;
10757 return 0;
10758}
10759_ACEOF
10760rm -f conftest.$ac_objext conftest$ac_exeext
10761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010762 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010764 grep -v '^ *+' conftest.er1 >conftest.err
10765 rm -f conftest.er1
10766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10768 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010769 { ac_try='test -z "$ac_c_werror_flag"
10770 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10772 (eval $ac_try) 2>&5
10773 ac_status=$?
10774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10775 (exit $ac_status); }; } &&
10776 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10778 (eval $ac_try) 2>&5
10779 ac_status=$?
10780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10781 (exit $ac_status); }; }; then
10782 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010783else
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010785sed 's/^/| /' conftest.$ac_ext >&5
10786
Martin v. Löwis11437992002-04-12 09:54:03 +000010787ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010788fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010789rm -f conftest.err conftest.$ac_objext \
10790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010791LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010793echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10794echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10795if test $ac_cv_lib_dld_shl_load = yes; then
10796 cat >>confdefs.h <<_ACEOF
10797#define HAVE_LIBDLD 1
10798_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010799
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010800 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010801
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010802fi
10803 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010804
10805# only check for sem_ini if thread support is requested
10806if test "$with_threads" = "yes" -o -z "$with_threads"; then
10807 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010808echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10809if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010811else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010812 ac_func_search_save_LIBS=$LIBS
10813ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010814cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010815/* confdefs.h. */
10816_ACEOF
10817cat confdefs.h >>conftest.$ac_ext
10818cat >>conftest.$ac_ext <<_ACEOF
10819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010820
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010821/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010822#ifdef __cplusplus
10823extern "C"
10824#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010825/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010826 builtin and then its argument prototype would still apply. */
10827char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010828int
10829main ()
10830{
10831sem_init ();
10832 ;
10833 return 0;
10834}
10835_ACEOF
10836rm -f conftest.$ac_objext conftest$ac_exeext
10837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010838 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010840 grep -v '^ *+' conftest.er1 >conftest.err
10841 rm -f conftest.er1
10842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10844 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010845 { ac_try='test -z "$ac_c_werror_flag"
10846 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10848 (eval $ac_try) 2>&5
10849 ac_status=$?
10850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10851 (exit $ac_status); }; } &&
10852 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10854 (eval $ac_try) 2>&5
10855 ac_status=$?
10856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10857 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010858 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010859else
Martin v. Löwis11437992002-04-12 09:54:03 +000010860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010861sed 's/^/| /' conftest.$ac_ext >&5
10862
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010863fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010864rm -f conftest.err conftest.$ac_objext \
10865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010866if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010867 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010868 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010870/* confdefs.h. */
10871_ACEOF
10872cat confdefs.h >>conftest.$ac_ext
10873cat >>conftest.$ac_ext <<_ACEOF
10874/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010875
10876/* Override any gcc2 internal prototype to avoid an error. */
10877#ifdef __cplusplus
10878extern "C"
10879#endif
10880/* We use char because int might match the return type of a gcc2
10881 builtin and then its argument prototype would still apply. */
10882char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010883int
10884main ()
10885{
10886sem_init ();
10887 ;
10888 return 0;
10889}
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010891rm -f conftest.$ac_objext conftest$ac_exeext
10892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010893 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010895 grep -v '^ *+' conftest.er1 >conftest.err
10896 rm -f conftest.er1
10897 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10899 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010900 { ac_try='test -z "$ac_c_werror_flag"
10901 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10903 (eval $ac_try) 2>&5
10904 ac_status=$?
10905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10906 (exit $ac_status); }; } &&
10907 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10909 (eval $ac_try) 2>&5
10910 ac_status=$?
10911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10912 (exit $ac_status); }; }; then
10913 ac_cv_search_sem_init="-l$ac_lib"
10914break
10915else
10916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010917sed 's/^/| /' conftest.$ac_ext >&5
10918
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010919fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010920rm -f conftest.err conftest.$ac_objext \
10921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010922 done
10923fi
10924LIBS=$ac_func_search_save_LIBS
10925fi
10926echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10927echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10928if test "$ac_cv_search_sem_init" != no; then
10929 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010930
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010931fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010932 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010933 # posix4 on Solaris 2.6
10934 # pthread (first!) on Linux
10935fi
10936
Martin v. Löwis19d17342003-06-14 21:03:05 +000010937# check if we need libintl for locale functions
10938echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10939echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10940if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10941 echo $ECHO_N "(cached) $ECHO_C" >&6
10942else
10943 ac_check_lib_save_LIBS=$LIBS
10944LIBS="-lintl $LIBS"
10945cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* confdefs.h. */
10947_ACEOF
10948cat confdefs.h >>conftest.$ac_ext
10949cat >>conftest.$ac_ext <<_ACEOF
10950/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010951
10952/* Override any gcc2 internal prototype to avoid an error. */
10953#ifdef __cplusplus
10954extern "C"
10955#endif
10956/* We use char because int might match the return type of a gcc2
10957 builtin and then its argument prototype would still apply. */
10958char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010959int
10960main ()
10961{
10962textdomain ();
10963 ;
10964 return 0;
10965}
10966_ACEOF
10967rm -f conftest.$ac_objext conftest$ac_exeext
10968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010969 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000010970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010971 grep -v '^ *+' conftest.er1 >conftest.err
10972 rm -f conftest.er1
10973 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010976 { ac_try='test -z "$ac_c_werror_flag"
10977 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10979 (eval $ac_try) 2>&5
10980 ac_status=$?
10981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10982 (exit $ac_status); }; } &&
10983 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000010984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10985 (eval $ac_try) 2>&5
10986 ac_status=$?
10987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10988 (exit $ac_status); }; }; then
10989 ac_cv_lib_intl_textdomain=yes
10990else
10991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010992sed 's/^/| /' conftest.$ac_ext >&5
10993
Martin v. Löwis19d17342003-06-14 21:03:05 +000010994ac_cv_lib_intl_textdomain=no
10995fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010996rm -f conftest.err conftest.$ac_objext \
10997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010998LIBS=$ac_check_lib_save_LIBS
10999fi
11000echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
11001echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
11002if test $ac_cv_lib_intl_textdomain = yes; then
11003
11004cat >>confdefs.h <<\_ACEOF
11005#define WITH_LIBINTL 1
11006_ACEOF
11007
11008fi
11009
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011010
11011# checks for system dependent C++ extensions support
11012case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
11014echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
11015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011016/* confdefs.h. */
11017_ACEOF
11018cat confdefs.h >>conftest.$ac_ext
11019cat >>conftest.$ac_ext <<_ACEOF
11020/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011021#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011022int
11023main ()
11024{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011025loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000011026 ;
11027 return 0;
11028}
11029_ACEOF
11030rm -f conftest.$ac_objext conftest$ac_exeext
11031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011032 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011034 grep -v '^ *+' conftest.er1 >conftest.err
11035 rm -f conftest.er1
11036 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011039 { ac_try='test -z "$ac_c_werror_flag"
11040 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11042 (eval $ac_try) 2>&5
11043 ac_status=$?
11044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11045 (exit $ac_status); }; } &&
11046 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11048 (eval $ac_try) 2>&5
11049 ac_status=$?
11050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11051 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011052
Martin v. Löwis11437992002-04-12 09:54:03 +000011053cat >>confdefs.h <<\_ACEOF
11054#define AIX_GENUINE_CPLUSPLUS 1
11055_ACEOF
11056
11057 echo "$as_me:$LINENO: result: yes" >&5
11058echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011059else
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011061sed 's/^/| /' conftest.$ac_ext >&5
11062
Martin v. Löwis11437992002-04-12 09:54:03 +000011063echo "$as_me:$LINENO: result: no" >&5
11064echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011065fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011066rm -f conftest.err conftest.$ac_objext \
11067 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011068 *) ;;
11069esac
11070
Guido van Rossum70c7f481998-03-26 18:44:10 +000011071# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011072# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000011073echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
11074echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
11075if test "${ac_cv_lib_nsl_t_open+set}" = set; then
11076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011077else
Martin v. Löwis11437992002-04-12 09:54:03 +000011078 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011079LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011081/* confdefs.h. */
11082_ACEOF
11083cat confdefs.h >>conftest.$ac_ext
11084cat >>conftest.$ac_ext <<_ACEOF
11085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011087/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011088#ifdef __cplusplus
11089extern "C"
11090#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011091/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 builtin and then its argument prototype would still apply. */
11093char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011094int
11095main ()
11096{
11097t_open ();
11098 ;
11099 return 0;
11100}
11101_ACEOF
11102rm -f conftest.$ac_objext conftest$ac_exeext
11103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011104 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011106 grep -v '^ *+' conftest.er1 >conftest.err
11107 rm -f conftest.er1
11108 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11110 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011111 { ac_try='test -z "$ac_c_werror_flag"
11112 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11114 (eval $ac_try) 2>&5
11115 ac_status=$?
11116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11117 (exit $ac_status); }; } &&
11118 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11120 (eval $ac_try) 2>&5
11121 ac_status=$?
11122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11123 (exit $ac_status); }; }; then
11124 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011125else
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011127sed 's/^/| /' conftest.$ac_ext >&5
11128
Martin v. Löwis11437992002-04-12 09:54:03 +000011129ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011130fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011131rm -f conftest.err conftest.$ac_objext \
11132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011133LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011135echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11136echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11137if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011138 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011139fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011140 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011141echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11142echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11143if test "${ac_cv_lib_socket_socket+set}" = set; then
11144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011145else
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011147LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011149/* confdefs.h. */
11150_ACEOF
11151cat confdefs.h >>conftest.$ac_ext
11152cat >>conftest.$ac_ext <<_ACEOF
11153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011154
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011155/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011156#ifdef __cplusplus
11157extern "C"
11158#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011159/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 builtin and then its argument prototype would still apply. */
11161char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011162int
11163main ()
11164{
11165socket ();
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170rm -f conftest.$ac_objext conftest$ac_exeext
11171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011172 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011174 grep -v '^ *+' conftest.er1 >conftest.err
11175 rm -f conftest.er1
11176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11178 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011179 { ac_try='test -z "$ac_c_werror_flag"
11180 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11182 (eval $ac_try) 2>&5
11183 ac_status=$?
11184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185 (exit $ac_status); }; } &&
11186 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11188 (eval $ac_try) 2>&5
11189 ac_status=$?
11190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191 (exit $ac_status); }; }; then
11192 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011193else
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011195sed 's/^/| /' conftest.$ac_ext >&5
11196
Martin v. Löwis11437992002-04-12 09:54:03 +000011197ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011198fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011199rm -f conftest.err conftest.$ac_objext \
11200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011201LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011202fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011203echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11204echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11205if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011206 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011207fi
11208 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011209
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011210case "$ac_sys_system" in
11211BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011212echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11213echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11214if test "${ac_cv_lib_net_socket+set}" = set; then
11215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011216else
Martin v. Löwis11437992002-04-12 09:54:03 +000011217 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011218LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011219cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* confdefs.h. */
11221_ACEOF
11222cat confdefs.h >>conftest.$ac_ext
11223cat >>conftest.$ac_ext <<_ACEOF
11224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011225
Guido van Rossumad678af1998-10-02 14:42:15 +000011226/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011227#ifdef __cplusplus
11228extern "C"
11229#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011230/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 builtin and then its argument prototype would still apply. */
11232char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011233int
11234main ()
11235{
11236socket ();
11237 ;
11238 return 0;
11239}
11240_ACEOF
11241rm -f conftest.$ac_objext conftest$ac_exeext
11242if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011243 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011245 grep -v '^ *+' conftest.er1 >conftest.err
11246 rm -f conftest.er1
11247 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11249 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011250 { ac_try='test -z "$ac_c_werror_flag"
11251 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11253 (eval $ac_try) 2>&5
11254 ac_status=$?
11255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11256 (exit $ac_status); }; } &&
11257 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11259 (eval $ac_try) 2>&5
11260 ac_status=$?
11261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11262 (exit $ac_status); }; }; then
11263 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011264else
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011266sed 's/^/| /' conftest.$ac_ext >&5
11267
Martin v. Löwis11437992002-04-12 09:54:03 +000011268ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011269fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011270rm -f conftest.err conftest.$ac_objext \
11271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011272LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011274echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11275echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11276if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011277 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011278fi
11279 # BeOS
11280;;
11281esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011282
Martin v. Löwis11437992002-04-12 09:54:03 +000011283echo "$as_me:$LINENO: checking for --with-libs" >&5
11284echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11285
Guido van Rossuma68acba1996-07-31 17:36:39 +000011286# Check whether --with-libs or --without-libs was given.
11287if test "${with_libs+set}" = set; then
11288 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011289
11290echo "$as_me:$LINENO: result: $withval" >&5
11291echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011292LIBS="$withval $LIBS"
11293
11294else
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 echo "$as_me:$LINENO: result: no" >&5
11296echo "${ECHO_T}no" >&6
11297fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011298
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011299# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011300
11301
Martin v. Löwis11437992002-04-12 09:54:03 +000011302echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11303echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11304
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011305# Check whether --with-signal-module or --without-signal-module was given.
11306if test "${with_signal_module+set}" = set; then
11307 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011310
11311if test -z "$with_signal_module"
11312then with_signal_module="yes"
11313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011314echo "$as_me:$LINENO: result: $with_signal_module" >&5
11315echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011316
11317if test "${with_signal_module}" = "yes"; then
11318 USE_SIGNAL_MODULE=""
11319 SIGNAL_OBJS=""
11320else
11321 USE_SIGNAL_MODULE="#"
11322 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11323fi
11324
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011325# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011326
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011327USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011328
Martin v. Löwis11437992002-04-12 09:54:03 +000011329echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11330echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11331
Guido van Rossumec2f0731997-01-22 20:54:01 +000011332
11333# Check whether --with-dec-threads or --without-dec-threads was given.
11334if test "${with_dec_threads+set}" = set; then
11335 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011336
11337echo "$as_me:$LINENO: result: $withval" >&5
11338echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011339LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011340if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011341 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011342fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011343else
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 echo "$as_me:$LINENO: result: no" >&5
11345echo "${ECHO_T}no" >&6
11346fi;
11347
11348# Templates for things AC_DEFINEd more than once.
11349# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011350
11351
Martin v. Löwis11437992002-04-12 09:54:03 +000011352
11353
11354
11355
11356
11357echo "$as_me:$LINENO: checking for --with-threads" >&5
11358echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11359
Guido van Rossumec2f0731997-01-22 20:54:01 +000011360# Check whether --with-threads or --without-threads was given.
11361if test "${with_threads+set}" = set; then
11362 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011363
Martin v. Löwis11437992002-04-12 09:54:03 +000011364fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011365
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011366# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011367
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011369if test "${with_thread+set}" = set; then
11370 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011371 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011372fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011373
11374if test -z "$with_threads"
11375then with_threads="yes"
11376fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011377echo "$as_me:$LINENO: result: $with_threads" >&5
11378echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011379
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011380
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011381if test "$with_threads" = "no"
11382then
11383 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011384elif test "$ac_cv_pthread_is_default" = yes
11385then
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011387#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011388_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011389
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011390 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011392#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011393_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011394
11395 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011397elif test "$ac_cv_kpthread" = "yes"
11398then
11399 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011400 if test "$ac_cv_cxx_thread" = "yes"; then
11401 CXX="$CXX -Kpthread"
11402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011404#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011405_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011407 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011408 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011409elif test "$ac_cv_kthread" = "yes"
11410then
11411 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011412 if test "$ac_cv_cxx_thread" = "yes"; then
11413 CXX="$CXX -Kthread"
11414 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011415 cat >>confdefs.h <<\_ACEOF
11416#define WITH_THREAD 1
11417_ACEOF
11418
11419 posix_threads=yes
11420 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011421elif test "$ac_cv_pthread" = "yes"
11422then
11423 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011424 if test "$ac_cv_cxx_thread" = "yes"; then
11425 CXX="$CXX -pthread"
11426 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011427 cat >>confdefs.h <<\_ACEOF
11428#define WITH_THREAD 1
11429_ACEOF
11430
11431 posix_threads=yes
11432 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011433else
11434 if test ! -z "$with_threads" -a -d "$with_threads"
11435 then LDFLAGS="$LDFLAGS -L$with_threads"
11436 fi
11437 if test ! -z "$withval" -a -d "$withval"
11438 then LDFLAGS="$LDFLAGS -L$withval"
11439 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011440
11441 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011442 # define _POSIX_THREADS in unistd.h. Some apparently don't
11443 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11445echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011447/* confdefs.h. */
11448_ACEOF
11449cat confdefs.h >>conftest.$ac_ext
11450cat >>conftest.$ac_ext <<_ACEOF
11451/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011452
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011453#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011454#ifdef _POSIX_THREADS
11455yes
11456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011457
11458_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011460 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011461 unistd_defines_pthreads=yes
11462else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011463 unistd_defines_pthreads=no
11464fi
11465rm -f conftest*
11466
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11468echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011469
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011471#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011472_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011473
Martin v. Löwis11437992002-04-12 09:54:03 +000011474 if test "${ac_cv_header_cthreads_h+set}" = set; then
11475 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11476echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11477if test "${ac_cv_header_cthreads_h+set}" = set; then
11478 echo $ECHO_N "(cached) $ECHO_C" >&6
11479fi
11480echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11481echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011482else
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 # Is the header compilable?
11484echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11485echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11486cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011487/* confdefs.h. */
11488_ACEOF
11489cat confdefs.h >>conftest.$ac_ext
11490cat >>conftest.$ac_ext <<_ACEOF
11491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011492$ac_includes_default
11493#include <cthreads.h>
11494_ACEOF
11495rm -f conftest.$ac_objext
11496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011497 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011499 grep -v '^ *+' conftest.er1 >conftest.err
11500 rm -f conftest.er1
11501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11503 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011504 { ac_try='test -z "$ac_c_werror_flag"
11505 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11507 (eval $ac_try) 2>&5
11508 ac_status=$?
11509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11510 (exit $ac_status); }; } &&
11511 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11513 (eval $ac_try) 2>&5
11514 ac_status=$?
11515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11516 (exit $ac_status); }; }; then
11517 ac_header_compiler=yes
11518else
11519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011520sed 's/^/| /' conftest.$ac_ext >&5
11521
Martin v. Löwis11437992002-04-12 09:54:03 +000011522ac_header_compiler=no
11523fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011524rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011525echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11526echo "${ECHO_T}$ac_header_compiler" >&6
11527
11528# Is the header present?
11529echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11530echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11531cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011532/* confdefs.h. */
11533_ACEOF
11534cat confdefs.h >>conftest.$ac_ext
11535cat >>conftest.$ac_ext <<_ACEOF
11536/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011537#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011538_ACEOF
11539if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11540 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11541 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011542 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 rm -f conftest.er1
11544 cat conftest.err >&5
11545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11546 (exit $ac_status); } >/dev/null; then
11547 if test -s conftest.err; then
11548 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011549 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 else
11551 ac_cpp_err=
11552 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011553else
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 ac_cpp_err=yes
11555fi
11556if test -z "$ac_cpp_err"; then
11557 ac_header_preproc=yes
11558else
11559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011560sed 's/^/| /' conftest.$ac_ext >&5
11561
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011564rm -f conftest.err conftest.$ac_ext
11565echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11566echo "${ECHO_T}$ac_header_preproc" >&6
11567
11568# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011569case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11570 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11572echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011573 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11574echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11575 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011576 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011577 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011578 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11579echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011580 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11581echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11582 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11583echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11584 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11585echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011586 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11587echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011588 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11589echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011590 (
11591 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011592## ------------------------------------------------ ##
11593## Report this to http://www.python.org/python-bugs ##
11594## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011595_ASBOX
11596 ) |
11597 sed "s/^/$as_me: WARNING: /" >&2
11598 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011599esac
11600echo "$as_me:$LINENO: checking for cthreads.h" >&5
11601echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11602if test "${ac_cv_header_cthreads_h+set}" = set; then
11603 echo $ECHO_N "(cached) $ECHO_C" >&6
11604else
11605 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011607echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11608echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11609
11610fi
11611if test $ac_cv_header_cthreads_h = yes; then
11612 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011613#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011614_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011615
Martin v. Löwis11437992002-04-12 09:54:03 +000011616 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011617#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011618_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011619
Martin v. Löwis11437992002-04-12 09:54:03 +000011620
11621cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011622#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011623_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011624
11625 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011626 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011627else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011628
Martin v. Löwis11437992002-04-12 09:54:03 +000011629 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11630 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11631echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11632if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11633 echo $ECHO_N "(cached) $ECHO_C" >&6
11634fi
11635echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11636echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011637else
Martin v. Löwis11437992002-04-12 09:54:03 +000011638 # Is the header compilable?
11639echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11640echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11641cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011642/* confdefs.h. */
11643_ACEOF
11644cat confdefs.h >>conftest.$ac_ext
11645cat >>conftest.$ac_ext <<_ACEOF
11646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011647$ac_includes_default
11648#include <mach/cthreads.h>
11649_ACEOF
11650rm -f conftest.$ac_objext
11651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011652 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011654 grep -v '^ *+' conftest.er1 >conftest.err
11655 rm -f conftest.er1
11656 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011659 { ac_try='test -z "$ac_c_werror_flag"
11660 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11662 (eval $ac_try) 2>&5
11663 ac_status=$?
11664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11665 (exit $ac_status); }; } &&
11666 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11668 (eval $ac_try) 2>&5
11669 ac_status=$?
11670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11671 (exit $ac_status); }; }; then
11672 ac_header_compiler=yes
11673else
11674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011675sed 's/^/| /' conftest.$ac_ext >&5
11676
Martin v. Löwis11437992002-04-12 09:54:03 +000011677ac_header_compiler=no
11678fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011680echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11681echo "${ECHO_T}$ac_header_compiler" >&6
11682
11683# Is the header present?
11684echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11685echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011687/* confdefs.h. */
11688_ACEOF
11689cat confdefs.h >>conftest.$ac_ext
11690cat >>conftest.$ac_ext <<_ACEOF
11691/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011692#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011693_ACEOF
11694if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11695 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11696 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011697 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011698 rm -f conftest.er1
11699 cat conftest.err >&5
11700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11701 (exit $ac_status); } >/dev/null; then
11702 if test -s conftest.err; then
11703 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011704 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 else
11706 ac_cpp_err=
11707 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011708else
Martin v. Löwis11437992002-04-12 09:54:03 +000011709 ac_cpp_err=yes
11710fi
11711if test -z "$ac_cpp_err"; then
11712 ac_header_preproc=yes
11713else
11714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011715sed 's/^/| /' conftest.$ac_ext >&5
11716
Martin v. Löwis11437992002-04-12 09:54:03 +000011717 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011719rm -f conftest.err conftest.$ac_ext
11720echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11721echo "${ECHO_T}$ac_header_preproc" >&6
11722
11723# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011724case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11725 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011726 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11727echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011728 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
11729echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
11730 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011731 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011732 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011733 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11734echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011735 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11736echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11737 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
11738echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
11739 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11740echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011741 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
11742echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011743 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
11744echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011745 (
11746 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011747## ------------------------------------------------ ##
11748## Report this to http://www.python.org/python-bugs ##
11749## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011750_ASBOX
11751 ) |
11752 sed "s/^/$as_me: WARNING: /" >&2
11753 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011754esac
11755echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11756echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11757if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11758 echo $ECHO_N "(cached) $ECHO_C" >&6
11759else
11760 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011762echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11763echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11764
11765fi
11766if test $ac_cv_header_mach_cthreads_h = yes; then
11767 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011768#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011769_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011770
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011772#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011773_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011774
Martin v. Löwis11437992002-04-12 09:54:03 +000011775
11776cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011777#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011778_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011779
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011780 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011781else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011782
Martin v. Löwis11437992002-04-12 09:54:03 +000011783 echo "$as_me:$LINENO: checking for --with-pth" >&5
11784echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11785
11786# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011787if test "${with_pth+set}" = set; then
11788 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011789 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011790echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011791 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011792#define WITH_THREAD 1
11793_ACEOF
11794
11795
11796cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011797#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011798_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011799
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011800 LIBS="-lpth $LIBS"
11801 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011802else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011803 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011804echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011805
11806 # Just looking for pthread_create in libpthread is not enough:
11807 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11808 # So we really have to include pthread.h, and then link.
11809 _libs=$LIBS
11810 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011811 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11812echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011814/* confdefs.h. */
11815_ACEOF
11816cat confdefs.h >>conftest.$ac_ext
11817cat >>conftest.$ac_ext <<_ACEOF
11818/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011819#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011820
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011821void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011822int
11823main ()
11824{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011825
11826pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 ;
11828 return 0;
11829}
11830_ACEOF
11831rm -f conftest.$ac_objext conftest$ac_exeext
11832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011833 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011835 grep -v '^ *+' conftest.er1 >conftest.err
11836 rm -f conftest.er1
11837 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011840 { ac_try='test -z "$ac_c_werror_flag"
11841 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11843 (eval $ac_try) 2>&5
11844 ac_status=$?
11845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11846 (exit $ac_status); }; } &&
11847 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11849 (eval $ac_try) 2>&5
11850 ac_status=$?
11851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11852 (exit $ac_status); }; }; then
11853
11854 echo "$as_me:$LINENO: result: yes" >&5
11855echo "${ECHO_T}yes" >&6
11856 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011857#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011858_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011859
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011860 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011861 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011862else
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011864sed 's/^/| /' conftest.$ac_ext >&5
11865
Martin v. Löwis11437992002-04-12 09:54:03 +000011866
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011867 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11869echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11870if test "${ac_cv_func_pthread_detach+set}" = set; then
11871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011872else
Martin v. Löwis11437992002-04-12 09:54:03 +000011873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011874/* confdefs.h. */
11875_ACEOF
11876cat confdefs.h >>conftest.$ac_ext
11877cat >>conftest.$ac_ext <<_ACEOF
11878/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011879/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011880 which can conflict with char pthread_detach (); below.
11881 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011882 <limits.h> exists even on freestanding compilers. Under hpux,
11883 including <limits.h> includes <sys/time.h> and causes problems
11884 checking for functions defined therein. */
11885#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011886# include <limits.h>
11887#else
11888# include <assert.h>
11889#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011890/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011891#ifdef __cplusplus
11892extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011893{
Martin v. Löwis11437992002-04-12 09:54:03 +000011894#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011895/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011896 builtin and then its argument prototype would still apply. */
11897char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011898/* The GNU C library defines this for functions which it implements
11899 to always fail with ENOSYS. Some functions are actually named
11900 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011901#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011902choke me
11903#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011904char (*f) () = pthread_detach;
11905#endif
11906#ifdef __cplusplus
11907}
Guido van Rossumad678af1998-10-02 14:42:15 +000011908#endif
11909
Skip Montanaro6dead952003-09-25 14:50:04 +000011910int
11911main ()
11912{
11913return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011914 ;
11915 return 0;
11916}
11917_ACEOF
11918rm -f conftest.$ac_objext conftest$ac_exeext
11919if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011920 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011922 grep -v '^ *+' conftest.er1 >conftest.err
11923 rm -f conftest.er1
11924 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011927 { ac_try='test -z "$ac_c_werror_flag"
11928 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11930 (eval $ac_try) 2>&5
11931 ac_status=$?
11932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11933 (exit $ac_status); }; } &&
11934 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11936 (eval $ac_try) 2>&5
11937 ac_status=$?
11938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11939 (exit $ac_status); }; }; then
11940 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011941else
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011943sed 's/^/| /' conftest.$ac_ext >&5
11944
Martin v. Löwis11437992002-04-12 09:54:03 +000011945ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011946fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011947rm -f conftest.err conftest.$ac_objext \
11948 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011950echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11951echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11952if test $ac_cv_func_pthread_detach = yes; then
11953 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011954#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011955_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011956
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011957 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011958 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011959else
Guido van Rossumad678af1998-10-02 14:42:15 +000011960
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011961 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11962 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11963echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11964if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11965 echo $ECHO_N "(cached) $ECHO_C" >&6
11966fi
11967echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11968echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11969else
11970 # Is the header compilable?
11971echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11972echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011974/* confdefs.h. */
11975_ACEOF
11976cat confdefs.h >>conftest.$ac_ext
11977cat >>conftest.$ac_ext <<_ACEOF
11978/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011979$ac_includes_default
11980#include <atheos/threads.h>
11981_ACEOF
11982rm -f conftest.$ac_objext
11983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011984 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011986 grep -v '^ *+' conftest.er1 >conftest.err
11987 rm -f conftest.er1
11988 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11990 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011991 { ac_try='test -z "$ac_c_werror_flag"
11992 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11994 (eval $ac_try) 2>&5
11995 ac_status=$?
11996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11997 (exit $ac_status); }; } &&
11998 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12000 (eval $ac_try) 2>&5
12001 ac_status=$?
12002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12003 (exit $ac_status); }; }; then
12004 ac_header_compiler=yes
12005else
12006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012007sed 's/^/| /' conftest.$ac_ext >&5
12008
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012009ac_header_compiler=no
12010fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012011rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012012echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12013echo "${ECHO_T}$ac_header_compiler" >&6
12014
12015# Is the header present?
12016echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
12017echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
12018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* confdefs.h. */
12020_ACEOF
12021cat confdefs.h >>conftest.$ac_ext
12022cat >>conftest.$ac_ext <<_ACEOF
12023/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012024#include <atheos/threads.h>
12025_ACEOF
12026if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12027 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12028 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012029 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012030 rm -f conftest.er1
12031 cat conftest.err >&5
12032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12033 (exit $ac_status); } >/dev/null; then
12034 if test -s conftest.err; then
12035 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012036 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012037 else
12038 ac_cpp_err=
12039 fi
12040else
12041 ac_cpp_err=yes
12042fi
12043if test -z "$ac_cpp_err"; then
12044 ac_header_preproc=yes
12045else
12046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012047sed 's/^/| /' conftest.$ac_ext >&5
12048
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012049 ac_header_preproc=no
12050fi
12051rm -f conftest.err conftest.$ac_ext
12052echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12053echo "${ECHO_T}$ac_header_preproc" >&6
12054
12055# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012056case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12057 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012058 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12059echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012060 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
12061echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
12062 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012063 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012064 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012065 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
12066echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012067 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
12068echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
12069 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
12070echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
12071 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
12072echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012073 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
12074echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012075 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
12076echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012077 (
12078 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012079## ------------------------------------------------ ##
12080## Report this to http://www.python.org/python-bugs ##
12081## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012082_ASBOX
12083 ) |
12084 sed "s/^/$as_me: WARNING: /" >&2
12085 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012086esac
12087echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12088echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12089if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12090 echo $ECHO_N "(cached) $ECHO_C" >&6
12091else
12092 ac_cv_header_atheos_threads_h=$ac_header_preproc
12093fi
12094echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12095echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12096
12097fi
12098if test $ac_cv_header_atheos_threads_h = yes; then
12099 cat >>confdefs.h <<\_ACEOF
12100#define WITH_THREAD 1
12101_ACEOF
12102
12103
12104cat >>confdefs.h <<\_ACEOF
12105#define ATHEOS_THREADS 1
12106_ACEOF
12107
12108 THREADOBJ="Python/thread.o"
12109else
12110
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12112 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12113echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12114if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12115 echo $ECHO_N "(cached) $ECHO_C" >&6
12116fi
12117echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12118echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012119else
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 # Is the header compilable?
12121echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
12122echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
12123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012124/* confdefs.h. */
12125_ACEOF
12126cat confdefs.h >>conftest.$ac_ext
12127cat >>conftest.$ac_ext <<_ACEOF
12128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012129$ac_includes_default
12130#include <kernel/OS.h>
12131_ACEOF
12132rm -f conftest.$ac_objext
12133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012134 (eval $ac_compile) 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); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012141 { ac_try='test -z "$ac_c_werror_flag"
12142 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12144 (eval $ac_try) 2>&5
12145 ac_status=$?
12146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12147 (exit $ac_status); }; } &&
12148 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12150 (eval $ac_try) 2>&5
12151 ac_status=$?
12152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12153 (exit $ac_status); }; }; then
12154 ac_header_compiler=yes
12155else
12156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012157sed 's/^/| /' conftest.$ac_ext >&5
12158
Martin v. Löwis11437992002-04-12 09:54:03 +000012159ac_header_compiler=no
12160fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012161rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012162echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12163echo "${ECHO_T}$ac_header_compiler" >&6
12164
12165# Is the header present?
12166echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12167echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012169/* confdefs.h. */
12170_ACEOF
12171cat confdefs.h >>conftest.$ac_ext
12172cat >>conftest.$ac_ext <<_ACEOF
12173/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012174#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012175_ACEOF
12176if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12177 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12178 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012179 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 rm -f conftest.er1
12181 cat conftest.err >&5
12182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12183 (exit $ac_status); } >/dev/null; then
12184 if test -s conftest.err; then
12185 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012186 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 else
12188 ac_cpp_err=
12189 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012190else
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 ac_cpp_err=yes
12192fi
12193if test -z "$ac_cpp_err"; then
12194 ac_header_preproc=yes
12195else
12196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012197sed 's/^/| /' conftest.$ac_ext >&5
12198
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012201rm -f conftest.err conftest.$ac_ext
12202echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12203echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012204
Martin v. Löwis11437992002-04-12 09:54:03 +000012205# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012206case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12207 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12209echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012210 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12211echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12212 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012213 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012214 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012215 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12216echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012217 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12218echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12219 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12220echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12221 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12222echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012223 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12224echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012225 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12226echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012227 (
12228 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012229## ------------------------------------------------ ##
12230## Report this to http://www.python.org/python-bugs ##
12231## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012232_ASBOX
12233 ) |
12234 sed "s/^/$as_me: WARNING: /" >&2
12235 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012236esac
12237echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12238echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12239if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12240 echo $ECHO_N "(cached) $ECHO_C" >&6
12241else
12242 ac_cv_header_kernel_OS_h=$ac_header_preproc
12243fi
12244echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12245echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12246
12247fi
12248if test $ac_cv_header_kernel_OS_h = yes; then
12249 cat >>confdefs.h <<\_ACEOF
12250#define WITH_THREAD 1
12251_ACEOF
12252
12253
12254cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012255#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012256_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012257
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012258 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012259else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012260
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12262echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12263if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012265else
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012267LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012268cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012269/* confdefs.h. */
12270_ACEOF
12271cat confdefs.h >>conftest.$ac_ext
12272cat >>conftest.$ac_ext <<_ACEOF
12273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012274
Greg Steinadf63d62000-07-05 10:38:09 +000012275/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012276#ifdef __cplusplus
12277extern "C"
12278#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012279/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012280 builtin and then its argument prototype would still apply. */
12281char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012282int
12283main ()
12284{
12285pthread_create ();
12286 ;
12287 return 0;
12288}
12289_ACEOF
12290rm -f conftest.$ac_objext conftest$ac_exeext
12291if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012292 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012294 grep -v '^ *+' conftest.er1 >conftest.err
12295 rm -f conftest.er1
12296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12298 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012299 { ac_try='test -z "$ac_c_werror_flag"
12300 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12302 (eval $ac_try) 2>&5
12303 ac_status=$?
12304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12305 (exit $ac_status); }; } &&
12306 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12308 (eval $ac_try) 2>&5
12309 ac_status=$?
12310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12311 (exit $ac_status); }; }; then
12312 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012313else
Martin v. Löwis11437992002-04-12 09:54:03 +000012314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012315sed 's/^/| /' conftest.$ac_ext >&5
12316
Martin v. Löwis11437992002-04-12 09:54:03 +000012317ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012318fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012319rm -f conftest.err conftest.$ac_objext \
12320 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012321LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012323echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12324echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12325if test $ac_cv_lib_pthreads_pthread_create = yes; then
12326 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012327#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012328_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012329
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012330 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012331 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012332 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012333else
Greg Steinadf63d62000-07-05 10:38:09 +000012334
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12336echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12337if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12338 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012339else
Martin v. Löwis11437992002-04-12 09:54:03 +000012340 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012341LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* confdefs.h. */
12344_ACEOF
12345cat confdefs.h >>conftest.$ac_ext
12346cat >>conftest.$ac_ext <<_ACEOF
12347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012348
Guido van Rossum49545951997-12-02 19:28:29 +000012349/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012350#ifdef __cplusplus
12351extern "C"
12352#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012353/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 builtin and then its argument prototype would still apply. */
12355char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012356int
12357main ()
12358{
12359pthread_create ();
12360 ;
12361 return 0;
12362}
12363_ACEOF
12364rm -f conftest.$ac_objext conftest$ac_exeext
12365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012366 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012368 grep -v '^ *+' conftest.er1 >conftest.err
12369 rm -f conftest.er1
12370 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12372 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012373 { ac_try='test -z "$ac_c_werror_flag"
12374 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12376 (eval $ac_try) 2>&5
12377 ac_status=$?
12378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12379 (exit $ac_status); }; } &&
12380 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12382 (eval $ac_try) 2>&5
12383 ac_status=$?
12384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12385 (exit $ac_status); }; }; then
12386 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012387else
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012389sed 's/^/| /' conftest.$ac_ext >&5
12390
Martin v. Löwis11437992002-04-12 09:54:03 +000012391ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012392fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012393rm -f conftest.err conftest.$ac_objext \
12394 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012395LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012397echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12398echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12399if test $ac_cv_lib_c_r_pthread_create = yes; then
12400 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012401#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012402_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012403
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012404 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012405 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012406 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012407else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012408
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12410echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12411if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012413else
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012415LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012416cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012417/* confdefs.h. */
12418_ACEOF
12419cat confdefs.h >>conftest.$ac_ext
12420cat >>conftest.$ac_ext <<_ACEOF
12421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012423/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012424#ifdef __cplusplus
12425extern "C"
12426#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012427/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 builtin and then its argument prototype would still apply. */
12429char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012430int
12431main ()
12432{
12433__pthread_create_system ();
12434 ;
12435 return 0;
12436}
12437_ACEOF
12438rm -f conftest.$ac_objext conftest$ac_exeext
12439if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012440 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012442 grep -v '^ *+' conftest.er1 >conftest.err
12443 rm -f conftest.er1
12444 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12446 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012447 { ac_try='test -z "$ac_c_werror_flag"
12448 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12450 (eval $ac_try) 2>&5
12451 ac_status=$?
12452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12453 (exit $ac_status); }; } &&
12454 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12456 (eval $ac_try) 2>&5
12457 ac_status=$?
12458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12459 (exit $ac_status); }; }; then
12460 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012461else
Martin v. Löwis11437992002-04-12 09:54:03 +000012462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012463sed 's/^/| /' conftest.$ac_ext >&5
12464
Martin v. Löwis11437992002-04-12 09:54:03 +000012465ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012466fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012467rm -f conftest.err conftest.$ac_objext \
12468 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012469LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012470fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012471echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12472echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12473if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12474 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012475#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012476_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012477
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012478 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012479 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012480 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012481else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012482
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12484echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12485if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012487else
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012489LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012491/* confdefs.h. */
12492_ACEOF
12493cat confdefs.h >>conftest.$ac_ext
12494cat >>conftest.$ac_ext <<_ACEOF
12495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
Guido van Rossumb93a8621998-05-07 13:27:32 +000012497/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012498#ifdef __cplusplus
12499extern "C"
12500#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012501/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 builtin and then its argument prototype would still apply. */
12503char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012504int
12505main ()
12506{
12507pthread_create ();
12508 ;
12509 return 0;
12510}
12511_ACEOF
12512rm -f conftest.$ac_objext conftest$ac_exeext
12513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012514 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012516 grep -v '^ *+' conftest.er1 >conftest.err
12517 rm -f conftest.er1
12518 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012521 { ac_try='test -z "$ac_c_werror_flag"
12522 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12524 (eval $ac_try) 2>&5
12525 ac_status=$?
12526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12527 (exit $ac_status); }; } &&
12528 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12530 (eval $ac_try) 2>&5
12531 ac_status=$?
12532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12533 (exit $ac_status); }; }; then
12534 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012535else
Martin v. Löwis11437992002-04-12 09:54:03 +000012536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012537sed 's/^/| /' conftest.$ac_ext >&5
12538
Martin v. Löwis11437992002-04-12 09:54:03 +000012539ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012540fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012541rm -f conftest.err conftest.$ac_objext \
12542 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012543LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012545echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12546echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12547if test $ac_cv_lib_cma_pthread_create = yes; then
12548 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012549#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012550_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012551
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012552 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012553 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012554 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012555else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012556
Martin v. Löwis130fb172001-07-19 11:00:41 +000012557 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012558fi
12559
Guido van Rossum627b2d71993-12-24 10:39:16 +000012560
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012561fi
12562
Guido van Rossum0be3e491997-05-22 20:33:33 +000012563fi
12564
Guido van Rossum49545951997-12-02 19:28:29 +000012565fi
12566
Guido van Rossumb93a8621998-05-07 13:27:32 +000012567fi
12568
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012569
Michael W. Hudson54241132001-12-07 15:38:26 +000012570fi
12571
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012572
12573fi
12574
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012575fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012576rm -f conftest.err conftest.$ac_objext \
12577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012578fi;
12579fi
12580
12581
12582fi
12583
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012584
Michael W. Hudson54241132001-12-07 15:38:26 +000012585
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12587echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12588if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012590else
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012592LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012594/* confdefs.h. */
12595_ACEOF
12596cat confdefs.h >>conftest.$ac_ext
12597cat >>conftest.$ac_ext <<_ACEOF
12598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012599
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012600/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012601#ifdef __cplusplus
12602extern "C"
12603#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012604/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012605 builtin and then its argument prototype would still apply. */
12606char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012607int
12608main ()
12609{
12610usconfig ();
12611 ;
12612 return 0;
12613}
12614_ACEOF
12615rm -f conftest.$ac_objext conftest$ac_exeext
12616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012617 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012619 grep -v '^ *+' conftest.er1 >conftest.err
12620 rm -f conftest.er1
12621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012624 { ac_try='test -z "$ac_c_werror_flag"
12625 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12627 (eval $ac_try) 2>&5
12628 ac_status=$?
12629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12630 (exit $ac_status); }; } &&
12631 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12633 (eval $ac_try) 2>&5
12634 ac_status=$?
12635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12636 (exit $ac_status); }; }; then
12637 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012638else
Martin v. Löwis11437992002-04-12 09:54:03 +000012639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012640sed 's/^/| /' conftest.$ac_ext >&5
12641
Martin v. Löwis11437992002-04-12 09:54:03 +000012642ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012643fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012644rm -f conftest.err conftest.$ac_objext \
12645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012648echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12649echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12650if test $ac_cv_lib_mpc_usconfig = yes; then
12651 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012652#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012653_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012654
Martin v. Löwis130fb172001-07-19 11:00:41 +000012655 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012656 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012657 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012658fi
12659
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012660
Neal Norwitza978ab02002-11-02 16:58:05 +000012661 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12663echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12664if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666else
Martin v. Löwis11437992002-04-12 09:54:03 +000012667 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012668LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012670/* confdefs.h. */
12671_ACEOF
12672cat confdefs.h >>conftest.$ac_ext
12673cat >>conftest.$ac_ext <<_ACEOF
12674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012675
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012676/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012677#ifdef __cplusplus
12678extern "C"
12679#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012680/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 builtin and then its argument prototype would still apply. */
12682char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012683int
12684main ()
12685{
12686thr_create ();
12687 ;
12688 return 0;
12689}
12690_ACEOF
12691rm -f conftest.$ac_objext conftest$ac_exeext
12692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012693 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012695 grep -v '^ *+' conftest.er1 >conftest.err
12696 rm -f conftest.er1
12697 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12699 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012700 { ac_try='test -z "$ac_c_werror_flag"
12701 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12703 (eval $ac_try) 2>&5
12704 ac_status=$?
12705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12706 (exit $ac_status); }; } &&
12707 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12709 (eval $ac_try) 2>&5
12710 ac_status=$?
12711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12712 (exit $ac_status); }; }; then
12713 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012714else
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012716sed 's/^/| /' conftest.$ac_ext >&5
12717
Martin v. Löwis11437992002-04-12 09:54:03 +000012718ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012719fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012720rm -f conftest.err conftest.$ac_objext \
12721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012722LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012724echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12725echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12726if test $ac_cv_lib_thread_thr_create = yes; then
12727 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012729_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012731 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012732 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012733 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012734fi
12735
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012736 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012737
Martin v. Löwis130fb172001-07-19 11:00:41 +000012738 if test "$USE_THREAD_MODULE" != "#"
12739 then
12740 # If the above checks didn't disable threads, (at least) OSF1
12741 # needs this '-threads' argument during linking.
12742 case $ac_sys_system in
12743 OSF1) LDLAST=-threads;;
12744 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012745 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012746fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012747
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012748if test "$posix_threads" = "yes"; then
12749 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012750
12751cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012752#define _POSIX_THREADS 1
12753_ACEOF
12754
12755 fi
12756
12757 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12758 case $ac_sys_system/$ac_sys_release in
12759 SunOS/5.6)
12760cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012761#define HAVE_PTHREAD_DESTRUCTOR 1
12762_ACEOF
12763
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012764 ;;
12765 SunOS/5.8)
12766cat >>confdefs.h <<\_ACEOF
12767#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12768_ACEOF
12769
12770 ;;
12771 esac
12772
12773 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12774echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12775 if test "${ac_cv_pthread_system_supported+set}" = set; then
12776 echo $ECHO_N "(cached) $ECHO_C" >&6
12777else
12778 if test "$cross_compiling" = yes; then
12779 ac_cv_pthread_system_supported=no
12780else
12781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012782/* confdefs.h. */
12783_ACEOF
12784cat confdefs.h >>conftest.$ac_ext
12785cat >>conftest.$ac_ext <<_ACEOF
12786/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012787#include <pthread.h>
12788 void *foo(void *parm) {
12789 return NULL;
12790 }
12791 main() {
12792 pthread_attr_t attr;
12793 pthread_t id;
12794 if (pthread_attr_init(&attr)) exit(-1);
12795 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12796 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12797 exit(0);
12798 }
12799_ACEOF
12800rm -f conftest$ac_exeext
12801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12802 (eval $ac_link) 2>&5
12803 ac_status=$?
12804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12805 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12807 (eval $ac_try) 2>&5
12808 ac_status=$?
12809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12810 (exit $ac_status); }; }; then
12811 ac_cv_pthread_system_supported=yes
12812else
12813 echo "$as_me: program exited with status $ac_status" >&5
12814echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012815sed 's/^/| /' conftest.$ac_ext >&5
12816
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012817( exit $ac_status )
12818ac_cv_pthread_system_supported=no
12819fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012820rm -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 +000012821fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012822
Guido van Rossum627b2d71993-12-24 10:39:16 +000012823fi
12824
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012825 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12826echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12827 if test "$ac_cv_pthread_system_supported" = "yes"; then
12828
12829cat >>confdefs.h <<\_ACEOF
12830#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12831_ACEOF
12832
12833 fi
12834
12835for ac_func in pthread_sigmask
12836do
12837as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12838echo "$as_me:$LINENO: checking for $ac_func" >&5
12839echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12840if eval "test \"\${$as_ac_var+set}\" = set"; then
12841 echo $ECHO_N "(cached) $ECHO_C" >&6
12842else
12843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012844/* confdefs.h. */
12845_ACEOF
12846cat confdefs.h >>conftest.$ac_ext
12847cat >>conftest.$ac_ext <<_ACEOF
12848/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012849/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012850 which can conflict with char $ac_func (); below.
12851 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012852 <limits.h> exists even on freestanding compilers. Under hpux,
12853 including <limits.h> includes <sys/time.h> and causes problems
12854 checking for functions defined therein. */
12855#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012856# include <limits.h>
12857#else
12858# include <assert.h>
12859#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012860/* Override any gcc2 internal prototype to avoid an error. */
12861#ifdef __cplusplus
12862extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012863{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012864#endif
12865/* We use char because int might match the return type of a gcc2
12866 builtin and then its argument prototype would still apply. */
12867char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012868/* The GNU C library defines this for functions which it implements
12869 to always fail with ENOSYS. Some functions are actually named
12870 something starting with __ and the normal name is an alias. */
12871#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12872choke me
12873#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012874char (*f) () = $ac_func;
12875#endif
12876#ifdef __cplusplus
12877}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012878#endif
12879
Skip Montanaro6dead952003-09-25 14:50:04 +000012880int
12881main ()
12882{
12883return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012884 ;
12885 return 0;
12886}
12887_ACEOF
12888rm -f conftest.$ac_objext conftest$ac_exeext
12889if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012890 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012892 grep -v '^ *+' conftest.er1 >conftest.err
12893 rm -f conftest.er1
12894 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12896 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012897 { ac_try='test -z "$ac_c_werror_flag"
12898 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12900 (eval $ac_try) 2>&5
12901 ac_status=$?
12902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12903 (exit $ac_status); }; } &&
12904 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12906 (eval $ac_try) 2>&5
12907 ac_status=$?
12908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12909 (exit $ac_status); }; }; then
12910 eval "$as_ac_var=yes"
12911else
12912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012913sed 's/^/| /' conftest.$ac_ext >&5
12914
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012915eval "$as_ac_var=no"
12916fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012917rm -f conftest.err conftest.$ac_objext \
12918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012919fi
12920echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12921echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12922if test `eval echo '${'$as_ac_var'}'` = yes; then
12923 cat >>confdefs.h <<_ACEOF
12924#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12925_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012926 case $ac_sys_system in
12927 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012928
Jason Tishlerfac083d2003-07-22 15:20:49 +000012929cat >>confdefs.h <<\_ACEOF
12930#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12931_ACEOF
12932
12933 ;;
12934 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012935fi
12936done
12937
12938fi
12939
12940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012941# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012942
12943
12944echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12945echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012946# Check whether --enable-ipv6 or --disable-ipv6 was given.
12947if test "${enable_ipv6+set}" = set; then
12948 enableval="$enable_ipv6"
12949 case "$enableval" in
12950 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 echo "$as_me:$LINENO: result: no" >&5
12952echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012953 ipv6=no
12954 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 *) echo "$as_me:$LINENO: result: yes" >&5
12956echo "${ECHO_T}yes" >&6
12957 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012958#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012959_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012960
12961 ipv6=yes
12962 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012964else
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012966 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 echo "$as_me:$LINENO: result: no" >&5
12968echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012969 ipv6=no
12970
12971else
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012973/* confdefs.h. */
12974_ACEOF
12975cat confdefs.h >>conftest.$ac_ext
12976cat >>conftest.$ac_ext <<_ACEOF
12977/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012978 /* AF_INET6 available check */
12979#include <sys/types.h>
12980#include <sys/socket.h>
12981main()
12982{
12983 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12984 exit(1);
12985 else
12986 exit(0);
12987}
12988
Martin v. Löwis11437992002-04-12 09:54:03 +000012989_ACEOF
12990rm -f conftest$ac_exeext
12991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12992 (eval $ac_link) 2>&5
12993 ac_status=$?
12994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12997 (eval $ac_try) 2>&5
12998 ac_status=$?
12999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13000 (exit $ac_status); }; }; then
13001 echo "$as_me:$LINENO: result: yes" >&5
13002echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013003 ipv6=yes
13004else
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 echo "$as_me: program exited with status $ac_status" >&5
13006echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013007sed 's/^/| /' conftest.$ac_ext >&5
13008
Martin v. Löwis11437992002-04-12 09:54:03 +000013009( exit $ac_status )
13010echo "$as_me:$LINENO: result: no" >&5
13011echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013012 ipv6=no
13013fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013014rm -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 +000013015fi
13016
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013017if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
13019echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
13020 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013021/* confdefs.h. */
13022_ACEOF
13023cat confdefs.h >>conftest.$ac_ext
13024cat >>conftest.$ac_ext <<_ACEOF
13025/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013026#include <sys/types.h>
13027#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013028int
13029main ()
13030{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013031struct sockaddr_in6 x;
13032x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ;
13034 return 0;
13035}
13036_ACEOF
13037rm -f conftest.$ac_objext
13038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013039 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013041 grep -v '^ *+' conftest.er1 >conftest.err
13042 rm -f conftest.er1
13043 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13045 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013046 { ac_try='test -z "$ac_c_werror_flag"
13047 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13049 (eval $ac_try) 2>&5
13050 ac_status=$?
13051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13052 (exit $ac_status); }; } &&
13053 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13055 (eval $ac_try) 2>&5
13056 ac_status=$?
13057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13058 (exit $ac_status); }; }; then
13059 echo "$as_me:$LINENO: result: yes" >&5
13060echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013061 ipv6=yes
13062else
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013064sed 's/^/| /' conftest.$ac_ext >&5
13065
Martin v. Löwis11437992002-04-12 09:54:03 +000013066echo "$as_me:$LINENO: result: no" >&5
13067echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013068 ipv6=no
13069fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013070rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013071fi
13072
13073if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013075#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013076_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013077
13078fi
13079
Martin v. Löwis11437992002-04-12 09:54:03 +000013080fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013081
13082ipv6type=unknown
13083ipv6lib=none
13084ipv6trylibc=no
13085
13086if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013087 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
13088echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000013089 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
13090 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013091 case $i in
13092 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013094/* confdefs.h. */
13095_ACEOF
13096cat confdefs.h >>conftest.$ac_ext
13097cat >>conftest.$ac_ext <<_ACEOF
13098/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013099
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013100#include <netinet/in.h>
13101#ifdef IPV6_INRIA_VERSION
13102yes
13103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013104_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013106 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013107 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013108fi
13109rm -f conftest*
13110
13111 ;;
13112 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013114/* confdefs.h. */
13115_ACEOF
13116cat confdefs.h >>conftest.$ac_ext
13117cat >>conftest.$ac_ext <<_ACEOF
13118/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013119
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013120#include <netinet/in.h>
13121#ifdef __KAME__
13122yes
13123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013124_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013126 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013127 ipv6type=$i;
13128 ipv6lib=inet6
13129 ipv6libdir=/usr/local/v6/lib
13130 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013131fi
13132rm -f conftest*
13133
13134 ;;
13135 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013137/* confdefs.h. */
13138_ACEOF
13139cat confdefs.h >>conftest.$ac_ext
13140cat >>conftest.$ac_ext <<_ACEOF
13141/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013142
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013143#include <features.h>
13144#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
13145yes
13146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013147_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013149 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013150 ipv6type=$i;
13151 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013152fi
13153rm -f conftest*
13154
13155 ;;
13156 linux-inet6)
13157 if test -d /usr/inet6; then
13158 ipv6type=$i
13159 ipv6lib=inet6
13160 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013161 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013162 fi
13163 ;;
13164 solaris)
13165 if test -f /etc/netconfig; then
13166 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13167 ipv6type=$i
13168 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013169 fi
13170 fi
13171 ;;
13172 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013174/* confdefs.h. */
13175_ACEOF
13176cat confdefs.h >>conftest.$ac_ext
13177cat >>conftest.$ac_ext <<_ACEOF
13178/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013179
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013180#include <sys/param.h>
13181#ifdef _TOSHIBA_INET6
13182yes
13183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013184_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013186 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013187 ipv6type=$i;
13188 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013189 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013190fi
13191rm -f conftest*
13192
13193 ;;
13194 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013196/* confdefs.h. */
13197_ACEOF
13198cat confdefs.h >>conftest.$ac_ext
13199cat >>conftest.$ac_ext <<_ACEOF
13200/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013201
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013202#include </usr/local/v6/include/sys/v6config.h>
13203#ifdef __V6D__
13204yes
13205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013206_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013208 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013209 ipv6type=$i;
13210 ipv6lib=v6;
13211 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013212 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013213fi
13214rm -f conftest*
13215
13216 ;;
13217 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013219/* confdefs.h. */
13220_ACEOF
13221cat confdefs.h >>conftest.$ac_ext
13222cat >>conftest.$ac_ext <<_ACEOF
13223/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013224
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013225#include <sys/param.h>
13226#ifdef _ZETA_MINAMI_INET6
13227yes
13228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013229_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013231 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013232 ipv6type=$i;
13233 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013234 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013235fi
13236rm -f conftest*
13237
13238 ;;
13239 esac
13240 if test "$ipv6type" != "unknown"; then
13241 break
13242 fi
13243 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 echo "$as_me:$LINENO: result: $ipv6type" >&5
13245echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013246fi
13247
13248if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13249 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13250 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13251 echo "using lib$ipv6lib"
13252 else
13253 if test $ipv6trylibc = "yes"; then
13254 echo "using libc"
13255 else
13256 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13257 echo "You need to fetch lib$ipv6lib.a from appropriate"
13258 echo 'ipv6 kit and compile beforehand.'
13259 exit 1
13260 fi
13261 fi
13262fi
13263
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013264# Check for --with-doc-strings
13265echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13266echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13267
13268# Check whether --with-doc-strings or --without-doc-strings was given.
13269if test "${with_doc_strings+set}" = set; then
13270 withval="$with_doc_strings"
13271
13272fi;
13273
13274if test -z "$with_doc_strings"
13275then with_doc_strings="yes"
13276fi
13277if test "$with_doc_strings" != "no"
13278then
13279
13280cat >>confdefs.h <<\_ACEOF
13281#define WITH_DOC_STRINGS 1
13282_ACEOF
13283
13284fi
13285echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13286echo "${ECHO_T}$with_doc_strings" >&6
13287
Neil Schemenauera35c6882001-02-27 04:45:05 +000013288# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013289echo "$as_me:$LINENO: checking for --with-tsc" >&5
13290echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13291
13292# Check whether --with-tsc or --without-tsc was given.
13293if test "${with_tsc+set}" = set; then
13294 withval="$with_tsc"
13295
13296if test "$withval" != no
13297then
13298
13299cat >>confdefs.h <<\_ACEOF
13300#define WITH_TSC 1
13301_ACEOF
13302
13303 echo "$as_me:$LINENO: result: yes" >&5
13304echo "${ECHO_T}yes" >&6
13305else echo "$as_me:$LINENO: result: no" >&5
13306echo "${ECHO_T}no" >&6
13307fi
13308else
13309 echo "$as_me:$LINENO: result: no" >&5
13310echo "${ECHO_T}no" >&6
13311fi;
13312
13313# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013314echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13315echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13316
Neil Schemenauera35c6882001-02-27 04:45:05 +000013317# Check whether --with-pymalloc or --without-pymalloc was given.
13318if test "${with_pymalloc+set}" = set; then
13319 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013320
Martin v. Löwis11437992002-04-12 09:54:03 +000013321fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013322
Neil Schemenauer16c22972002-03-22 15:34:49 +000013323if test -z "$with_pymalloc"
13324then with_pymalloc="yes"
13325fi
13326if test "$with_pymalloc" != "no"
13327then
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
13329cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013330#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013331_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013332
13333fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013334echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13335echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013336
Barry Warsawef82cd72000-06-30 16:21:01 +000013337# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013338echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13339echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13340
Barry Warsawef82cd72000-06-30 16:21:01 +000013341# Check whether --with-wctype-functions or --without-wctype-functions was given.
13342if test "${with_wctype_functions+set}" = set; then
13343 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
Barry Warsawef82cd72000-06-30 16:21:01 +000013345if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013346then
13347
13348cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013349#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013350_ACEOF
13351
13352 echo "$as_me:$LINENO: result: yes" >&5
13353echo "${ECHO_T}yes" >&6
13354else echo "$as_me:$LINENO: result: no" >&5
13355echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013356fi
13357else
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 echo "$as_me:$LINENO: result: no" >&5
13359echo "${ECHO_T}no" >&6
13360fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013361
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013362# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013363
Guido van Rossum98935bf2001-09-05 19:13:16 +000013364DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013365
Guido van Rossume97ee181999-12-20 21:27:22 +000013366# the dlopen() function means we might want to use dynload_shlib.o. some
13367# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013368
Thomas Wouters3a584202000-08-05 23:28:51 +000013369for ac_func in dlopen
13370do
Martin v. Löwis11437992002-04-12 09:54:03 +000013371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13372echo "$as_me:$LINENO: checking for $ac_func" >&5
13373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13374if eval "test \"\${$as_ac_var+set}\" = set"; then
13375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013376else
Martin v. Löwis11437992002-04-12 09:54:03 +000013377 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013378/* confdefs.h. */
13379_ACEOF
13380cat confdefs.h >>conftest.$ac_ext
13381cat >>conftest.$ac_ext <<_ACEOF
13382/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000013383/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013384 which can conflict with char $ac_func (); below.
13385 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013386 <limits.h> exists even on freestanding compilers. Under hpux,
13387 including <limits.h> includes <sys/time.h> and causes problems
13388 checking for functions defined therein. */
13389#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013390# include <limits.h>
13391#else
13392# include <assert.h>
13393#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013394/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013395#ifdef __cplusplus
13396extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013397{
Martin v. Löwis11437992002-04-12 09:54:03 +000013398#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013399/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 builtin and then its argument prototype would still apply. */
13401char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013402/* The GNU C library defines this for functions which it implements
13403 to always fail with ENOSYS. Some functions are actually named
13404 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013405#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013406choke me
13407#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013408char (*f) () = $ac_func;
13409#endif
13410#ifdef __cplusplus
13411}
Guido van Rossume97ee181999-12-20 21:27:22 +000013412#endif
13413
Skip Montanaro6dead952003-09-25 14:50:04 +000013414int
13415main ()
13416{
13417return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 ;
13419 return 0;
13420}
13421_ACEOF
13422rm -f conftest.$ac_objext conftest$ac_exeext
13423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013424 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013426 grep -v '^ *+' conftest.er1 >conftest.err
13427 rm -f conftest.er1
13428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013431 { ac_try='test -z "$ac_c_werror_flag"
13432 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13434 (eval $ac_try) 2>&5
13435 ac_status=$?
13436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13437 (exit $ac_status); }; } &&
13438 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13440 (eval $ac_try) 2>&5
13441 ac_status=$?
13442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13443 (exit $ac_status); }; }; then
13444 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013445else
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013447sed 's/^/| /' conftest.$ac_ext >&5
13448
Martin v. Löwis11437992002-04-12 09:54:03 +000013449eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013450fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013451rm -f conftest.err conftest.$ac_objext \
13452 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013454echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13455echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13456if test `eval echo '${'$as_ac_var'}'` = yes; then
13457 cat >>confdefs.h <<_ACEOF
13458#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13459_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013460
Guido van Rossume97ee181999-12-20 21:27:22 +000013461fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013462done
Guido van Rossume97ee181999-12-20 21:27:22 +000013463
Michael W. Hudson54241132001-12-07 15:38:26 +000013464
Guido van Rossume97ee181999-12-20 21:27:22 +000013465# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13466# loading of modules.
13467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13469echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013470if test -z "$DYNLOADFILE"
13471then
13472 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013473 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13474 if test "$ac_cv_func_dlopen" = yes
13475 then DYNLOADFILE="dynload_shlib.o"
13476 else DYNLOADFILE="dynload_aix.o"
13477 fi
13478 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013479 BeOS*) DYNLOADFILE="dynload_beos.o";;
13480 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013481 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013482 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013483 *)
13484 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13485 # out any dynamic loading
13486 if test "$ac_cv_func_dlopen" = yes
13487 then DYNLOADFILE="dynload_shlib.o"
13488 else DYNLOADFILE="dynload_stub.o"
13489 fi
13490 ;;
13491 esac
13492fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013493echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13494echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013495if test "$DYNLOADFILE" != "dynload_stub.o"
13496then
Martin v. Löwis11437992002-04-12 09:54:03 +000013497
13498cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013499#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013500_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013501
13502fi
13503
Neil Schemenauer4e425612001-06-19 15:44:15 +000013504# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13505
Michael W. Hudson54241132001-12-07 15:38:26 +000013506
Martin v. Löwis11437992002-04-12 09:54:03 +000013507echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13508echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013509if test -z "$MACHDEP_OBJS"
13510then
Jack Jansene578a632001-08-15 01:27:14 +000013511 MACHDEP_OBJS=$extra_machdep_objs
13512else
13513 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013514fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013515echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13516echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013517
Guido van Rossum627b2d71993-12-24 10:39:16 +000013518# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
Martin v. Löwisd6320502004-08-12 13:45:08 +000013590
Martin v. Löwisc3001752005-01-23 09:27:24 +000013591
13592
Martin v. Löwisd6320502004-08-12 13:45:08 +000013593for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13594 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013595 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000013596 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013597 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013598 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013599 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013600 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013601 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013602 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013603 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013604 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013605do
Martin v. Löwis11437992002-04-12 09:54:03 +000013606as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13607echo "$as_me:$LINENO: checking for $ac_func" >&5
13608echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13609if eval "test \"\${$as_ac_var+set}\" = set"; then
13610 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013611else
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013613/* confdefs.h. */
13614_ACEOF
13615cat confdefs.h >>conftest.$ac_ext
13616cat >>conftest.$ac_ext <<_ACEOF
13617/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013618/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013619 which can conflict with char $ac_func (); below.
13620 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013621 <limits.h> exists even on freestanding compilers. Under hpux,
13622 including <limits.h> includes <sys/time.h> and causes problems
13623 checking for functions defined therein. */
13624#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013625# include <limits.h>
13626#else
13627# include <assert.h>
13628#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013629/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013630#ifdef __cplusplus
13631extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013632{
Martin v. Löwis11437992002-04-12 09:54:03 +000013633#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013634/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013635 builtin and then its argument prototype would still apply. */
13636char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013637/* The GNU C library defines this for functions which it implements
13638 to always fail with ENOSYS. Some functions are actually named
13639 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013640#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013641choke me
13642#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013643char (*f) () = $ac_func;
13644#endif
13645#ifdef __cplusplus
13646}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013647#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013648
Skip Montanaro6dead952003-09-25 14:50:04 +000013649int
13650main ()
13651{
13652return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 ;
13654 return 0;
13655}
13656_ACEOF
13657rm -f conftest.$ac_objext conftest$ac_exeext
13658if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013659 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013661 grep -v '^ *+' conftest.er1 >conftest.err
13662 rm -f conftest.er1
13663 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13665 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013666 { ac_try='test -z "$ac_c_werror_flag"
13667 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13669 (eval $ac_try) 2>&5
13670 ac_status=$?
13671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13672 (exit $ac_status); }; } &&
13673 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13675 (eval $ac_try) 2>&5
13676 ac_status=$?
13677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13678 (exit $ac_status); }; }; then
13679 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013680else
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013682sed 's/^/| /' conftest.$ac_ext >&5
13683
Martin v. Löwis11437992002-04-12 09:54:03 +000013684eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013685fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013686rm -f conftest.err conftest.$ac_objext \
13687 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013689echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13690echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13691if test `eval echo '${'$as_ac_var'}'` = yes; then
13692 cat >>confdefs.h <<_ACEOF
13693#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13694_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013695
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013696fi
13697done
13698
Michael W. Hudson54241132001-12-07 15:38:26 +000013699
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013700# For some functions, having a definition is not sufficient, since
13701# we want to take their address.
13702echo "$as_me:$LINENO: checking for chroot" >&5
13703echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13704cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013705/* confdefs.h. */
13706_ACEOF
13707cat confdefs.h >>conftest.$ac_ext
13708cat >>conftest.$ac_ext <<_ACEOF
13709/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013710#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013711int
13712main ()
13713{
13714void *x=chroot
13715 ;
13716 return 0;
13717}
13718_ACEOF
13719rm -f conftest.$ac_objext
13720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013721 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013723 grep -v '^ *+' conftest.er1 >conftest.err
13724 rm -f conftest.er1
13725 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13727 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013728 { ac_try='test -z "$ac_c_werror_flag"
13729 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13731 (eval $ac_try) 2>&5
13732 ac_status=$?
13733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734 (exit $ac_status); }; } &&
13735 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13737 (eval $ac_try) 2>&5
13738 ac_status=$?
13739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13740 (exit $ac_status); }; }; then
13741
13742cat >>confdefs.h <<\_ACEOF
13743#define HAVE_CHROOT 1
13744_ACEOF
13745
13746 echo "$as_me:$LINENO: result: yes" >&5
13747echo "${ECHO_T}yes" >&6
13748else
13749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013750sed 's/^/| /' conftest.$ac_ext >&5
13751
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013752echo "$as_me:$LINENO: result: no" >&5
13753echo "${ECHO_T}no" >&6
13754
13755fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013756rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013757echo "$as_me:$LINENO: checking for link" >&5
13758echo $ECHO_N "checking for link... $ECHO_C" >&6
13759cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013760/* confdefs.h. */
13761_ACEOF
13762cat confdefs.h >>conftest.$ac_ext
13763cat >>conftest.$ac_ext <<_ACEOF
13764/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013765#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013766int
13767main ()
13768{
13769void *x=link
13770 ;
13771 return 0;
13772}
13773_ACEOF
13774rm -f conftest.$ac_objext
13775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013776 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013778 grep -v '^ *+' conftest.er1 >conftest.err
13779 rm -f conftest.er1
13780 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13782 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013783 { ac_try='test -z "$ac_c_werror_flag"
13784 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13786 (eval $ac_try) 2>&5
13787 ac_status=$?
13788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13789 (exit $ac_status); }; } &&
13790 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13792 (eval $ac_try) 2>&5
13793 ac_status=$?
13794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13795 (exit $ac_status); }; }; then
13796
13797cat >>confdefs.h <<\_ACEOF
13798#define HAVE_LINK 1
13799_ACEOF
13800
13801 echo "$as_me:$LINENO: result: yes" >&5
13802echo "${ECHO_T}yes" >&6
13803else
13804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013805sed 's/^/| /' conftest.$ac_ext >&5
13806
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013807echo "$as_me:$LINENO: result: no" >&5
13808echo "${ECHO_T}no" >&6
13809
13810fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013811rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013812echo "$as_me:$LINENO: checking for symlink" >&5
13813echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13814cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013815/* confdefs.h. */
13816_ACEOF
13817cat confdefs.h >>conftest.$ac_ext
13818cat >>conftest.$ac_ext <<_ACEOF
13819/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013820#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013821int
13822main ()
13823{
13824void *x=symlink
13825 ;
13826 return 0;
13827}
13828_ACEOF
13829rm -f conftest.$ac_objext
13830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013831 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013833 grep -v '^ *+' conftest.er1 >conftest.err
13834 rm -f conftest.er1
13835 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13837 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013838 { ac_try='test -z "$ac_c_werror_flag"
13839 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13841 (eval $ac_try) 2>&5
13842 ac_status=$?
13843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13844 (exit $ac_status); }; } &&
13845 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13847 (eval $ac_try) 2>&5
13848 ac_status=$?
13849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13850 (exit $ac_status); }; }; then
13851
13852cat >>confdefs.h <<\_ACEOF
13853#define HAVE_SYMLINK 1
13854_ACEOF
13855
13856 echo "$as_me:$LINENO: result: yes" >&5
13857echo "${ECHO_T}yes" >&6
13858else
13859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013860sed 's/^/| /' conftest.$ac_ext >&5
13861
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013862echo "$as_me:$LINENO: result: no" >&5
13863echo "${ECHO_T}no" >&6
13864
13865fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013866rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013867echo "$as_me:$LINENO: checking for fchdir" >&5
13868echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13869cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013870/* confdefs.h. */
13871_ACEOF
13872cat confdefs.h >>conftest.$ac_ext
13873cat >>conftest.$ac_ext <<_ACEOF
13874/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013875#include <unistd.h>
13876int
13877main ()
13878{
13879void *x=fchdir
13880 ;
13881 return 0;
13882}
13883_ACEOF
13884rm -f conftest.$ac_objext
13885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013886 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013888 grep -v '^ *+' conftest.er1 >conftest.err
13889 rm -f conftest.er1
13890 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13892 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013893 { ac_try='test -z "$ac_c_werror_flag"
13894 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13896 (eval $ac_try) 2>&5
13897 ac_status=$?
13898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13899 (exit $ac_status); }; } &&
13900 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13902 (eval $ac_try) 2>&5
13903 ac_status=$?
13904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13905 (exit $ac_status); }; }; then
13906
13907cat >>confdefs.h <<\_ACEOF
13908#define HAVE_FCHDIR 1
13909_ACEOF
13910
13911 echo "$as_me:$LINENO: result: yes" >&5
13912echo "${ECHO_T}yes" >&6
13913else
13914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013915sed 's/^/| /' conftest.$ac_ext >&5
13916
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013917echo "$as_me:$LINENO: result: no" >&5
13918echo "${ECHO_T}no" >&6
13919
13920fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013921rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013922echo "$as_me:$LINENO: checking for fsync" >&5
13923echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13924cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013925/* confdefs.h. */
13926_ACEOF
13927cat confdefs.h >>conftest.$ac_ext
13928cat >>conftest.$ac_ext <<_ACEOF
13929/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013930#include <unistd.h>
13931int
13932main ()
13933{
13934void *x=fsync
13935 ;
13936 return 0;
13937}
13938_ACEOF
13939rm -f conftest.$ac_objext
13940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013941 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013943 grep -v '^ *+' conftest.er1 >conftest.err
13944 rm -f conftest.er1
13945 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13947 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013948 { ac_try='test -z "$ac_c_werror_flag"
13949 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13951 (eval $ac_try) 2>&5
13952 ac_status=$?
13953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13954 (exit $ac_status); }; } &&
13955 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13957 (eval $ac_try) 2>&5
13958 ac_status=$?
13959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13960 (exit $ac_status); }; }; then
13961
13962cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013963#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013964_ACEOF
13965
13966 echo "$as_me:$LINENO: result: yes" >&5
13967echo "${ECHO_T}yes" >&6
13968else
13969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013970sed 's/^/| /' conftest.$ac_ext >&5
13971
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013972echo "$as_me:$LINENO: result: no" >&5
13973echo "${ECHO_T}no" >&6
13974
13975fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013977echo "$as_me:$LINENO: checking for fdatasync" >&5
13978echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13979cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013980/* confdefs.h. */
13981_ACEOF
13982cat confdefs.h >>conftest.$ac_ext
13983cat >>conftest.$ac_ext <<_ACEOF
13984/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013985#include <unistd.h>
13986int
13987main ()
13988{
13989void *x=fdatasync
13990 ;
13991 return 0;
13992}
13993_ACEOF
13994rm -f conftest.$ac_objext
13995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013996 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013998 grep -v '^ *+' conftest.er1 >conftest.err
13999 rm -f conftest.er1
14000 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14002 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014003 { ac_try='test -z "$ac_c_werror_flag"
14004 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14006 (eval $ac_try) 2>&5
14007 ac_status=$?
14008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14009 (exit $ac_status); }; } &&
14010 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14012 (eval $ac_try) 2>&5
14013 ac_status=$?
14014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14015 (exit $ac_status); }; }; then
14016
14017cat >>confdefs.h <<\_ACEOF
14018#define HAVE_FDATASYNC 1
14019_ACEOF
14020
14021 echo "$as_me:$LINENO: result: yes" >&5
14022echo "${ECHO_T}yes" >&6
14023else
14024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014025sed 's/^/| /' conftest.$ac_ext >&5
14026
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014027echo "$as_me:$LINENO: result: no" >&5
14028echo "${ECHO_T}no" >&6
14029
14030fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014032
Martin v. Löwisd5843682002-11-21 20:41:28 +000014033# On some systems (eg. FreeBSD 5), we would find a definition of the
14034# functions ctermid_r, setgroups in the library, but no prototype
14035# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14036# address to avoid compiler warnings and potential miscompilations
14037# because of the missing prototypes.
14038
14039echo "$as_me:$LINENO: checking for ctermid_r" >&5
14040echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
14041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014042/* confdefs.h. */
14043_ACEOF
14044cat confdefs.h >>conftest.$ac_ext
14045cat >>conftest.$ac_ext <<_ACEOF
14046/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014047
14048#include "confdefs.h"
14049#include <stdio.h>
14050
Martin v. Löwisd5843682002-11-21 20:41:28 +000014051int
14052main ()
14053{
14054void* p = ctermid_r
14055 ;
14056 return 0;
14057}
14058_ACEOF
14059rm -f conftest.$ac_objext
14060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014061 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014063 grep -v '^ *+' conftest.er1 >conftest.err
14064 rm -f conftest.er1
14065 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14067 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014068 { ac_try='test -z "$ac_c_werror_flag"
14069 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14071 (eval $ac_try) 2>&5
14072 ac_status=$?
14073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14074 (exit $ac_status); }; } &&
14075 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14077 (eval $ac_try) 2>&5
14078 ac_status=$?
14079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14080 (exit $ac_status); }; }; then
14081
14082cat >>confdefs.h <<\_ACEOF
14083#define HAVE_CTERMID_R 1
14084_ACEOF
14085
14086 echo "$as_me:$LINENO: result: yes" >&5
14087echo "${ECHO_T}yes" >&6
14088else
14089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014090sed 's/^/| /' conftest.$ac_ext >&5
14091
Martin v. Löwisd5843682002-11-21 20:41:28 +000014092echo "$as_me:$LINENO: result: no" >&5
14093echo "${ECHO_T}no" >&6
14094
14095fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014096rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014097
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014098echo "$as_me:$LINENO: checking for flock" >&5
14099echo $ECHO_N "checking for flock... $ECHO_C" >&6
14100cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014101/* confdefs.h. */
14102_ACEOF
14103cat confdefs.h >>conftest.$ac_ext
14104cat >>conftest.$ac_ext <<_ACEOF
14105/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014106
14107#include "confdefs.h"
14108#include <sys/file.h>
14109
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014110int
14111main ()
14112{
14113void* p = flock
14114 ;
14115 return 0;
14116}
14117_ACEOF
14118rm -f conftest.$ac_objext
14119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014120 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014122 grep -v '^ *+' conftest.er1 >conftest.err
14123 rm -f conftest.er1
14124 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14126 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014127 { ac_try='test -z "$ac_c_werror_flag"
14128 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14130 (eval $ac_try) 2>&5
14131 ac_status=$?
14132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14133 (exit $ac_status); }; } &&
14134 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14136 (eval $ac_try) 2>&5
14137 ac_status=$?
14138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14139 (exit $ac_status); }; }; then
14140
14141cat >>confdefs.h <<\_ACEOF
14142#define HAVE_FLOCK 1
14143_ACEOF
14144
14145 echo "$as_me:$LINENO: result: yes" >&5
14146echo "${ECHO_T}yes" >&6
14147else
14148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014149sed 's/^/| /' conftest.$ac_ext >&5
14150
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014151echo "$as_me:$LINENO: result: no" >&5
14152echo "${ECHO_T}no" >&6
14153
14154fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014155rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014156
14157echo "$as_me:$LINENO: checking for getpagesize" >&5
14158echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014160/* confdefs.h. */
14161_ACEOF
14162cat confdefs.h >>conftest.$ac_ext
14163cat >>conftest.$ac_ext <<_ACEOF
14164/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014165
14166#include "confdefs.h"
14167#include <unistd.h>
14168
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014169int
14170main ()
14171{
14172void* p = getpagesize
14173 ;
14174 return 0;
14175}
14176_ACEOF
14177rm -f conftest.$ac_objext
14178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014179 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014181 grep -v '^ *+' conftest.er1 >conftest.err
14182 rm -f conftest.er1
14183 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014186 { ac_try='test -z "$ac_c_werror_flag"
14187 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14189 (eval $ac_try) 2>&5
14190 ac_status=$?
14191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14192 (exit $ac_status); }; } &&
14193 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14195 (eval $ac_try) 2>&5
14196 ac_status=$?
14197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14198 (exit $ac_status); }; }; then
14199
14200cat >>confdefs.h <<\_ACEOF
14201#define HAVE_GETPAGESIZE 1
14202_ACEOF
14203
14204 echo "$as_me:$LINENO: result: yes" >&5
14205echo "${ECHO_T}yes" >&6
14206else
14207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014208sed 's/^/| /' conftest.$ac_ext >&5
14209
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014210echo "$as_me:$LINENO: result: no" >&5
14211echo "${ECHO_T}no" >&6
14212
14213fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014215
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014216for ac_prog in true
14217do
14218 # Extract the first word of "$ac_prog", so it can be a program name with args.
14219set dummy $ac_prog; ac_word=$2
14220echo "$as_me:$LINENO: checking for $ac_word" >&5
14221echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14222if test "${ac_cv_prog_TRUE+set}" = set; then
14223 echo $ECHO_N "(cached) $ECHO_C" >&6
14224else
14225 if test -n "$TRUE"; then
14226 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14227else
14228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14229for as_dir in $PATH
14230do
14231 IFS=$as_save_IFS
14232 test -z "$as_dir" && as_dir=.
14233 for ac_exec_ext in '' $ac_executable_extensions; do
14234 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14235 ac_cv_prog_TRUE="$ac_prog"
14236 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14237 break 2
14238 fi
14239done
14240done
14241
14242fi
14243fi
14244TRUE=$ac_cv_prog_TRUE
14245if test -n "$TRUE"; then
14246 echo "$as_me:$LINENO: result: $TRUE" >&5
14247echo "${ECHO_T}$TRUE" >&6
14248else
14249 echo "$as_me:$LINENO: result: no" >&5
14250echo "${ECHO_T}no" >&6
14251fi
14252
14253 test -n "$TRUE" && break
14254done
14255test -n "$TRUE" || TRUE="/bin/true"
14256
14257
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014258echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14259echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14260if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14261 echo $ECHO_N "(cached) $ECHO_C" >&6
14262else
14263 ac_check_lib_save_LIBS=$LIBS
14264LIBS="-lc $LIBS"
14265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014266/* confdefs.h. */
14267_ACEOF
14268cat confdefs.h >>conftest.$ac_ext
14269cat >>conftest.$ac_ext <<_ACEOF
14270/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014271
14272/* Override any gcc2 internal prototype to avoid an error. */
14273#ifdef __cplusplus
14274extern "C"
14275#endif
14276/* We use char because int might match the return type of a gcc2
14277 builtin and then its argument prototype would still apply. */
14278char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014279int
14280main ()
14281{
14282inet_aton ();
14283 ;
14284 return 0;
14285}
14286_ACEOF
14287rm -f conftest.$ac_objext conftest$ac_exeext
14288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014289 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014291 grep -v '^ *+' conftest.er1 >conftest.err
14292 rm -f conftest.er1
14293 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14295 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014296 { ac_try='test -z "$ac_c_werror_flag"
14297 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14299 (eval $ac_try) 2>&5
14300 ac_status=$?
14301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14302 (exit $ac_status); }; } &&
14303 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14305 (eval $ac_try) 2>&5
14306 ac_status=$?
14307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14308 (exit $ac_status); }; }; then
14309 ac_cv_lib_c_inet_aton=yes
14310else
14311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014312sed 's/^/| /' conftest.$ac_ext >&5
14313
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014314ac_cv_lib_c_inet_aton=no
14315fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014316rm -f conftest.err conftest.$ac_objext \
14317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014318LIBS=$ac_check_lib_save_LIBS
14319fi
14320echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14321echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14322if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014323 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014324else
14325
14326echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14327echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14328if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14329 echo $ECHO_N "(cached) $ECHO_C" >&6
14330else
14331 ac_check_lib_save_LIBS=$LIBS
14332LIBS="-lresolv $LIBS"
14333cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014334/* confdefs.h. */
14335_ACEOF
14336cat confdefs.h >>conftest.$ac_ext
14337cat >>conftest.$ac_ext <<_ACEOF
14338/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014339
14340/* Override any gcc2 internal prototype to avoid an error. */
14341#ifdef __cplusplus
14342extern "C"
14343#endif
14344/* We use char because int might match the return type of a gcc2
14345 builtin and then its argument prototype would still apply. */
14346char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014347int
14348main ()
14349{
14350inet_aton ();
14351 ;
14352 return 0;
14353}
14354_ACEOF
14355rm -f conftest.$ac_objext conftest$ac_exeext
14356if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014357 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014359 grep -v '^ *+' conftest.er1 >conftest.err
14360 rm -f conftest.er1
14361 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014364 { ac_try='test -z "$ac_c_werror_flag"
14365 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14367 (eval $ac_try) 2>&5
14368 ac_status=$?
14369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14370 (exit $ac_status); }; } &&
14371 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14373 (eval $ac_try) 2>&5
14374 ac_status=$?
14375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14376 (exit $ac_status); }; }; then
14377 ac_cv_lib_resolv_inet_aton=yes
14378else
14379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014380sed 's/^/| /' conftest.$ac_ext >&5
14381
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014382ac_cv_lib_resolv_inet_aton=no
14383fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014384rm -f conftest.err conftest.$ac_objext \
14385 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014386LIBS=$ac_check_lib_save_LIBS
14387fi
14388echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14389echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14390if test $ac_cv_lib_resolv_inet_aton = yes; then
14391 cat >>confdefs.h <<_ACEOF
14392#define HAVE_LIBRESOLV 1
14393_ACEOF
14394
14395 LIBS="-lresolv $LIBS"
14396
14397fi
14398
14399
14400fi
14401
14402
Martin v. Löwise9416172003-05-03 10:12:45 +000014403echo "$as_me:$LINENO: checking for hstrerror" >&5
14404echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14405cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014406/* confdefs.h. */
14407_ACEOF
14408cat confdefs.h >>conftest.$ac_ext
14409cat >>conftest.$ac_ext <<_ACEOF
14410/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014411
14412#include "confdefs.h"
14413#include <netdb.h>
14414
Martin v. Löwise9416172003-05-03 10:12:45 +000014415int
14416main ()
14417{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014418void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014419 ;
14420 return 0;
14421}
14422_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014423rm -f conftest.$ac_objext conftest$ac_exeext
14424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014425 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014427 grep -v '^ *+' conftest.er1 >conftest.err
14428 rm -f conftest.er1
14429 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14431 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014432 { ac_try='test -z "$ac_c_werror_flag"
14433 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14435 (eval $ac_try) 2>&5
14436 ac_status=$?
14437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14438 (exit $ac_status); }; } &&
14439 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14441 (eval $ac_try) 2>&5
14442 ac_status=$?
14443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14444 (exit $ac_status); }; }; then
14445
14446cat >>confdefs.h <<\_ACEOF
14447#define HAVE_HSTRERROR 1
14448_ACEOF
14449
14450 echo "$as_me:$LINENO: result: yes" >&5
14451echo "${ECHO_T}yes" >&6
14452else
14453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014454sed 's/^/| /' conftest.$ac_ext >&5
14455
Martin v. Löwise9416172003-05-03 10:12:45 +000014456echo "$as_me:$LINENO: result: no" >&5
14457echo "${ECHO_T}no" >&6
14458
14459fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014460rm -f conftest.err conftest.$ac_objext \
14461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014462
14463echo "$as_me:$LINENO: checking for inet_aton" >&5
14464echo $ECHO_N "checking for inet_aton... $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öwise9416172003-05-03 10:12:45 +000014471
14472#include "confdefs.h"
14473#include <sys/socket.h>
14474#include <netinet/in.h>
14475#include <arpa/inet.h>
14476
Martin v. Löwise9416172003-05-03 10:12:45 +000014477int
14478main ()
14479{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014480void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014481 ;
14482 return 0;
14483}
14484_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014485rm -f conftest.$ac_objext conftest$ac_exeext
14486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014487 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014489 grep -v '^ *+' conftest.er1 >conftest.err
14490 rm -f conftest.er1
14491 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14493 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014494 { ac_try='test -z "$ac_c_werror_flag"
14495 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14497 (eval $ac_try) 2>&5
14498 ac_status=$?
14499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14500 (exit $ac_status); }; } &&
14501 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14503 (eval $ac_try) 2>&5
14504 ac_status=$?
14505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14506 (exit $ac_status); }; }; then
14507
14508cat >>confdefs.h <<\_ACEOF
14509#define HAVE_INET_ATON 1
14510_ACEOF
14511
14512 echo "$as_me:$LINENO: result: yes" >&5
14513echo "${ECHO_T}yes" >&6
14514else
14515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014516sed 's/^/| /' conftest.$ac_ext >&5
14517
Martin v. Löwise9416172003-05-03 10:12:45 +000014518echo "$as_me:$LINENO: result: no" >&5
14519echo "${ECHO_T}no" >&6
14520
14521fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014522rm -f conftest.err conftest.$ac_objext \
14523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014524
14525echo "$as_me:$LINENO: checking for inet_pton" >&5
14526echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14527cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014528/* confdefs.h. */
14529_ACEOF
14530cat confdefs.h >>conftest.$ac_ext
14531cat >>conftest.$ac_ext <<_ACEOF
14532/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014533
14534#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014535#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014536#include <sys/socket.h>
14537#include <netinet/in.h>
14538#include <arpa/inet.h>
14539
Martin v. Löwise9416172003-05-03 10:12:45 +000014540int
14541main ()
14542{
14543void* p = inet_pton
14544 ;
14545 return 0;
14546}
14547_ACEOF
14548rm -f conftest.$ac_objext
14549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014550 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014552 grep -v '^ *+' conftest.er1 >conftest.err
14553 rm -f conftest.er1
14554 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14556 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014557 { ac_try='test -z "$ac_c_werror_flag"
14558 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14560 (eval $ac_try) 2>&5
14561 ac_status=$?
14562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14563 (exit $ac_status); }; } &&
14564 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14566 (eval $ac_try) 2>&5
14567 ac_status=$?
14568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14569 (exit $ac_status); }; }; then
14570
14571cat >>confdefs.h <<\_ACEOF
14572#define HAVE_INET_PTON 1
14573_ACEOF
14574
14575 echo "$as_me:$LINENO: result: yes" >&5
14576echo "${ECHO_T}yes" >&6
14577else
14578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014579sed 's/^/| /' conftest.$ac_ext >&5
14580
Martin v. Löwise9416172003-05-03 10:12:45 +000014581echo "$as_me:$LINENO: result: no" >&5
14582echo "${ECHO_T}no" >&6
14583
14584fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014586
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014587# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014588echo "$as_me:$LINENO: checking for setgroups" >&5
14589echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14590cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014591/* confdefs.h. */
14592_ACEOF
14593cat confdefs.h >>conftest.$ac_ext
14594cat >>conftest.$ac_ext <<_ACEOF
14595/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014596
14597#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014598#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014599#ifdef HAVE_GRP_H
14600#include <grp.h>
14601#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014602
Martin v. Löwisd5843682002-11-21 20:41:28 +000014603int
14604main ()
14605{
14606void* p = setgroups
14607 ;
14608 return 0;
14609}
14610_ACEOF
14611rm -f conftest.$ac_objext
14612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014613 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014615 grep -v '^ *+' conftest.er1 >conftest.err
14616 rm -f conftest.er1
14617 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14619 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014620 { ac_try='test -z "$ac_c_werror_flag"
14621 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14623 (eval $ac_try) 2>&5
14624 ac_status=$?
14625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14626 (exit $ac_status); }; } &&
14627 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14629 (eval $ac_try) 2>&5
14630 ac_status=$?
14631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14632 (exit $ac_status); }; }; then
14633
14634cat >>confdefs.h <<\_ACEOF
14635#define HAVE_SETGROUPS 1
14636_ACEOF
14637
14638 echo "$as_me:$LINENO: result: yes" >&5
14639echo "${ECHO_T}yes" >&6
14640else
14641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014642sed 's/^/| /' conftest.$ac_ext >&5
14643
Martin v. Löwisd5843682002-11-21 20:41:28 +000014644echo "$as_me:$LINENO: result: no" >&5
14645echo "${ECHO_T}no" >&6
14646
14647fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014648rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014649
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014650# check for openpty and forkpty
14651
Martin v. Löwis11437992002-04-12 09:54:03 +000014652
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014653for ac_func in openpty
14654do
Martin v. Löwis11437992002-04-12 09:54:03 +000014655as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14656echo "$as_me:$LINENO: checking for $ac_func" >&5
14657echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14658if eval "test \"\${$as_ac_var+set}\" = set"; then
14659 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014660else
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014662/* confdefs.h. */
14663_ACEOF
14664cat confdefs.h >>conftest.$ac_ext
14665cat >>conftest.$ac_ext <<_ACEOF
14666/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014667/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014668 which can conflict with char $ac_func (); below.
14669 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014670 <limits.h> exists even on freestanding compilers. Under hpux,
14671 including <limits.h> includes <sys/time.h> and causes problems
14672 checking for functions defined therein. */
14673#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014674# include <limits.h>
14675#else
14676# include <assert.h>
14677#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014678/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014679#ifdef __cplusplus
14680extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014681{
Martin v. Löwis11437992002-04-12 09:54:03 +000014682#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014683/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014684 builtin and then its argument prototype would still apply. */
14685char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014686/* The GNU C library defines this for functions which it implements
14687 to always fail with ENOSYS. Some functions are actually named
14688 something starting with __ and the normal name is an alias. */
14689#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14690choke me
14691#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014692char (*f) () = $ac_func;
14693#endif
14694#ifdef __cplusplus
14695}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014696#endif
14697
Skip Montanaro6dead952003-09-25 14:50:04 +000014698int
14699main ()
14700{
14701return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014702 ;
14703 return 0;
14704}
14705_ACEOF
14706rm -f conftest.$ac_objext conftest$ac_exeext
14707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014708 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014710 grep -v '^ *+' conftest.er1 >conftest.err
14711 rm -f conftest.er1
14712 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14714 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014715 { ac_try='test -z "$ac_c_werror_flag"
14716 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14718 (eval $ac_try) 2>&5
14719 ac_status=$?
14720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14721 (exit $ac_status); }; } &&
14722 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14724 (eval $ac_try) 2>&5
14725 ac_status=$?
14726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727 (exit $ac_status); }; }; then
14728 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014729else
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014731sed 's/^/| /' conftest.$ac_ext >&5
14732
Martin v. Löwis11437992002-04-12 09:54:03 +000014733eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014734fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014735rm -f conftest.err conftest.$ac_objext \
14736 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014738echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14739echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14740if test `eval echo '${'$as_ac_var'}'` = yes; then
14741 cat >>confdefs.h <<_ACEOF
14742#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14743_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014744
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014745else
Martin v. Löwis11437992002-04-12 09:54:03 +000014746 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14747echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14748if test "${ac_cv_lib_util_openpty+set}" = set; then
14749 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014750else
Martin v. Löwis11437992002-04-12 09:54:03 +000014751 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014752LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014754/* confdefs.h. */
14755_ACEOF
14756cat confdefs.h >>conftest.$ac_ext
14757cat >>conftest.$ac_ext <<_ACEOF
14758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014759
Fred Drake8cef4cf2000-06-28 16:40:38 +000014760/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014761#ifdef __cplusplus
14762extern "C"
14763#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014764/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 builtin and then its argument prototype would still apply. */
14766char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014767int
14768main ()
14769{
14770openpty ();
14771 ;
14772 return 0;
14773}
14774_ACEOF
14775rm -f conftest.$ac_objext conftest$ac_exeext
14776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014777 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014779 grep -v '^ *+' conftest.er1 >conftest.err
14780 rm -f conftest.er1
14781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14783 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014784 { ac_try='test -z "$ac_c_werror_flag"
14785 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14787 (eval $ac_try) 2>&5
14788 ac_status=$?
14789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14790 (exit $ac_status); }; } &&
14791 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14793 (eval $ac_try) 2>&5
14794 ac_status=$?
14795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796 (exit $ac_status); }; }; then
14797 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014798else
Martin v. Löwis11437992002-04-12 09:54:03 +000014799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014800sed 's/^/| /' conftest.$ac_ext >&5
14801
Martin v. Löwis11437992002-04-12 09:54:03 +000014802ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014803fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014804rm -f conftest.err conftest.$ac_objext \
14805 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014806LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014808echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14809echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14810if test $ac_cv_lib_util_openpty = yes; then
14811 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014812#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014813_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014814 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014815else
14816 echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
14817echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6
14818if test "${ac_cv_lib_bsd_openpty+set}" = set; then
14819 echo $ECHO_N "(cached) $ECHO_C" >&6
14820else
14821 ac_check_lib_save_LIBS=$LIBS
14822LIBS="-lbsd $LIBS"
14823cat >conftest.$ac_ext <<_ACEOF
14824/* confdefs.h. */
14825_ACEOF
14826cat confdefs.h >>conftest.$ac_ext
14827cat >>conftest.$ac_ext <<_ACEOF
14828/* end confdefs.h. */
14829
14830/* Override any gcc2 internal prototype to avoid an error. */
14831#ifdef __cplusplus
14832extern "C"
14833#endif
14834/* We use char because int might match the return type of a gcc2
14835 builtin and then its argument prototype would still apply. */
14836char openpty ();
14837int
14838main ()
14839{
14840openpty ();
14841 ;
14842 return 0;
14843}
14844_ACEOF
14845rm -f conftest.$ac_objext conftest$ac_exeext
14846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14847 (eval $ac_link) 2>conftest.er1
14848 ac_status=$?
14849 grep -v '^ *+' conftest.er1 >conftest.err
14850 rm -f conftest.er1
14851 cat conftest.err >&5
14852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853 (exit $ac_status); } &&
14854 { ac_try='test -z "$ac_c_werror_flag"
14855 || test ! -s conftest.err'
14856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14857 (eval $ac_try) 2>&5
14858 ac_status=$?
14859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860 (exit $ac_status); }; } &&
14861 { ac_try='test -s conftest$ac_exeext'
14862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14863 (eval $ac_try) 2>&5
14864 ac_status=$?
14865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14866 (exit $ac_status); }; }; then
14867 ac_cv_lib_bsd_openpty=yes
14868else
14869 echo "$as_me: failed program was:" >&5
14870sed 's/^/| /' conftest.$ac_ext >&5
14871
14872ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014873fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014874rm -f conftest.err conftest.$ac_objext \
14875 conftest$ac_exeext conftest.$ac_ext
14876LIBS=$ac_check_lib_save_LIBS
14877fi
14878echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
14879echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6
14880if test $ac_cv_lib_bsd_openpty = yes; then
14881 cat >>confdefs.h <<\_ACEOF
14882#define HAVE_OPENPTY 1
14883_ACEOF
14884 LIBS="$LIBS -lbsd"
14885fi
14886
14887
14888fi
14889
Fred Drake8cef4cf2000-06-28 16:40:38 +000014890
14891fi
14892done
14893
Martin v. Löwis11437992002-04-12 09:54:03 +000014894
Fred Drake8cef4cf2000-06-28 16:40:38 +000014895for ac_func in forkpty
14896do
Martin v. Löwis11437992002-04-12 09:54:03 +000014897as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14898echo "$as_me:$LINENO: checking for $ac_func" >&5
14899echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14900if eval "test \"\${$as_ac_var+set}\" = set"; then
14901 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014902else
Martin v. Löwis11437992002-04-12 09:54:03 +000014903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014904/* confdefs.h. */
14905_ACEOF
14906cat confdefs.h >>conftest.$ac_ext
14907cat >>conftest.$ac_ext <<_ACEOF
14908/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014909/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014910 which can conflict with char $ac_func (); below.
14911 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014912 <limits.h> exists even on freestanding compilers. Under hpux,
14913 including <limits.h> includes <sys/time.h> and causes problems
14914 checking for functions defined therein. */
14915#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014916# include <limits.h>
14917#else
14918# include <assert.h>
14919#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014920/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014921#ifdef __cplusplus
14922extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014923{
Martin v. Löwis11437992002-04-12 09:54:03 +000014924#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014925/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 builtin and then its argument prototype would still apply. */
14927char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014928/* The GNU C library defines this for functions which it implements
14929 to always fail with ENOSYS. Some functions are actually named
14930 something starting with __ and the normal name is an alias. */
14931#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14932choke me
14933#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014934char (*f) () = $ac_func;
14935#endif
14936#ifdef __cplusplus
14937}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014938#endif
14939
Skip Montanaro6dead952003-09-25 14:50:04 +000014940int
14941main ()
14942{
14943return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014944 ;
14945 return 0;
14946}
14947_ACEOF
14948rm -f conftest.$ac_objext conftest$ac_exeext
14949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014950 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014952 grep -v '^ *+' conftest.er1 >conftest.err
14953 rm -f conftest.er1
14954 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14956 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014957 { ac_try='test -z "$ac_c_werror_flag"
14958 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14960 (eval $ac_try) 2>&5
14961 ac_status=$?
14962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14963 (exit $ac_status); }; } &&
14964 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14966 (eval $ac_try) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); }; }; then
14970 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014971else
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014973sed 's/^/| /' conftest.$ac_ext >&5
14974
Martin v. Löwis11437992002-04-12 09:54:03 +000014975eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014976fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014977rm -f conftest.err conftest.$ac_objext \
14978 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014979fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014980echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14981echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14982if test `eval echo '${'$as_ac_var'}'` = yes; then
14983 cat >>confdefs.h <<_ACEOF
14984#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14985_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014986
Fred Drake8cef4cf2000-06-28 16:40:38 +000014987else
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14989echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14990if test "${ac_cv_lib_util_forkpty+set}" = set; then
14991 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014992else
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014994LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014996/* confdefs.h. */
14997_ACEOF
14998cat confdefs.h >>conftest.$ac_ext
14999cat >>conftest.$ac_ext <<_ACEOF
15000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015001
Fred Drake8cef4cf2000-06-28 16:40:38 +000015002/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015003#ifdef __cplusplus
15004extern "C"
15005#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015006/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 builtin and then its argument prototype would still apply. */
15008char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015009int
15010main ()
15011{
15012forkpty ();
15013 ;
15014 return 0;
15015}
15016_ACEOF
15017rm -f conftest.$ac_objext conftest$ac_exeext
15018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015019 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015021 grep -v '^ *+' conftest.er1 >conftest.err
15022 rm -f conftest.er1
15023 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15025 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015026 { ac_try='test -z "$ac_c_werror_flag"
15027 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
15033 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15035 (eval $ac_try) 2>&5
15036 ac_status=$?
15037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15038 (exit $ac_status); }; }; then
15039 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015040else
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015042sed 's/^/| /' conftest.$ac_ext >&5
15043
Martin v. Löwis11437992002-04-12 09:54:03 +000015044ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015045fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015046rm -f conftest.err conftest.$ac_objext \
15047 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015048LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015050echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
15051echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
15052if test $ac_cv_lib_util_forkpty = yes; then
15053 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015054#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015055_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015056 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015057else
15058 echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
15059echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6
15060if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
15061 echo $ECHO_N "(cached) $ECHO_C" >&6
15062else
15063 ac_check_lib_save_LIBS=$LIBS
15064LIBS="-lbsd $LIBS"
15065cat >conftest.$ac_ext <<_ACEOF
15066/* confdefs.h. */
15067_ACEOF
15068cat confdefs.h >>conftest.$ac_ext
15069cat >>conftest.$ac_ext <<_ACEOF
15070/* end confdefs.h. */
15071
15072/* Override any gcc2 internal prototype to avoid an error. */
15073#ifdef __cplusplus
15074extern "C"
15075#endif
15076/* We use char because int might match the return type of a gcc2
15077 builtin and then its argument prototype would still apply. */
15078char forkpty ();
15079int
15080main ()
15081{
15082forkpty ();
15083 ;
15084 return 0;
15085}
15086_ACEOF
15087rm -f conftest.$ac_objext conftest$ac_exeext
15088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15089 (eval $ac_link) 2>conftest.er1
15090 ac_status=$?
15091 grep -v '^ *+' conftest.er1 >conftest.err
15092 rm -f conftest.er1
15093 cat conftest.err >&5
15094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15095 (exit $ac_status); } &&
15096 { ac_try='test -z "$ac_c_werror_flag"
15097 || test ! -s conftest.err'
15098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15099 (eval $ac_try) 2>&5
15100 ac_status=$?
15101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15102 (exit $ac_status); }; } &&
15103 { ac_try='test -s conftest$ac_exeext'
15104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15105 (eval $ac_try) 2>&5
15106 ac_status=$?
15107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15108 (exit $ac_status); }; }; then
15109 ac_cv_lib_bsd_forkpty=yes
15110else
15111 echo "$as_me: failed program was:" >&5
15112sed 's/^/| /' conftest.$ac_ext >&5
15113
15114ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015115fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015116rm -f conftest.err conftest.$ac_objext \
15117 conftest$ac_exeext conftest.$ac_ext
15118LIBS=$ac_check_lib_save_LIBS
15119fi
15120echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
15121echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6
15122if test $ac_cv_lib_bsd_forkpty = yes; then
15123 cat >>confdefs.h <<\_ACEOF
15124#define HAVE_FORKPTY 1
15125_ACEOF
15126 LIBS="$LIBS -lbsd"
15127fi
15128
15129
15130fi
15131
Fred Drake8cef4cf2000-06-28 16:40:38 +000015132
15133fi
15134done
15135
Jack Jansendd19cf82001-12-06 22:36:17 +000015136
Michael W. Hudson54241132001-12-07 15:38:26 +000015137# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
15139
15140
15141
15142
15143
Fred Drake8cef4cf2000-06-28 16:40:38 +000015144for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
15145do
Martin v. Löwis11437992002-04-12 09:54:03 +000015146as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15147echo "$as_me:$LINENO: checking for $ac_func" >&5
15148echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15149if eval "test \"\${$as_ac_var+set}\" = set"; then
15150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015151else
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015153/* confdefs.h. */
15154_ACEOF
15155cat confdefs.h >>conftest.$ac_ext
15156cat >>conftest.$ac_ext <<_ACEOF
15157/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015158/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015159 which can conflict with char $ac_func (); below.
15160 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015161 <limits.h> exists even on freestanding compilers. Under hpux,
15162 including <limits.h> includes <sys/time.h> and causes problems
15163 checking for functions defined therein. */
15164#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015165# include <limits.h>
15166#else
15167# include <assert.h>
15168#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015169/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015170#ifdef __cplusplus
15171extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015172{
Martin v. Löwis11437992002-04-12 09:54:03 +000015173#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015174/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 builtin and then its argument prototype would still apply. */
15176char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015177/* The GNU C library defines this for functions which it implements
15178 to always fail with ENOSYS. Some functions are actually named
15179 something starting with __ and the normal name is an alias. */
15180#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15181choke me
15182#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015183char (*f) () = $ac_func;
15184#endif
15185#ifdef __cplusplus
15186}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015187#endif
15188
Skip Montanaro6dead952003-09-25 14:50:04 +000015189int
15190main ()
15191{
15192return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 ;
15194 return 0;
15195}
15196_ACEOF
15197rm -f conftest.$ac_objext conftest$ac_exeext
15198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015199 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015201 grep -v '^ *+' conftest.er1 >conftest.err
15202 rm -f conftest.er1
15203 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15205 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015206 { ac_try='test -z "$ac_c_werror_flag"
15207 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15209 (eval $ac_try) 2>&5
15210 ac_status=$?
15211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15212 (exit $ac_status); }; } &&
15213 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15215 (eval $ac_try) 2>&5
15216 ac_status=$?
15217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15218 (exit $ac_status); }; }; then
15219 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015220else
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015222sed 's/^/| /' conftest.$ac_ext >&5
15223
Martin v. Löwis11437992002-04-12 09:54:03 +000015224eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015225fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015226rm -f conftest.err conftest.$ac_objext \
15227 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015229echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15230echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15231if test `eval echo '${'$as_ac_var'}'` = yes; then
15232 cat >>confdefs.h <<_ACEOF
15233#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15234_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015235
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015236fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015237done
15238
Michael W. Hudson54241132001-12-07 15:38:26 +000015239
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
15241
15242
15243
15244
Martin v. Löwis1142de32002-03-29 16:28:31 +000015245for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000015246do
Martin v. Löwis11437992002-04-12 09:54:03 +000015247as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15248echo "$as_me:$LINENO: checking for $ac_func" >&5
15249echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15250if eval "test \"\${$as_ac_var+set}\" = set"; then
15251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015254/* confdefs.h. */
15255_ACEOF
15256cat confdefs.h >>conftest.$ac_ext
15257cat >>conftest.$ac_ext <<_ACEOF
15258/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015259/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015260 which can conflict with char $ac_func (); below.
15261 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015262 <limits.h> exists even on freestanding compilers. Under hpux,
15263 including <limits.h> includes <sys/time.h> and causes problems
15264 checking for functions defined therein. */
15265#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015266# include <limits.h>
15267#else
15268# include <assert.h>
15269#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015270/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015271#ifdef __cplusplus
15272extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015273{
Martin v. Löwis11437992002-04-12 09:54:03 +000015274#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015275/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 builtin and then its argument prototype would still apply. */
15277char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015278/* The GNU C library defines this for functions which it implements
15279 to always fail with ENOSYS. Some functions are actually named
15280 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015281#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015282choke me
15283#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015284char (*f) () = $ac_func;
15285#endif
15286#ifdef __cplusplus
15287}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015288#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015289
Skip Montanaro6dead952003-09-25 14:50:04 +000015290int
15291main ()
15292{
15293return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015294 ;
15295 return 0;
15296}
15297_ACEOF
15298rm -f conftest.$ac_objext conftest$ac_exeext
15299if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015300 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015302 grep -v '^ *+' conftest.er1 >conftest.err
15303 rm -f conftest.er1
15304 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15306 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015307 { ac_try='test -z "$ac_c_werror_flag"
15308 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15310 (eval $ac_try) 2>&5
15311 ac_status=$?
15312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15313 (exit $ac_status); }; } &&
15314 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15316 (eval $ac_try) 2>&5
15317 ac_status=$?
15318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15319 (exit $ac_status); }; }; then
15320 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015321else
Martin v. Löwis11437992002-04-12 09:54:03 +000015322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015323sed 's/^/| /' conftest.$ac_ext >&5
15324
Martin v. Löwis11437992002-04-12 09:54:03 +000015325eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015326fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015327rm -f conftest.err conftest.$ac_objext \
15328 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015330echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15331echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15332if test `eval echo '${'$as_ac_var'}'` = yes; then
15333 cat >>confdefs.h <<_ACEOF
15334#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15335_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015336
Martin v. Löwis1142de32002-03-29 16:28:31 +000015337else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015338 case $LIBOBJS in
15339 "$ac_func.$ac_objext" | \
15340 *" $ac_func.$ac_objext" | \
15341 "$ac_func.$ac_objext "* | \
15342 *" $ac_func.$ac_objext "* ) ;;
15343 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15344esac
15345
Martin v. Löwis1142de32002-03-29 16:28:31 +000015346fi
15347done
15348
15349
Martin v. Löwis11437992002-04-12 09:54:03 +000015350
Martin v. Löwis1142de32002-03-29 16:28:31 +000015351for ac_func in getpgrp
15352do
Martin v. Löwis11437992002-04-12 09:54:03 +000015353as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15354echo "$as_me:$LINENO: checking for $ac_func" >&5
15355echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15356if eval "test \"\${$as_ac_var+set}\" = set"; then
15357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015358else
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015360/* confdefs.h. */
15361_ACEOF
15362cat confdefs.h >>conftest.$ac_ext
15363cat >>conftest.$ac_ext <<_ACEOF
15364/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000015365/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015366 which can conflict with char $ac_func (); below.
15367 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015368 <limits.h> exists even on freestanding compilers. Under hpux,
15369 including <limits.h> includes <sys/time.h> and causes problems
15370 checking for functions defined therein. */
15371#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015372# include <limits.h>
15373#else
15374# include <assert.h>
15375#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015376/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015377#ifdef __cplusplus
15378extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015379{
Martin v. Löwis11437992002-04-12 09:54:03 +000015380#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015381/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015382 builtin and then its argument prototype would still apply. */
15383char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015384/* The GNU C library defines this for functions which it implements
15385 to always fail with ENOSYS. Some functions are actually named
15386 something starting with __ and the normal name is an alias. */
15387#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15388choke me
15389#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015390char (*f) () = $ac_func;
15391#endif
15392#ifdef __cplusplus
15393}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015394#endif
15395
Skip Montanaro6dead952003-09-25 14:50:04 +000015396int
15397main ()
15398{
15399return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015400 ;
15401 return 0;
15402}
15403_ACEOF
15404rm -f conftest.$ac_objext conftest$ac_exeext
15405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015406 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015408 grep -v '^ *+' conftest.er1 >conftest.err
15409 rm -f conftest.er1
15410 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015413 { ac_try='test -z "$ac_c_werror_flag"
15414 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15416 (eval $ac_try) 2>&5
15417 ac_status=$?
15418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15419 (exit $ac_status); }; } &&
15420 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15422 (eval $ac_try) 2>&5
15423 ac_status=$?
15424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15425 (exit $ac_status); }; }; then
15426 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015427else
Martin v. Löwis11437992002-04-12 09:54:03 +000015428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015429sed 's/^/| /' conftest.$ac_ext >&5
15430
Martin v. Löwis11437992002-04-12 09:54:03 +000015431eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015432fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015433rm -f conftest.err conftest.$ac_objext \
15434 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015436echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15437echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15438if test `eval echo '${'$as_ac_var'}'` = yes; then
15439 cat >>confdefs.h <<_ACEOF
15440#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15441_ACEOF
15442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015443/* confdefs.h. */
15444_ACEOF
15445cat confdefs.h >>conftest.$ac_ext
15446cat >>conftest.$ac_ext <<_ACEOF
15447/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015448#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015449int
15450main ()
15451{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015452getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 ;
15454 return 0;
15455}
15456_ACEOF
15457rm -f conftest.$ac_objext
15458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015459 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015461 grep -v '^ *+' conftest.er1 >conftest.err
15462 rm -f conftest.er1
15463 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15465 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015466 { ac_try='test -z "$ac_c_werror_flag"
15467 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15469 (eval $ac_try) 2>&5
15470 ac_status=$?
15471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15472 (exit $ac_status); }; } &&
15473 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15475 (eval $ac_try) 2>&5
15476 ac_status=$?
15477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15478 (exit $ac_status); }; }; then
15479
15480cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015481#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015482_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015483
Martin v. Löwis11437992002-04-12 09:54:03 +000015484
Guido van Rossumf78abae1997-01-21 22:02:36 +000015485else
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015487sed 's/^/| /' conftest.$ac_ext >&5
15488
Guido van Rossum627b2d71993-12-24 10:39:16 +000015489fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015490rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015491
Guido van Rossum627b2d71993-12-24 10:39:16 +000015492fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015493done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015494
Jack Jansen150753c2003-03-29 22:07:47 +000015495
15496for ac_func in setpgrp
15497do
15498as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15499echo "$as_me:$LINENO: checking for $ac_func" >&5
15500echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15501if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015503else
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015505/* confdefs.h. */
15506_ACEOF
15507cat confdefs.h >>conftest.$ac_ext
15508cat >>conftest.$ac_ext <<_ACEOF
15509/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015510/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015511 which can conflict with char $ac_func (); below.
15512 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015513 <limits.h> exists even on freestanding compilers. Under hpux,
15514 including <limits.h> includes <sys/time.h> and causes problems
15515 checking for functions defined therein. */
15516#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015517# include <limits.h>
15518#else
15519# include <assert.h>
15520#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015521/* Override any gcc2 internal prototype to avoid an error. */
15522#ifdef __cplusplus
15523extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015524{
Martin v. Löwis11437992002-04-12 09:54:03 +000015525#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015526/* We use char because int might match the return type of a gcc2
15527 builtin and then its argument prototype would still apply. */
15528char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015529/* The GNU C library defines this for functions which it implements
15530 to always fail with ENOSYS. Some functions are actually named
15531 something starting with __ and the normal name is an alias. */
15532#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15533choke me
15534#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015535char (*f) () = $ac_func;
15536#endif
15537#ifdef __cplusplus
15538}
Jack Jansen150753c2003-03-29 22:07:47 +000015539#endif
15540
Skip Montanaro6dead952003-09-25 14:50:04 +000015541int
15542main ()
15543{
15544return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015545 ;
15546 return 0;
15547}
15548_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015549rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015551 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015553 grep -v '^ *+' conftest.er1 >conftest.err
15554 rm -f conftest.er1
15555 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015557 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015558 { ac_try='test -z "$ac_c_werror_flag"
15559 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15561 (eval $ac_try) 2>&5
15562 ac_status=$?
15563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15564 (exit $ac_status); }; } &&
15565 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15567 (eval $ac_try) 2>&5
15568 ac_status=$?
15569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15570 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015571 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015572else
Jack Jansen150753c2003-03-29 22:07:47 +000015573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015574sed 's/^/| /' conftest.$ac_ext >&5
15575
Jack Jansen150753c2003-03-29 22:07:47 +000015576eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015577fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015578rm -f conftest.err conftest.$ac_objext \
15579 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015580fi
Jack Jansen150753c2003-03-29 22:07:47 +000015581echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15582echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15583if test `eval echo '${'$as_ac_var'}'` = yes; then
15584 cat >>confdefs.h <<_ACEOF
15585#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15586_ACEOF
15587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015588/* confdefs.h. */
15589_ACEOF
15590cat confdefs.h >>conftest.$ac_ext
15591cat >>conftest.$ac_ext <<_ACEOF
15592/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015593#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015594int
15595main ()
15596{
15597setpgrp(0,0);
15598 ;
15599 return 0;
15600}
15601_ACEOF
15602rm -f conftest.$ac_objext
15603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015604 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015606 grep -v '^ *+' conftest.er1 >conftest.err
15607 rm -f conftest.er1
15608 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15610 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015611 { ac_try='test -z "$ac_c_werror_flag"
15612 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15614 (eval $ac_try) 2>&5
15615 ac_status=$?
15616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15617 (exit $ac_status); }; } &&
15618 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000015619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15620 (eval $ac_try) 2>&5
15621 ac_status=$?
15622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15623 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
15625cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015626#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015627_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015628
Jack Jansen150753c2003-03-29 22:07:47 +000015629
15630else
15631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015632sed 's/^/| /' conftest.$ac_ext >&5
15633
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015634fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015636
15637fi
15638done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015639
Martin v. Löwis11437992002-04-12 09:54:03 +000015640
Thomas Wouters3a584202000-08-05 23:28:51 +000015641for ac_func in gettimeofday
15642do
Martin v. Löwis11437992002-04-12 09:54:03 +000015643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15644echo "$as_me:$LINENO: checking for $ac_func" >&5
15645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15646if eval "test \"\${$as_ac_var+set}\" = set"; then
15647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015648else
Martin v. Löwis11437992002-04-12 09:54:03 +000015649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015650/* confdefs.h. */
15651_ACEOF
15652cat confdefs.h >>conftest.$ac_ext
15653cat >>conftest.$ac_ext <<_ACEOF
15654/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015655/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015656 which can conflict with char $ac_func (); below.
15657 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015658 <limits.h> exists even on freestanding compilers. Under hpux,
15659 including <limits.h> includes <sys/time.h> and causes problems
15660 checking for functions defined therein. */
15661#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015662# include <limits.h>
15663#else
15664# include <assert.h>
15665#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015666/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015667#ifdef __cplusplus
15668extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015669{
Martin v. Löwis11437992002-04-12 09:54:03 +000015670#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015671/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 builtin and then its argument prototype would still apply. */
15673char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015674/* The GNU C library defines this for functions which it implements
15675 to always fail with ENOSYS. Some functions are actually named
15676 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015677#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015678choke me
15679#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015680char (*f) () = $ac_func;
15681#endif
15682#ifdef __cplusplus
15683}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015684#endif
15685
Skip Montanaro6dead952003-09-25 14:50:04 +000015686int
15687main ()
15688{
15689return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 ;
15691 return 0;
15692}
15693_ACEOF
15694rm -f conftest.$ac_objext conftest$ac_exeext
15695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015696 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015698 grep -v '^ *+' conftest.er1 >conftest.err
15699 rm -f conftest.er1
15700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15702 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015703 { ac_try='test -z "$ac_c_werror_flag"
15704 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15706 (eval $ac_try) 2>&5
15707 ac_status=$?
15708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15709 (exit $ac_status); }; } &&
15710 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15712 (eval $ac_try) 2>&5
15713 ac_status=$?
15714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715 (exit $ac_status); }; }; then
15716 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015717else
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015719sed 's/^/| /' conftest.$ac_ext >&5
15720
Martin v. Löwis11437992002-04-12 09:54:03 +000015721eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015722fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015723rm -f conftest.err conftest.$ac_objext \
15724 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015725fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015726echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15727echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15728if test `eval echo '${'$as_ac_var'}'` = yes; then
15729 cat >>confdefs.h <<_ACEOF
15730#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15731_ACEOF
15732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015733/* confdefs.h. */
15734_ACEOF
15735cat confdefs.h >>conftest.$ac_ext
15736cat >>conftest.$ac_ext <<_ACEOF
15737/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015738#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015739int
15740main ()
15741{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015742gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 ;
15744 return 0;
15745}
15746_ACEOF
15747rm -f conftest.$ac_objext
15748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015749 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015751 grep -v '^ *+' conftest.er1 >conftest.err
15752 rm -f conftest.er1
15753 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15755 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015756 { ac_try='test -z "$ac_c_werror_flag"
15757 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15759 (eval $ac_try) 2>&5
15760 ac_status=$?
15761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15762 (exit $ac_status); }; } &&
15763 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15765 (eval $ac_try) 2>&5
15766 ac_status=$?
15767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15768 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015769 :
15770else
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015772sed 's/^/| /' conftest.$ac_ext >&5
15773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774
15775cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015776#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015777_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015778
Martin v. Löwis11437992002-04-12 09:54:03 +000015779
Guido van Rossum627b2d71993-12-24 10:39:16 +000015780fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015781rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015782
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015783fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015784done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015785
Michael W. Hudson54241132001-12-07 15:38:26 +000015786
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015787echo "$as_me:$LINENO: checking for major" >&5
15788echo $ECHO_N "checking for major... $ECHO_C" >&6
15789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015790/* confdefs.h. */
15791_ACEOF
15792cat confdefs.h >>conftest.$ac_ext
15793cat >>conftest.$ac_ext <<_ACEOF
15794/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015795
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015796#if defined(MAJOR_IN_MKDEV)
15797#include <sys/mkdev.h>
15798#elif defined(MAJOR_IN_SYSMACROS)
15799#include <sys/sysmacros.h>
15800#else
15801#include <sys/types.h>
15802#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015803
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015804int
15805main ()
15806{
15807
15808 makedev(major(0),minor(0));
15809
15810 ;
15811 return 0;
15812}
15813_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000015814rm -f conftest.$ac_objext conftest$ac_exeext
15815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015816 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015818 grep -v '^ *+' conftest.er1 >conftest.err
15819 rm -f conftest.er1
15820 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15822 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015823 { ac_try='test -z "$ac_c_werror_flag"
15824 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15826 (eval $ac_try) 2>&5
15827 ac_status=$?
15828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15829 (exit $ac_status); }; } &&
15830 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15832 (eval $ac_try) 2>&5
15833 ac_status=$?
15834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835 (exit $ac_status); }; }; then
15836
15837
15838cat >>confdefs.h <<\_ACEOF
15839#define HAVE_DEVICE_MACROS 1
15840_ACEOF
15841
15842 echo "$as_me:$LINENO: result: yes" >&5
15843echo "${ECHO_T}yes" >&6
15844
15845else
15846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015847sed 's/^/| /' conftest.$ac_ext >&5
15848
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015849
15850 echo "$as_me:$LINENO: result: no" >&5
15851echo "${ECHO_T}no" >&6
15852
15853fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015854rm -f conftest.err conftest.$ac_objext \
15855 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015856
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015857# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015858# for [no]getaddrinfo in netdb.h.
15859echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15860echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
15861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015862/* confdefs.h. */
15863_ACEOF
15864cat confdefs.h >>conftest.$ac_ext
15865cat >>conftest.$ac_ext <<_ACEOF
15866/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015867
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015868#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015869#include <sys/socket.h>
15870#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015871#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873int
15874main ()
15875{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015876
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015877getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015878
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 ;
15880 return 0;
15881}
15882_ACEOF
15883rm -f conftest.$ac_objext conftest$ac_exeext
15884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015885 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015887 grep -v '^ *+' conftest.er1 >conftest.err
15888 rm -f conftest.er1
15889 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15891 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015892 { ac_try='test -z "$ac_c_werror_flag"
15893 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15895 (eval $ac_try) 2>&5
15896 ac_status=$?
15897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15898 (exit $ac_status); }; } &&
15899 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15901 (eval $ac_try) 2>&5
15902 ac_status=$?
15903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15904 (exit $ac_status); }; }; then
15905
15906echo "$as_me:$LINENO: result: yes" >&5
15907echo "${ECHO_T}yes" >&6
15908echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
15909echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015910if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015911 echo "$as_me:$LINENO: result: buggy" >&5
15912echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015913buggygetaddrinfo=yes
15914else
Martin v. Löwis11437992002-04-12 09:54:03 +000015915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015916/* confdefs.h. */
15917_ACEOF
15918cat confdefs.h >>conftest.$ac_ext
15919cat >>conftest.$ac_ext <<_ACEOF
15920/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015921
15922#include <sys/types.h>
15923#include <netdb.h>
15924#include <string.h>
15925#include <sys/socket.h>
15926#include <netinet/in.h>
15927
15928main()
15929{
15930 int passive, gaierr, inet4 = 0, inet6 = 0;
15931 struct addrinfo hints, *ai, *aitop;
15932 char straddr[INET6_ADDRSTRLEN], strport[16];
15933
15934 for (passive = 0; passive <= 1; passive++) {
15935 memset(&hints, 0, sizeof(hints));
15936 hints.ai_family = AF_UNSPEC;
15937 hints.ai_flags = passive ? AI_PASSIVE : 0;
15938 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015939 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015940 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15941 (void)gai_strerror(gaierr);
15942 goto bad;
15943 }
15944 for (ai = aitop; ai; ai = ai->ai_next) {
15945 if (ai->ai_addr == NULL ||
15946 ai->ai_addrlen == 0 ||
15947 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15948 straddr, sizeof(straddr), strport, sizeof(strport),
15949 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15950 goto bad;
15951 }
15952 switch (ai->ai_family) {
15953 case AF_INET:
15954 if (strcmp(strport, "54321") != 0) {
15955 goto bad;
15956 }
15957 if (passive) {
15958 if (strcmp(straddr, "0.0.0.0") != 0) {
15959 goto bad;
15960 }
15961 } else {
15962 if (strcmp(straddr, "127.0.0.1") != 0) {
15963 goto bad;
15964 }
15965 }
15966 inet4++;
15967 break;
15968 case AF_INET6:
15969 if (strcmp(strport, "54321") != 0) {
15970 goto bad;
15971 }
15972 if (passive) {
15973 if (strcmp(straddr, "::") != 0) {
15974 goto bad;
15975 }
15976 } else {
15977 if (strcmp(straddr, "::1") != 0) {
15978 goto bad;
15979 }
15980 }
15981 inet6++;
15982 break;
15983 case AF_UNSPEC:
15984 goto bad;
15985 break;
15986 default:
15987 /* another family support? */
15988 break;
15989 }
15990 }
15991 }
15992
15993 if (!(inet4 == 0 || inet4 == 2))
15994 goto bad;
15995 if (!(inet6 == 0 || inet6 == 2))
15996 goto bad;
15997
15998 if (aitop)
15999 freeaddrinfo(aitop);
16000 exit(0);
16001
16002 bad:
16003 if (aitop)
16004 freeaddrinfo(aitop);
16005 exit(1);
16006}
16007
Martin v. Löwis11437992002-04-12 09:54:03 +000016008_ACEOF
16009rm -f conftest$ac_exeext
16010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16011 (eval $ac_link) 2>&5
16012 ac_status=$?
16013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16016 (eval $ac_try) 2>&5
16017 ac_status=$?
16018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16019 (exit $ac_status); }; }; then
16020 echo "$as_me:$LINENO: result: good" >&5
16021echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016022buggygetaddrinfo=no
16023else
Martin v. Löwis11437992002-04-12 09:54:03 +000016024 echo "$as_me: program exited with status $ac_status" >&5
16025echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016026sed 's/^/| /' conftest.$ac_ext >&5
16027
Martin v. Löwis11437992002-04-12 09:54:03 +000016028( exit $ac_status )
16029echo "$as_me:$LINENO: result: buggy" >&5
16030echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016031buggygetaddrinfo=yes
16032fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016033rm -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 +000016034fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016035else
Martin v. Löwis11437992002-04-12 09:54:03 +000016036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016037sed 's/^/| /' conftest.$ac_ext >&5
16038
Martin v. Löwis11437992002-04-12 09:54:03 +000016039
16040echo "$as_me:$LINENO: result: no" >&5
16041echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016042buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016043
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016044fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016045rm -f conftest.err conftest.$ac_objext \
16046 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016047
16048if test "$buggygetaddrinfo" = "yes"; then
16049 if test "$ipv6" = "yes"; then
16050 echo 'Fatal: You must get working getaddrinfo() function.'
16051 echo ' or you can specify "--disable-ipv6"'.
16052 exit 1
16053 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016054else
Martin v. Löwis11437992002-04-12 09:54:03 +000016055
16056cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016057#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016058_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016059
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016060fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016061
Jack Jansen9a66b6d2001-08-08 13:56:14 +000016062for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016063do
Martin v. Löwis11437992002-04-12 09:54:03 +000016064as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16065echo "$as_me:$LINENO: checking for $ac_func" >&5
16066echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16067if eval "test \"\${$as_ac_var+set}\" = set"; then
16068 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016069else
Martin v. Löwis11437992002-04-12 09:54:03 +000016070 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016071/* confdefs.h. */
16072_ACEOF
16073cat confdefs.h >>conftest.$ac_ext
16074cat >>conftest.$ac_ext <<_ACEOF
16075/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016076/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016077 which can conflict with char $ac_func (); below.
16078 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016079 <limits.h> exists even on freestanding compilers. Under hpux,
16080 including <limits.h> includes <sys/time.h> and causes problems
16081 checking for functions defined therein. */
16082#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016083# include <limits.h>
16084#else
16085# include <assert.h>
16086#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016087/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016088#ifdef __cplusplus
16089extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016090{
Martin v. Löwis11437992002-04-12 09:54:03 +000016091#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016092/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016093 builtin and then its argument prototype would still apply. */
16094char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016095/* The GNU C library defines this for functions which it implements
16096 to always fail with ENOSYS. Some functions are actually named
16097 something starting with __ and the normal name is an alias. */
16098#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16099choke me
16100#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016101char (*f) () = $ac_func;
16102#endif
16103#ifdef __cplusplus
16104}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016105#endif
16106
Skip Montanaro6dead952003-09-25 14:50:04 +000016107int
16108main ()
16109{
16110return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016111 ;
16112 return 0;
16113}
16114_ACEOF
16115rm -f conftest.$ac_objext conftest$ac_exeext
16116if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016117 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016119 grep -v '^ *+' conftest.er1 >conftest.err
16120 rm -f conftest.er1
16121 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16123 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016124 { ac_try='test -z "$ac_c_werror_flag"
16125 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16127 (eval $ac_try) 2>&5
16128 ac_status=$?
16129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16130 (exit $ac_status); }; } &&
16131 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16133 (eval $ac_try) 2>&5
16134 ac_status=$?
16135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136 (exit $ac_status); }; }; then
16137 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016138else
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016140sed 's/^/| /' conftest.$ac_ext >&5
16141
Martin v. Löwis11437992002-04-12 09:54:03 +000016142eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016143fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016144rm -f conftest.err conftest.$ac_objext \
16145 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016147echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16148echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16149if test `eval echo '${'$as_ac_var'}'` = yes; then
16150 cat >>confdefs.h <<_ACEOF
16151#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16152_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016153
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016154fi
16155done
16156
Michael W. Hudson54241132001-12-07 15:38:26 +000016157
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016158# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000016159echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
16160echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16161if test "${ac_cv_header_time+set}" = set; then
16162 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016163else
Martin v. Löwis11437992002-04-12 09:54:03 +000016164 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016165/* confdefs.h. */
16166_ACEOF
16167cat confdefs.h >>conftest.$ac_ext
16168cat >>conftest.$ac_ext <<_ACEOF
16169/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016170#include <sys/types.h>
16171#include <sys/time.h>
16172#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016173
Martin v. Löwis11437992002-04-12 09:54:03 +000016174int
16175main ()
16176{
16177if ((struct tm *) 0)
16178return 0;
16179 ;
16180 return 0;
16181}
16182_ACEOF
16183rm -f conftest.$ac_objext
16184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016185 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016187 grep -v '^ *+' conftest.er1 >conftest.err
16188 rm -f conftest.er1
16189 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16191 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016192 { ac_try='test -z "$ac_c_werror_flag"
16193 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16195 (eval $ac_try) 2>&5
16196 ac_status=$?
16197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16198 (exit $ac_status); }; } &&
16199 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16201 (eval $ac_try) 2>&5
16202 ac_status=$?
16203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16204 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016205 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016206else
Martin v. Löwis11437992002-04-12 09:54:03 +000016207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016208sed 's/^/| /' conftest.$ac_ext >&5
16209
Martin v. Löwis11437992002-04-12 09:54:03 +000016210ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016211fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016213fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016214echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
16215echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016216if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016217
16218cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016219#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016220_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016221
16222fi
16223
Martin v. Löwis11437992002-04-12 09:54:03 +000016224echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
16225echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
16226if test "${ac_cv_struct_tm+set}" = set; then
16227 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016228else
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016230/* confdefs.h. */
16231_ACEOF
16232cat confdefs.h >>conftest.$ac_ext
16233cat >>conftest.$ac_ext <<_ACEOF
16234/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016235#include <sys/types.h>
16236#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016237
Martin v. Löwis11437992002-04-12 09:54:03 +000016238int
16239main ()
16240{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016241struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000016242 ;
16243 return 0;
16244}
16245_ACEOF
16246rm -f conftest.$ac_objext
16247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016248 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016250 grep -v '^ *+' conftest.er1 >conftest.err
16251 rm -f conftest.er1
16252 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16254 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016255 { ac_try='test -z "$ac_c_werror_flag"
16256 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16258 (eval $ac_try) 2>&5
16259 ac_status=$?
16260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16261 (exit $ac_status); }; } &&
16262 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16264 (eval $ac_try) 2>&5
16265 ac_status=$?
16266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16267 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016268 ac_cv_struct_tm=time.h
16269else
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016271sed 's/^/| /' conftest.$ac_ext >&5
16272
Martin v. Löwis11437992002-04-12 09:54:03 +000016273ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016274fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016275rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016277echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16278echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016279if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016280
16281cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016282#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016283_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016284
16285fi
16286
Martin v. Löwis11437992002-04-12 09:54:03 +000016287echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16288echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16289if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16290 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016291else
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016293/* confdefs.h. */
16294_ACEOF
16295cat confdefs.h >>conftest.$ac_ext
16296cat >>conftest.$ac_ext <<_ACEOF
16297/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016298#include <sys/types.h>
16299#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016300
16301
Martin v. Löwis11437992002-04-12 09:54:03 +000016302int
16303main ()
16304{
16305static struct tm ac_aggr;
16306if (ac_aggr.tm_zone)
16307return 0;
16308 ;
16309 return 0;
16310}
16311_ACEOF
16312rm -f conftest.$ac_objext
16313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016314 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016316 grep -v '^ *+' conftest.er1 >conftest.err
16317 rm -f conftest.er1
16318 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016321 { ac_try='test -z "$ac_c_werror_flag"
16322 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16324 (eval $ac_try) 2>&5
16325 ac_status=$?
16326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16327 (exit $ac_status); }; } &&
16328 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16330 (eval $ac_try) 2>&5
16331 ac_status=$?
16332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16333 (exit $ac_status); }; }; then
16334 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016335else
Martin v. Löwis11437992002-04-12 09:54:03 +000016336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016337sed 's/^/| /' conftest.$ac_ext >&5
16338
16339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016340/* confdefs.h. */
16341_ACEOF
16342cat confdefs.h >>conftest.$ac_ext
16343cat >>conftest.$ac_ext <<_ACEOF
16344/* end confdefs.h. */
16345#include <sys/types.h>
16346#include <$ac_cv_struct_tm>
16347
16348
16349int
16350main ()
16351{
16352static struct tm ac_aggr;
16353if (sizeof ac_aggr.tm_zone)
16354return 0;
16355 ;
16356 return 0;
16357}
16358_ACEOF
16359rm -f conftest.$ac_objext
16360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016361 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016363 grep -v '^ *+' conftest.er1 >conftest.err
16364 rm -f conftest.er1
16365 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16367 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016368 { ac_try='test -z "$ac_c_werror_flag"
16369 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16371 (eval $ac_try) 2>&5
16372 ac_status=$?
16373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16374 (exit $ac_status); }; } &&
16375 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16377 (eval $ac_try) 2>&5
16378 ac_status=$?
16379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16380 (exit $ac_status); }; }; then
16381 ac_cv_member_struct_tm_tm_zone=yes
16382else
16383 echo "$as_me: failed program was:" >&5
16384sed 's/^/| /' conftest.$ac_ext >&5
16385
Martin v. Löwis11437992002-04-12 09:54:03 +000016386ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016387fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016388rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016389fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016390rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016391fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016392echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16393echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16394if test $ac_cv_member_struct_tm_tm_zone = yes; then
16395
16396cat >>confdefs.h <<_ACEOF
16397#define HAVE_STRUCT_TM_TM_ZONE 1
16398_ACEOF
16399
16400
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016401fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016402
Martin v. Löwis11437992002-04-12 09:54:03 +000016403if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16404
16405cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016406#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016407_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016408
16409else
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 echo "$as_me:$LINENO: checking for tzname" >&5
16411echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16412if test "${ac_cv_var_tzname+set}" = set; then
16413 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016414else
Martin v. Löwis11437992002-04-12 09:54:03 +000016415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016416/* confdefs.h. */
16417_ACEOF
16418cat confdefs.h >>conftest.$ac_ext
16419cat >>conftest.$ac_ext <<_ACEOF
16420/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016421#include <time.h>
16422#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016423extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016425
Martin v. Löwis11437992002-04-12 09:54:03 +000016426int
16427main ()
16428{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016429atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016430 ;
16431 return 0;
16432}
16433_ACEOF
16434rm -f conftest.$ac_objext conftest$ac_exeext
16435if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016436 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016438 grep -v '^ *+' conftest.er1 >conftest.err
16439 rm -f conftest.er1
16440 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16442 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016443 { ac_try='test -z "$ac_c_werror_flag"
16444 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16446 (eval $ac_try) 2>&5
16447 ac_status=$?
16448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16449 (exit $ac_status); }; } &&
16450 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16452 (eval $ac_try) 2>&5
16453 ac_status=$?
16454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16455 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016456 ac_cv_var_tzname=yes
16457else
Martin v. Löwis11437992002-04-12 09:54:03 +000016458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016459sed 's/^/| /' conftest.$ac_ext >&5
16460
Martin v. Löwis11437992002-04-12 09:54:03 +000016461ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016462fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016463rm -f conftest.err conftest.$ac_objext \
16464 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016466echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16467echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016468 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016469
16470cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016471#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016472_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016473
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016474 fi
16475fi
16476
Martin v. Löwis11437992002-04-12 09:54:03 +000016477echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16478echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16479if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16480 echo $ECHO_N "(cached) $ECHO_C" >&6
16481else
16482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016483/* confdefs.h. */
16484_ACEOF
16485cat confdefs.h >>conftest.$ac_ext
16486cat >>conftest.$ac_ext <<_ACEOF
16487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016488$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016489int
16490main ()
16491{
16492static struct stat ac_aggr;
16493if (ac_aggr.st_rdev)
16494return 0;
16495 ;
16496 return 0;
16497}
16498_ACEOF
16499rm -f conftest.$ac_objext
16500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016501 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016503 grep -v '^ *+' conftest.er1 >conftest.err
16504 rm -f conftest.er1
16505 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16507 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016508 { ac_try='test -z "$ac_c_werror_flag"
16509 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16511 (eval $ac_try) 2>&5
16512 ac_status=$?
16513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16514 (exit $ac_status); }; } &&
16515 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16517 (eval $ac_try) 2>&5
16518 ac_status=$?
16519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16520 (exit $ac_status); }; }; then
16521 ac_cv_member_struct_stat_st_rdev=yes
16522else
16523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016524sed 's/^/| /' conftest.$ac_ext >&5
16525
16526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016527/* confdefs.h. */
16528_ACEOF
16529cat confdefs.h >>conftest.$ac_ext
16530cat >>conftest.$ac_ext <<_ACEOF
16531/* end confdefs.h. */
16532$ac_includes_default
16533int
16534main ()
16535{
16536static struct stat ac_aggr;
16537if (sizeof ac_aggr.st_rdev)
16538return 0;
16539 ;
16540 return 0;
16541}
16542_ACEOF
16543rm -f conftest.$ac_objext
16544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016545 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016547 grep -v '^ *+' conftest.er1 >conftest.err
16548 rm -f conftest.er1
16549 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16551 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016552 { ac_try='test -z "$ac_c_werror_flag"
16553 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16555 (eval $ac_try) 2>&5
16556 ac_status=$?
16557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16558 (exit $ac_status); }; } &&
16559 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16561 (eval $ac_try) 2>&5
16562 ac_status=$?
16563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16564 (exit $ac_status); }; }; then
16565 ac_cv_member_struct_stat_st_rdev=yes
16566else
16567 echo "$as_me: failed program was:" >&5
16568sed 's/^/| /' conftest.$ac_ext >&5
16569
Martin v. Löwis11437992002-04-12 09:54:03 +000016570ac_cv_member_struct_stat_st_rdev=no
16571fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016572rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016573fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016574rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016575fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016576echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16577echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16578if test $ac_cv_member_struct_stat_st_rdev = yes; then
16579
16580cat >>confdefs.h <<_ACEOF
16581#define HAVE_STRUCT_STAT_ST_RDEV 1
16582_ACEOF
16583
16584
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016585fi
16586
Martin v. Löwis11437992002-04-12 09:54:03 +000016587echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16588echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16589if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016591else
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016593/* confdefs.h. */
16594_ACEOF
16595cat confdefs.h >>conftest.$ac_ext
16596cat >>conftest.$ac_ext <<_ACEOF
16597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016598$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016599int
16600main ()
16601{
16602static struct stat ac_aggr;
16603if (ac_aggr.st_blksize)
16604return 0;
16605 ;
16606 return 0;
16607}
16608_ACEOF
16609rm -f conftest.$ac_objext
16610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016611 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016613 grep -v '^ *+' conftest.er1 >conftest.err
16614 rm -f conftest.er1
16615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16617 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016618 { ac_try='test -z "$ac_c_werror_flag"
16619 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16621 (eval $ac_try) 2>&5
16622 ac_status=$?
16623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16624 (exit $ac_status); }; } &&
16625 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16627 (eval $ac_try) 2>&5
16628 ac_status=$?
16629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16630 (exit $ac_status); }; }; then
16631 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016632else
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016634sed 's/^/| /' conftest.$ac_ext >&5
16635
16636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016637/* confdefs.h. */
16638_ACEOF
16639cat confdefs.h >>conftest.$ac_ext
16640cat >>conftest.$ac_ext <<_ACEOF
16641/* end confdefs.h. */
16642$ac_includes_default
16643int
16644main ()
16645{
16646static struct stat ac_aggr;
16647if (sizeof ac_aggr.st_blksize)
16648return 0;
16649 ;
16650 return 0;
16651}
16652_ACEOF
16653rm -f conftest.$ac_objext
16654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016655 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016657 grep -v '^ *+' conftest.er1 >conftest.err
16658 rm -f conftest.er1
16659 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16661 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016662 { ac_try='test -z "$ac_c_werror_flag"
16663 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16665 (eval $ac_try) 2>&5
16666 ac_status=$?
16667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16668 (exit $ac_status); }; } &&
16669 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16671 (eval $ac_try) 2>&5
16672 ac_status=$?
16673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16674 (exit $ac_status); }; }; then
16675 ac_cv_member_struct_stat_st_blksize=yes
16676else
16677 echo "$as_me: failed program was:" >&5
16678sed 's/^/| /' conftest.$ac_ext >&5
16679
Martin v. Löwis11437992002-04-12 09:54:03 +000016680ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016681fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016682rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016683fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016684rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016685fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016686echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
16687echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
16688if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016689
Martin v. Löwis11437992002-04-12 09:54:03 +000016690cat >>confdefs.h <<_ACEOF
16691#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16692_ACEOF
16693
16694
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016695fi
16696
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000016697echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
16698echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
16699if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
16700 echo $ECHO_N "(cached) $ECHO_C" >&6
16701else
16702 cat >conftest.$ac_ext <<_ACEOF
16703/* confdefs.h. */
16704_ACEOF
16705cat confdefs.h >>conftest.$ac_ext
16706cat >>conftest.$ac_ext <<_ACEOF
16707/* end confdefs.h. */
16708$ac_includes_default
16709int
16710main ()
16711{
16712static struct stat ac_aggr;
16713if (ac_aggr.st_flags)
16714return 0;
16715 ;
16716 return 0;
16717}
16718_ACEOF
16719rm -f conftest.$ac_objext
16720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16721 (eval $ac_compile) 2>conftest.er1
16722 ac_status=$?
16723 grep -v '^ *+' conftest.er1 >conftest.err
16724 rm -f conftest.er1
16725 cat conftest.err >&5
16726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16727 (exit $ac_status); } &&
16728 { ac_try='test -z "$ac_c_werror_flag"
16729 || test ! -s conftest.err'
16730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16731 (eval $ac_try) 2>&5
16732 ac_status=$?
16733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16734 (exit $ac_status); }; } &&
16735 { ac_try='test -s conftest.$ac_objext'
16736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16737 (eval $ac_try) 2>&5
16738 ac_status=$?
16739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16740 (exit $ac_status); }; }; then
16741 ac_cv_member_struct_stat_st_flags=yes
16742else
16743 echo "$as_me: failed program was:" >&5
16744sed 's/^/| /' conftest.$ac_ext >&5
16745
16746cat >conftest.$ac_ext <<_ACEOF
16747/* confdefs.h. */
16748_ACEOF
16749cat confdefs.h >>conftest.$ac_ext
16750cat >>conftest.$ac_ext <<_ACEOF
16751/* end confdefs.h. */
16752$ac_includes_default
16753int
16754main ()
16755{
16756static struct stat ac_aggr;
16757if (sizeof ac_aggr.st_flags)
16758return 0;
16759 ;
16760 return 0;
16761}
16762_ACEOF
16763rm -f conftest.$ac_objext
16764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16765 (eval $ac_compile) 2>conftest.er1
16766 ac_status=$?
16767 grep -v '^ *+' conftest.er1 >conftest.err
16768 rm -f conftest.er1
16769 cat conftest.err >&5
16770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771 (exit $ac_status); } &&
16772 { ac_try='test -z "$ac_c_werror_flag"
16773 || test ! -s conftest.err'
16774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16775 (eval $ac_try) 2>&5
16776 ac_status=$?
16777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16778 (exit $ac_status); }; } &&
16779 { ac_try='test -s conftest.$ac_objext'
16780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16781 (eval $ac_try) 2>&5
16782 ac_status=$?
16783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16784 (exit $ac_status); }; }; then
16785 ac_cv_member_struct_stat_st_flags=yes
16786else
16787 echo "$as_me: failed program was:" >&5
16788sed 's/^/| /' conftest.$ac_ext >&5
16789
16790ac_cv_member_struct_stat_st_flags=no
16791fi
16792rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16793fi
16794rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16795fi
16796echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
16797echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
16798if test $ac_cv_member_struct_stat_st_flags = yes; then
16799
16800cat >>confdefs.h <<_ACEOF
16801#define HAVE_STRUCT_STAT_ST_FLAGS 1
16802_ACEOF
16803
16804
16805fi
16806
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016807echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
16808echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
16809if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
16810 echo $ECHO_N "(cached) $ECHO_C" >&6
16811else
16812 cat >conftest.$ac_ext <<_ACEOF
16813/* confdefs.h. */
16814_ACEOF
16815cat confdefs.h >>conftest.$ac_ext
16816cat >>conftest.$ac_ext <<_ACEOF
16817/* end confdefs.h. */
16818$ac_includes_default
16819int
16820main ()
16821{
16822static struct stat ac_aggr;
16823if (ac_aggr.st_gen)
16824return 0;
16825 ;
16826 return 0;
16827}
16828_ACEOF
16829rm -f conftest.$ac_objext
16830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16831 (eval $ac_compile) 2>conftest.er1
16832 ac_status=$?
16833 grep -v '^ *+' conftest.er1 >conftest.err
16834 rm -f conftest.er1
16835 cat conftest.err >&5
16836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16837 (exit $ac_status); } &&
16838 { ac_try='test -z "$ac_c_werror_flag"
16839 || test ! -s conftest.err'
16840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16841 (eval $ac_try) 2>&5
16842 ac_status=$?
16843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16844 (exit $ac_status); }; } &&
16845 { ac_try='test -s conftest.$ac_objext'
16846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16847 (eval $ac_try) 2>&5
16848 ac_status=$?
16849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16850 (exit $ac_status); }; }; then
16851 ac_cv_member_struct_stat_st_gen=yes
16852else
16853 echo "$as_me: failed program was:" >&5
16854sed 's/^/| /' conftest.$ac_ext >&5
16855
16856cat >conftest.$ac_ext <<_ACEOF
16857/* confdefs.h. */
16858_ACEOF
16859cat confdefs.h >>conftest.$ac_ext
16860cat >>conftest.$ac_ext <<_ACEOF
16861/* end confdefs.h. */
16862$ac_includes_default
16863int
16864main ()
16865{
16866static struct stat ac_aggr;
16867if (sizeof ac_aggr.st_gen)
16868return 0;
16869 ;
16870 return 0;
16871}
16872_ACEOF
16873rm -f conftest.$ac_objext
16874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16875 (eval $ac_compile) 2>conftest.er1
16876 ac_status=$?
16877 grep -v '^ *+' conftest.er1 >conftest.err
16878 rm -f conftest.er1
16879 cat conftest.err >&5
16880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16881 (exit $ac_status); } &&
16882 { ac_try='test -z "$ac_c_werror_flag"
16883 || test ! -s conftest.err'
16884 { (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); }; } &&
16889 { ac_try='test -s conftest.$ac_objext'
16890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16891 (eval $ac_try) 2>&5
16892 ac_status=$?
16893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16894 (exit $ac_status); }; }; then
16895 ac_cv_member_struct_stat_st_gen=yes
16896else
16897 echo "$as_me: failed program was:" >&5
16898sed 's/^/| /' conftest.$ac_ext >&5
16899
16900ac_cv_member_struct_stat_st_gen=no
16901fi
16902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16903fi
16904rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16905fi
16906echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
16907echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
16908if test $ac_cv_member_struct_stat_st_gen = yes; then
16909
16910cat >>confdefs.h <<_ACEOF
16911#define HAVE_STRUCT_STAT_ST_GEN 1
16912_ACEOF
16913
16914
16915fi
16916
16917echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
16918echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
16919if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
16920 echo $ECHO_N "(cached) $ECHO_C" >&6
16921else
16922 cat >conftest.$ac_ext <<_ACEOF
16923/* confdefs.h. */
16924_ACEOF
16925cat confdefs.h >>conftest.$ac_ext
16926cat >>conftest.$ac_ext <<_ACEOF
16927/* end confdefs.h. */
16928$ac_includes_default
16929int
16930main ()
16931{
16932static struct stat ac_aggr;
16933if (ac_aggr.st_birthtime)
16934return 0;
16935 ;
16936 return 0;
16937}
16938_ACEOF
16939rm -f conftest.$ac_objext
16940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16941 (eval $ac_compile) 2>conftest.er1
16942 ac_status=$?
16943 grep -v '^ *+' conftest.er1 >conftest.err
16944 rm -f conftest.er1
16945 cat conftest.err >&5
16946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16947 (exit $ac_status); } &&
16948 { ac_try='test -z "$ac_c_werror_flag"
16949 || test ! -s conftest.err'
16950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16951 (eval $ac_try) 2>&5
16952 ac_status=$?
16953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16954 (exit $ac_status); }; } &&
16955 { ac_try='test -s conftest.$ac_objext'
16956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16957 (eval $ac_try) 2>&5
16958 ac_status=$?
16959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16960 (exit $ac_status); }; }; then
16961 ac_cv_member_struct_stat_st_birthtime=yes
16962else
16963 echo "$as_me: failed program was:" >&5
16964sed 's/^/| /' conftest.$ac_ext >&5
16965
16966cat >conftest.$ac_ext <<_ACEOF
16967/* confdefs.h. */
16968_ACEOF
16969cat confdefs.h >>conftest.$ac_ext
16970cat >>conftest.$ac_ext <<_ACEOF
16971/* end confdefs.h. */
16972$ac_includes_default
16973int
16974main ()
16975{
16976static struct stat ac_aggr;
16977if (sizeof ac_aggr.st_birthtime)
16978return 0;
16979 ;
16980 return 0;
16981}
16982_ACEOF
16983rm -f conftest.$ac_objext
16984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16985 (eval $ac_compile) 2>conftest.er1
16986 ac_status=$?
16987 grep -v '^ *+' conftest.er1 >conftest.err
16988 rm -f conftest.er1
16989 cat conftest.err >&5
16990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16991 (exit $ac_status); } &&
16992 { ac_try='test -z "$ac_c_werror_flag"
16993 || test ! -s conftest.err'
16994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16995 (eval $ac_try) 2>&5
16996 ac_status=$?
16997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16998 (exit $ac_status); }; } &&
16999 { ac_try='test -s conftest.$ac_objext'
17000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17001 (eval $ac_try) 2>&5
17002 ac_status=$?
17003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17004 (exit $ac_status); }; }; then
17005 ac_cv_member_struct_stat_st_birthtime=yes
17006else
17007 echo "$as_me: failed program was:" >&5
17008sed 's/^/| /' conftest.$ac_ext >&5
17009
17010ac_cv_member_struct_stat_st_birthtime=no
17011fi
17012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17013fi
17014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17015fi
17016echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
17017echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
17018if test $ac_cv_member_struct_stat_st_birthtime = yes; then
17019
17020cat >>confdefs.h <<_ACEOF
17021#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
17022_ACEOF
17023
17024
17025fi
17026
Martin v. Löwis11437992002-04-12 09:54:03 +000017027echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
17028echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
17029if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
17030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017031else
Martin v. Löwis11437992002-04-12 09:54:03 +000017032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017033/* confdefs.h. */
17034_ACEOF
17035cat confdefs.h >>conftest.$ac_ext
17036cat >>conftest.$ac_ext <<_ACEOF
17037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017038$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017039int
17040main ()
17041{
17042static struct stat ac_aggr;
17043if (ac_aggr.st_blocks)
17044return 0;
17045 ;
17046 return 0;
17047}
17048_ACEOF
17049rm -f conftest.$ac_objext
17050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017051 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017053 grep -v '^ *+' conftest.er1 >conftest.err
17054 rm -f conftest.er1
17055 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17057 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017058 { ac_try='test -z "$ac_c_werror_flag"
17059 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17061 (eval $ac_try) 2>&5
17062 ac_status=$?
17063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17064 (exit $ac_status); }; } &&
17065 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17067 (eval $ac_try) 2>&5
17068 ac_status=$?
17069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17070 (exit $ac_status); }; }; then
17071 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017072else
Martin v. Löwis11437992002-04-12 09:54:03 +000017073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017074sed 's/^/| /' conftest.$ac_ext >&5
17075
17076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017077/* confdefs.h. */
17078_ACEOF
17079cat confdefs.h >>conftest.$ac_ext
17080cat >>conftest.$ac_ext <<_ACEOF
17081/* end confdefs.h. */
17082$ac_includes_default
17083int
17084main ()
17085{
17086static struct stat ac_aggr;
17087if (sizeof ac_aggr.st_blocks)
17088return 0;
17089 ;
17090 return 0;
17091}
17092_ACEOF
17093rm -f conftest.$ac_objext
17094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017095 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017097 grep -v '^ *+' conftest.er1 >conftest.err
17098 rm -f conftest.er1
17099 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17101 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017102 { ac_try='test -z "$ac_c_werror_flag"
17103 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17105 (eval $ac_try) 2>&5
17106 ac_status=$?
17107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17108 (exit $ac_status); }; } &&
17109 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17111 (eval $ac_try) 2>&5
17112 ac_status=$?
17113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17114 (exit $ac_status); }; }; then
17115 ac_cv_member_struct_stat_st_blocks=yes
17116else
17117 echo "$as_me: failed program was:" >&5
17118sed 's/^/| /' conftest.$ac_ext >&5
17119
Martin v. Löwis11437992002-04-12 09:54:03 +000017120ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017121fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017122rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017123fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017124rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017126echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
17127echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
17128if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017129
Martin v. Löwis11437992002-04-12 09:54:03 +000017130cat >>confdefs.h <<_ACEOF
17131#define HAVE_STRUCT_STAT_ST_BLOCKS 1
17132_ACEOF
17133
17134
17135cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017136#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017137_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017138
17139else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017140 case $LIBOBJS in
17141 "fileblocks.$ac_objext" | \
17142 *" fileblocks.$ac_objext" | \
17143 "fileblocks.$ac_objext "* | \
17144 *" fileblocks.$ac_objext "* ) ;;
17145 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
17146esac
17147
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017148fi
17149
Michael W. Hudson54241132001-12-07 15:38:26 +000017150
Martin v. Löwis11437992002-04-12 09:54:03 +000017151
17152echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
17153echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
17154if test "${ac_cv_header_time_altzone+set}" = set; then
17155 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017156else
Martin v. Löwis11437992002-04-12 09:54:03 +000017157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017158/* confdefs.h. */
17159_ACEOF
17160cat confdefs.h >>conftest.$ac_ext
17161cat >>conftest.$ac_ext <<_ACEOF
17162/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017163#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017164int
17165main ()
17166{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017167return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000017168 ;
17169 return 0;
17170}
17171_ACEOF
17172rm -f conftest.$ac_objext
17173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017174 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017176 grep -v '^ *+' conftest.er1 >conftest.err
17177 rm -f conftest.er1
17178 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17180 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017181 { ac_try='test -z "$ac_c_werror_flag"
17182 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17184 (eval $ac_try) 2>&5
17185 ac_status=$?
17186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17187 (exit $ac_status); }; } &&
17188 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17190 (eval $ac_try) 2>&5
17191 ac_status=$?
17192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17193 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017194 ac_cv_header_time_altzone=yes
17195else
Martin v. Löwis11437992002-04-12 09:54:03 +000017196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017197sed 's/^/| /' conftest.$ac_ext >&5
17198
Martin v. Löwis11437992002-04-12 09:54:03 +000017199ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000017200fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017201rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017202fi
17203
Martin v. Löwis11437992002-04-12 09:54:03 +000017204echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
17205echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017206if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017207
17208cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017209#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017210_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017211
17212fi
17213
Guido van Rossumda88dad1995-01-26 00:46:29 +000017214was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017215echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
17216echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
17217cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017218/* confdefs.h. */
17219_ACEOF
17220cat confdefs.h >>conftest.$ac_ext
17221cat >>conftest.$ac_ext <<_ACEOF
17222/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017223
17224#include <sys/types.h>
17225#include <sys/select.h>
17226#include <sys/time.h>
17227
Martin v. Löwis11437992002-04-12 09:54:03 +000017228int
17229main ()
17230{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017231;
Martin v. Löwis11437992002-04-12 09:54:03 +000017232 ;
17233 return 0;
17234}
17235_ACEOF
17236rm -f conftest.$ac_objext
17237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017238 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017240 grep -v '^ *+' conftest.er1 >conftest.err
17241 rm -f conftest.er1
17242 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17244 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017245 { ac_try='test -z "$ac_c_werror_flag"
17246 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17248 (eval $ac_try) 2>&5
17249 ac_status=$?
17250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17251 (exit $ac_status); }; } &&
17252 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17254 (eval $ac_try) 2>&5
17255 ac_status=$?
17256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17257 (exit $ac_status); }; }; then
17258
17259
17260cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017261#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017262_ACEOF
17263
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017264 was_it_defined=yes
17265
Guido van Rossumf78abae1997-01-21 22:02:36 +000017266else
Martin v. Löwis11437992002-04-12 09:54:03 +000017267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017268sed 's/^/| /' conftest.$ac_ext >&5
17269
Guido van Rossum7f43da71994-08-01 12:15:30 +000017270fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017271rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017272echo "$as_me:$LINENO: result: $was_it_defined" >&5
17273echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000017274
Martin v. Löwis11437992002-04-12 09:54:03 +000017275echo "$as_me:$LINENO: checking for addrinfo" >&5
17276echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
17277if test "${ac_cv_struct_addrinfo+set}" = set; then
17278 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017279else
Martin v. Löwis11437992002-04-12 09:54:03 +000017280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017281/* confdefs.h. */
17282_ACEOF
17283cat confdefs.h >>conftest.$ac_ext
17284cat >>conftest.$ac_ext <<_ACEOF
17285/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017286
17287# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017288int
17289main ()
17290{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017291struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000017292 ;
17293 return 0;
17294}
17295_ACEOF
17296rm -f conftest.$ac_objext
17297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017298 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017300 grep -v '^ *+' conftest.er1 >conftest.err
17301 rm -f conftest.er1
17302 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17304 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017305 { ac_try='test -z "$ac_c_werror_flag"
17306 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17308 (eval $ac_try) 2>&5
17309 ac_status=$?
17310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17311 (exit $ac_status); }; } &&
17312 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17314 (eval $ac_try) 2>&5
17315 ac_status=$?
17316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17317 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017318 ac_cv_struct_addrinfo=yes
17319else
Martin v. Löwis11437992002-04-12 09:54:03 +000017320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017321sed 's/^/| /' conftest.$ac_ext >&5
17322
Martin v. Löwis11437992002-04-12 09:54:03 +000017323ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017324fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017325rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017326fi
17327
Martin v. Löwis11437992002-04-12 09:54:03 +000017328echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
17329echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017330if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017331
17332cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017333#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017334_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017335
17336fi
17337
Martin v. Löwis11437992002-04-12 09:54:03 +000017338echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
17339echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
17340if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
17341 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017342else
Martin v. Löwis11437992002-04-12 09:54:03 +000017343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017344/* confdefs.h. */
17345_ACEOF
17346cat confdefs.h >>conftest.$ac_ext
17347cat >>conftest.$ac_ext <<_ACEOF
17348/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017349
17350# include <sys/types.h>
17351# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017352int
17353main ()
17354{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017355struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000017356 ;
17357 return 0;
17358}
17359_ACEOF
17360rm -f conftest.$ac_objext
17361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017362 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017364 grep -v '^ *+' conftest.er1 >conftest.err
17365 rm -f conftest.er1
17366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17368 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017369 { ac_try='test -z "$ac_c_werror_flag"
17370 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17372 (eval $ac_try) 2>&5
17373 ac_status=$?
17374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17375 (exit $ac_status); }; } &&
17376 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17378 (eval $ac_try) 2>&5
17379 ac_status=$?
17380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17381 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017382 ac_cv_struct_sockaddr_storage=yes
17383else
Martin v. Löwis11437992002-04-12 09:54:03 +000017384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017385sed 's/^/| /' conftest.$ac_ext >&5
17386
Martin v. Löwis11437992002-04-12 09:54:03 +000017387ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017388fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017390fi
17391
Martin v. Löwis11437992002-04-12 09:54:03 +000017392echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
17393echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017394if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017395
17396cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017397#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017398_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017399
17400fi
17401
Guido van Rossum627b2d71993-12-24 10:39:16 +000017402# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000017403
Michael W. Hudson54241132001-12-07 15:38:26 +000017404
Martin v. Löwis11437992002-04-12 09:54:03 +000017405echo "$as_me:$LINENO: checking whether char is unsigned" >&5
17406echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
17407if test "${ac_cv_c_char_unsigned+set}" = set; then
17408 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000017409else
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017411/* confdefs.h. */
17412_ACEOF
17413cat confdefs.h >>conftest.$ac_ext
17414cat >>conftest.$ac_ext <<_ACEOF
17415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017416$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017417int
17418main ()
17419{
17420static int test_array [1 - 2 * !(((char) -1) < 0)];
17421test_array [0] = 0
17422
17423 ;
17424 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000017425}
Martin v. Löwis11437992002-04-12 09:54:03 +000017426_ACEOF
17427rm -f conftest.$ac_objext
17428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017429 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017431 grep -v '^ *+' conftest.er1 >conftest.err
17432 rm -f conftest.er1
17433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17435 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017436 { ac_try='test -z "$ac_c_werror_flag"
17437 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17439 (eval $ac_try) 2>&5
17440 ac_status=$?
17441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442 (exit $ac_status); }; } &&
17443 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17445 (eval $ac_try) 2>&5
17446 ac_status=$?
17447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17448 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017449 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017450else
17451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017452sed 's/^/| /' conftest.$ac_ext >&5
17453
Martin v. Löwis11437992002-04-12 09:54:03 +000017454ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017455fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017456rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017457fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017458echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
17459echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017460if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017461 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017462#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017463_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017464
17465fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000017466
Martin v. Löwis11437992002-04-12 09:54:03 +000017467echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
17468echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17469if test "${ac_cv_c_const+set}" = set; then
17470 echo $ECHO_N "(cached) $ECHO_C" >&6
17471else
17472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017473/* confdefs.h. */
17474_ACEOF
17475cat confdefs.h >>conftest.$ac_ext
17476cat >>conftest.$ac_ext <<_ACEOF
17477/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017478
Martin v. Löwis11437992002-04-12 09:54:03 +000017479int
17480main ()
17481{
17482/* FIXME: Include the comments suggested by Paul. */
17483#ifndef __cplusplus
17484 /* Ultrix mips cc rejects this. */
17485 typedef int charset[2];
17486 const charset x;
17487 /* SunOS 4.1.1 cc rejects this. */
17488 char const *const *ccp;
17489 char **p;
17490 /* NEC SVR4.0.2 mips cc rejects this. */
17491 struct point {int x, y;};
17492 static struct point const zero = {0,0};
17493 /* AIX XL C 1.02.0.0 rejects this.
17494 It does not let you subtract one const X* pointer from another in
17495 an arm of an if-expression whose if-part is not a constant
17496 expression */
17497 const char *g = "string";
17498 ccp = &g + (g ? g-g : 0);
17499 /* HPUX 7.0 cc rejects these. */
17500 ++ccp;
17501 p = (char**) ccp;
17502 ccp = (char const *const *) p;
17503 { /* SCO 3.2v4 cc rejects this. */
17504 char *t;
17505 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017506
Martin v. Löwis11437992002-04-12 09:54:03 +000017507 *t++ = 0;
17508 }
17509 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17510 int x[] = {25, 17};
17511 const int *foo = &x[0];
17512 ++foo;
17513 }
17514 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17515 typedef const int *iptr;
17516 iptr p = 0;
17517 ++p;
17518 }
17519 { /* AIX XL C 1.02.0.0 rejects this saying
17520 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17521 struct s { int j; const int *ap[3]; };
17522 struct s *b; b->j = 5;
17523 }
17524 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17525 const int foo = 10;
17526 }
17527#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000017528
Martin v. Löwis11437992002-04-12 09:54:03 +000017529 ;
17530 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000017531}
Martin v. Löwis11437992002-04-12 09:54:03 +000017532_ACEOF
17533rm -f conftest.$ac_objext
17534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017535 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017537 grep -v '^ *+' conftest.er1 >conftest.err
17538 rm -f conftest.er1
17539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17541 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017542 { ac_try='test -z "$ac_c_werror_flag"
17543 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17545 (eval $ac_try) 2>&5
17546 ac_status=$?
17547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17548 (exit $ac_status); }; } &&
17549 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17551 (eval $ac_try) 2>&5
17552 ac_status=$?
17553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17554 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017555 ac_cv_c_const=yes
17556else
Martin v. Löwis11437992002-04-12 09:54:03 +000017557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017558sed 's/^/| /' conftest.$ac_ext >&5
17559
Martin v. Löwis11437992002-04-12 09:54:03 +000017560ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017561fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017564echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
17565echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017566if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017567
17568cat >>confdefs.h <<\_ACEOF
17569#define const
17570_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017571
17572fi
17573
Michael W. Hudson54241132001-12-07 15:38:26 +000017574
Guido van Rossumda88dad1995-01-26 00:46:29 +000017575works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017576echo "$as_me:$LINENO: checking for working volatile" >&5
17577echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
17578cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017579/* confdefs.h. */
17580_ACEOF
17581cat confdefs.h >>conftest.$ac_ext
17582cat >>conftest.$ac_ext <<_ACEOF
17583/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017584
Martin v. Löwis11437992002-04-12 09:54:03 +000017585int
17586main ()
17587{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017588volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017589 ;
17590 return 0;
17591}
17592_ACEOF
17593rm -f conftest.$ac_objext
17594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017595 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017597 grep -v '^ *+' conftest.er1 >conftest.err
17598 rm -f conftest.er1
17599 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17601 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017602 { ac_try='test -z "$ac_c_werror_flag"
17603 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17605 (eval $ac_try) 2>&5
17606 ac_status=$?
17607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17608 (exit $ac_status); }; } &&
17609 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17611 (eval $ac_try) 2>&5
17612 ac_status=$?
17613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17614 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017615 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017616else
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017618sed 's/^/| /' conftest.$ac_ext >&5
17619
Martin v. Löwis11437992002-04-12 09:54:03 +000017620
17621cat >>confdefs.h <<\_ACEOF
17622#define volatile
17623_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017624
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017625
Guido van Rossum627b2d71993-12-24 10:39:16 +000017626fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017627rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017628echo "$as_me:$LINENO: result: $works" >&5
17629echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017630
Guido van Rossumda88dad1995-01-26 00:46:29 +000017631works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017632echo "$as_me:$LINENO: checking for working signed char" >&5
17633echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
17634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017635/* confdefs.h. */
17636_ACEOF
17637cat confdefs.h >>conftest.$ac_ext
17638cat >>conftest.$ac_ext <<_ACEOF
17639/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017640
Martin v. Löwis11437992002-04-12 09:54:03 +000017641int
17642main ()
17643{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017644signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017645 ;
17646 return 0;
17647}
17648_ACEOF
17649rm -f conftest.$ac_objext
17650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017651 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017653 grep -v '^ *+' conftest.er1 >conftest.err
17654 rm -f conftest.er1
17655 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17657 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017658 { ac_try='test -z "$ac_c_werror_flag"
17659 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17661 (eval $ac_try) 2>&5
17662 ac_status=$?
17663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17664 (exit $ac_status); }; } &&
17665 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17667 (eval $ac_try) 2>&5
17668 ac_status=$?
17669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17670 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017671 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017672else
Martin v. Löwis11437992002-04-12 09:54:03 +000017673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017674sed 's/^/| /' conftest.$ac_ext >&5
17675
Martin v. Löwis11437992002-04-12 09:54:03 +000017676
17677cat >>confdefs.h <<\_ACEOF
17678#define signed
17679_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017680
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017681
Guido van Rossum7f43da71994-08-01 12:15:30 +000017682fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017684echo "$as_me:$LINENO: result: $works" >&5
17685echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017686
Guido van Rossumda88dad1995-01-26 00:46:29 +000017687have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017688echo "$as_me:$LINENO: checking for prototypes" >&5
17689echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
17690cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017691/* confdefs.h. */
17692_ACEOF
17693cat confdefs.h >>conftest.$ac_ext
17694cat >>conftest.$ac_ext <<_ACEOF
17695/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017696int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017697int
17698main ()
17699{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017700return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000017701 ;
17702 return 0;
17703}
17704_ACEOF
17705rm -f conftest.$ac_objext
17706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017707 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017709 grep -v '^ *+' conftest.er1 >conftest.err
17710 rm -f conftest.er1
17711 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17713 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017714 { ac_try='test -z "$ac_c_werror_flag"
17715 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17717 (eval $ac_try) 2>&5
17718 ac_status=$?
17719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17720 (exit $ac_status); }; } &&
17721 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17723 (eval $ac_try) 2>&5
17724 ac_status=$?
17725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17726 (exit $ac_status); }; }; then
17727
17728
17729cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017730#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017731_ACEOF
17732
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017733 have_prototypes=yes
17734
Guido van Rossumf78abae1997-01-21 22:02:36 +000017735else
Martin v. Löwis11437992002-04-12 09:54:03 +000017736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017737sed 's/^/| /' conftest.$ac_ext >&5
17738
Guido van Rossum7f43da71994-08-01 12:15:30 +000017739fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017741echo "$as_me:$LINENO: result: $have_prototypes" >&5
17742echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017743
Guido van Rossumda88dad1995-01-26 00:46:29 +000017744works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017745echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17746echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17747cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017748/* confdefs.h. */
17749_ACEOF
17750cat confdefs.h >>conftest.$ac_ext
17751cat >>conftest.$ac_ext <<_ACEOF
17752/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017753
17754#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017755int foo(int x, ...) {
17756 va_list va;
17757 va_start(va, x);
17758 va_arg(va, int);
17759 va_arg(va, char *);
17760 va_arg(va, double);
17761 return 0;
17762}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017763
Martin v. Löwis11437992002-04-12 09:54:03 +000017764int
17765main ()
17766{
Guido van Rossum90eea071996-08-30 20:58:57 +000017767return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017768 ;
17769 return 0;
17770}
17771_ACEOF
17772rm -f conftest.$ac_objext
17773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017774 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017776 grep -v '^ *+' conftest.er1 >conftest.err
17777 rm -f conftest.er1
17778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17780 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017781 { ac_try='test -z "$ac_c_werror_flag"
17782 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17784 (eval $ac_try) 2>&5
17785 ac_status=$?
17786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17787 (exit $ac_status); }; } &&
17788 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17790 (eval $ac_try) 2>&5
17791 ac_status=$?
17792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17793 (exit $ac_status); }; }; then
17794
17795
17796cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017797#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017798_ACEOF
17799
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017800 works=yes
17801
Guido van Rossumf78abae1997-01-21 22:02:36 +000017802else
Martin v. Löwis11437992002-04-12 09:54:03 +000017803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017804sed 's/^/| /' conftest.$ac_ext >&5
17805
Guido van Rossum627b2d71993-12-24 10:39:16 +000017806fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017807rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017808echo "$as_me:$LINENO: result: $works" >&5
17809echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017810
Martin v. Löwisd6320502004-08-12 13:45:08 +000017811# check for socketpair
17812echo "$as_me:$LINENO: checking for socketpair" >&5
17813echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17814cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017815/* confdefs.h. */
17816_ACEOF
17817cat confdefs.h >>conftest.$ac_ext
17818cat >>conftest.$ac_ext <<_ACEOF
17819/* end confdefs.h. */
17820
17821#include <sys/types.h>
17822#include <sys/socket.h>
17823
17824int
17825main ()
17826{
17827void *x=socketpair
17828 ;
17829 return 0;
17830}
17831_ACEOF
17832rm -f conftest.$ac_objext
17833if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017834 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017836 grep -v '^ *+' conftest.er1 >conftest.err
17837 rm -f conftest.er1
17838 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17840 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017841 { ac_try='test -z "$ac_c_werror_flag"
17842 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17844 (eval $ac_try) 2>&5
17845 ac_status=$?
17846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17847 (exit $ac_status); }; } &&
17848 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000017849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17850 (eval $ac_try) 2>&5
17851 ac_status=$?
17852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17853 (exit $ac_status); }; }; then
17854
17855cat >>confdefs.h <<\_ACEOF
17856#define HAVE_SOCKETPAIR 1
17857_ACEOF
17858
17859 echo "$as_me:$LINENO: result: yes" >&5
17860echo "${ECHO_T}yes" >&6
17861else
17862 echo "$as_me: failed program was:" >&5
17863sed 's/^/| /' conftest.$ac_ext >&5
17864
17865echo "$as_me:$LINENO: result: no" >&5
17866echo "${ECHO_T}no" >&6
17867
17868fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017869rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017870
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017871# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017872echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17873echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017875/* confdefs.h. */
17876_ACEOF
17877cat confdefs.h >>conftest.$ac_ext
17878cat >>conftest.$ac_ext <<_ACEOF
17879/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017880#include <sys/types.h>
17881#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017882int
17883main ()
17884{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017885struct sockaddr x;
17886x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 ;
17888 return 0;
17889}
17890_ACEOF
17891rm -f conftest.$ac_objext
17892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017893 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017895 grep -v '^ *+' conftest.er1 >conftest.err
17896 rm -f conftest.er1
17897 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17899 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017900 { ac_try='test -z "$ac_c_werror_flag"
17901 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17903 (eval $ac_try) 2>&5
17904 ac_status=$?
17905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17906 (exit $ac_status); }; } &&
17907 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17909 (eval $ac_try) 2>&5
17910 ac_status=$?
17911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17912 (exit $ac_status); }; }; then
17913 echo "$as_me:$LINENO: result: yes" >&5
17914echo "${ECHO_T}yes" >&6
17915
17916cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017917#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017918_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017919
17920else
Martin v. Löwis11437992002-04-12 09:54:03 +000017921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017922sed 's/^/| /' conftest.$ac_ext >&5
17923
Martin v. Löwis11437992002-04-12 09:54:03 +000017924echo "$as_me:$LINENO: result: no" >&5
17925echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017926fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017927rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017928
Guido van Rossumda88dad1995-01-26 00:46:29 +000017929va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017930echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17931echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17932cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017933/* confdefs.h. */
17934_ACEOF
17935cat confdefs.h >>conftest.$ac_ext
17936cat >>conftest.$ac_ext <<_ACEOF
17937/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017938
17939#ifdef HAVE_STDARG_PROTOTYPES
17940#include <stdarg.h>
17941#else
17942#include <varargs.h>
17943#endif
17944
Martin v. Löwis11437992002-04-12 09:54:03 +000017945int
17946main ()
17947{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017948va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017949 ;
17950 return 0;
17951}
17952_ACEOF
17953rm -f conftest.$ac_objext
17954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017955 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017957 grep -v '^ *+' conftest.er1 >conftest.err
17958 rm -f conftest.er1
17959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17961 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017962 { ac_try='test -z "$ac_c_werror_flag"
17963 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17965 (eval $ac_try) 2>&5
17966 ac_status=$?
17967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17968 (exit $ac_status); }; } &&
17969 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17971 (eval $ac_try) 2>&5
17972 ac_status=$?
17973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17974 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017975 :
17976else
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017978sed 's/^/| /' conftest.$ac_ext >&5
17979
Martin v. Löwis11437992002-04-12 09:54:03 +000017980
17981
17982cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017983#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017984_ACEOF
17985
Guido van Rossumda88dad1995-01-26 00:46:29 +000017986 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017987
Guido van Rossum76be6ed1995-01-02 18:33:54 +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: $va_list_is_array" >&5
17991echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017992
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017993# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017994
17995
17996
17997echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17998echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17999if test "${ac_cv_func_gethostbyname_r+set}" = set; then
18000 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018001else
Martin v. Löwis11437992002-04-12 09:54:03 +000018002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018003/* confdefs.h. */
18004_ACEOF
18005cat confdefs.h >>conftest.$ac_ext
18006cat >>conftest.$ac_ext <<_ACEOF
18007/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018008/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018009 which can conflict with char gethostbyname_r (); below.
18010 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018011 <limits.h> exists even on freestanding compilers. Under hpux,
18012 including <limits.h> includes <sys/time.h> and causes problems
18013 checking for functions defined therein. */
18014#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018015# include <limits.h>
18016#else
18017# include <assert.h>
18018#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018019/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018020#ifdef __cplusplus
18021extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018022{
Martin v. Löwis11437992002-04-12 09:54:03 +000018023#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018024/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018025 builtin and then its argument prototype would still apply. */
18026char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018027/* The GNU C library defines this for functions which it implements
18028 to always fail with ENOSYS. Some functions are actually named
18029 something starting with __ and the normal name is an alias. */
18030#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
18031choke me
18032#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018033char (*f) () = gethostbyname_r;
18034#endif
18035#ifdef __cplusplus
18036}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018037#endif
18038
Skip Montanaro6dead952003-09-25 14:50:04 +000018039int
18040main ()
18041{
18042return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 ;
18044 return 0;
18045}
18046_ACEOF
18047rm -f conftest.$ac_objext conftest$ac_exeext
18048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018049 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018051 grep -v '^ *+' conftest.er1 >conftest.err
18052 rm -f conftest.er1
18053 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18055 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018056 { ac_try='test -z "$ac_c_werror_flag"
18057 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18059 (eval $ac_try) 2>&5
18060 ac_status=$?
18061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18062 (exit $ac_status); }; } &&
18063 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18065 (eval $ac_try) 2>&5
18066 ac_status=$?
18067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068 (exit $ac_status); }; }; then
18069 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018070else
Martin v. Löwis11437992002-04-12 09:54:03 +000018071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018072sed 's/^/| /' conftest.$ac_ext >&5
18073
Martin v. Löwis11437992002-04-12 09:54:03 +000018074ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018075fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018076rm -f conftest.err conftest.$ac_objext \
18077 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018079echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
18080echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
18081if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018082
Martin v. Löwis11437992002-04-12 09:54:03 +000018083 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018084#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018085_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018086
Martin v. Löwis11437992002-04-12 09:54:03 +000018087 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
18088echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018089 OLD_CFLAGS=$CFLAGS
18090 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018092/* confdefs.h. */
18093_ACEOF
18094cat confdefs.h >>conftest.$ac_ext
18095cat >>conftest.$ac_ext <<_ACEOF
18096/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018097
18098# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018099
Martin v. Löwis11437992002-04-12 09:54:03 +000018100int
18101main ()
18102{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018103
18104 char *name;
18105 struct hostent *he, *res;
18106 char buffer[2048];
18107 int buflen = 2048;
18108 int h_errnop;
18109
18110 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018111
18112 ;
18113 return 0;
18114}
18115_ACEOF
18116rm -f conftest.$ac_objext
18117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018118 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018120 grep -v '^ *+' conftest.er1 >conftest.err
18121 rm -f conftest.er1
18122 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18124 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018125 { ac_try='test -z "$ac_c_werror_flag"
18126 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18128 (eval $ac_try) 2>&5
18129 ac_status=$?
18130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18131 (exit $ac_status); }; } &&
18132 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18134 (eval $ac_try) 2>&5
18135 ac_status=$?
18136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18137 (exit $ac_status); }; }; then
18138
18139 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018140#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018141_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018142
Martin v. Löwis11437992002-04-12 09:54:03 +000018143
18144cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018145#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018146_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018147
Martin v. Löwis11437992002-04-12 09:54:03 +000018148 echo "$as_me:$LINENO: result: yes" >&5
18149echo "${ECHO_T}yes" >&6
18150
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018151else
Martin v. Löwis11437992002-04-12 09:54:03 +000018152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018153sed 's/^/| /' conftest.$ac_ext >&5
18154
Martin v. Löwis11437992002-04-12 09:54:03 +000018155
18156 echo "$as_me:$LINENO: result: no" >&5
18157echo "${ECHO_T}no" >&6
18158 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
18159echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
18160 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018161/* confdefs.h. */
18162_ACEOF
18163cat confdefs.h >>conftest.$ac_ext
18164cat >>conftest.$ac_ext <<_ACEOF
18165/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018166
18167# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018168
Martin v. Löwis11437992002-04-12 09:54:03 +000018169int
18170main ()
18171{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018172
18173 char *name;
18174 struct hostent *he;
18175 char buffer[2048];
18176 int buflen = 2048;
18177 int h_errnop;
18178
18179 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018180
18181 ;
18182 return 0;
18183}
18184_ACEOF
18185rm -f conftest.$ac_objext
18186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018187 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018189 grep -v '^ *+' conftest.er1 >conftest.err
18190 rm -f conftest.er1
18191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18193 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018194 { ac_try='test -z "$ac_c_werror_flag"
18195 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18197 (eval $ac_try) 2>&5
18198 ac_status=$?
18199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18200 (exit $ac_status); }; } &&
18201 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18203 (eval $ac_try) 2>&5
18204 ac_status=$?
18205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18206 (exit $ac_status); }; }; then
18207
18208 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018209#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018210_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018211
Martin v. Löwis11437992002-04-12 09:54:03 +000018212
18213cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018214#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018215_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018216
Martin v. Löwis11437992002-04-12 09:54:03 +000018217 echo "$as_me:$LINENO: result: yes" >&5
18218echo "${ECHO_T}yes" >&6
18219
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018220else
Martin v. Löwis11437992002-04-12 09:54:03 +000018221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018222sed 's/^/| /' conftest.$ac_ext >&5
18223
Martin v. Löwis11437992002-04-12 09:54:03 +000018224
18225 echo "$as_me:$LINENO: result: no" >&5
18226echo "${ECHO_T}no" >&6
18227 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
18228echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
18229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018230/* confdefs.h. */
18231_ACEOF
18232cat confdefs.h >>conftest.$ac_ext
18233cat >>conftest.$ac_ext <<_ACEOF
18234/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018235
18236# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018237
Martin v. Löwis11437992002-04-12 09:54:03 +000018238int
18239main ()
18240{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018241
18242 char *name;
18243 struct hostent *he;
18244 struct hostent_data data;
18245
18246 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000018247
18248 ;
18249 return 0;
18250}
18251_ACEOF
18252rm -f conftest.$ac_objext
18253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018254 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018256 grep -v '^ *+' conftest.er1 >conftest.err
18257 rm -f conftest.er1
18258 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18260 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018261 { ac_try='test -z "$ac_c_werror_flag"
18262 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18264 (eval $ac_try) 2>&5
18265 ac_status=$?
18266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18267 (exit $ac_status); }; } &&
18268 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18270 (eval $ac_try) 2>&5
18271 ac_status=$?
18272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18273 (exit $ac_status); }; }; then
18274
18275 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018276#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018277_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018278
Martin v. Löwis11437992002-04-12 09:54:03 +000018279
18280cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018281#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018282_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018283
Martin v. Löwis11437992002-04-12 09:54:03 +000018284 echo "$as_me:$LINENO: result: yes" >&5
18285echo "${ECHO_T}yes" >&6
18286
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018287else
Martin v. Löwis11437992002-04-12 09:54:03 +000018288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018289sed 's/^/| /' conftest.$ac_ext >&5
18290
Martin v. Löwis11437992002-04-12 09:54:03 +000018291
18292 echo "$as_me:$LINENO: result: no" >&5
18293echo "${ECHO_T}no" >&6
18294
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018295fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018297
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018298fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018299rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018300
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018301fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018302rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018303 CFLAGS=$OLD_CFLAGS
18304
18305else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018306
Martin v. Löwis11437992002-04-12 09:54:03 +000018307
18308for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000018309do
Martin v. Löwis11437992002-04-12 09:54:03 +000018310as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18311echo "$as_me:$LINENO: checking for $ac_func" >&5
18312echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18313if eval "test \"\${$as_ac_var+set}\" = set"; then
18314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018315else
Martin v. Löwis11437992002-04-12 09:54:03 +000018316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018317/* confdefs.h. */
18318_ACEOF
18319cat confdefs.h >>conftest.$ac_ext
18320cat >>conftest.$ac_ext <<_ACEOF
18321/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018322/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018323 which can conflict with char $ac_func (); below.
18324 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018325 <limits.h> exists even on freestanding compilers. Under hpux,
18326 including <limits.h> includes <sys/time.h> and causes problems
18327 checking for functions defined therein. */
18328#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018329# include <limits.h>
18330#else
18331# include <assert.h>
18332#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018333/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018334#ifdef __cplusplus
18335extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018336{
Martin v. Löwis11437992002-04-12 09:54:03 +000018337#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018338/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018339 builtin and then its argument prototype would still apply. */
18340char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018341/* The GNU C library defines this for functions which it implements
18342 to always fail with ENOSYS. Some functions are actually named
18343 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000018344#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018345choke me
18346#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018347char (*f) () = $ac_func;
18348#endif
18349#ifdef __cplusplus
18350}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018351#endif
18352
Skip Montanaro6dead952003-09-25 14:50:04 +000018353int
18354main ()
18355{
18356return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018357 ;
18358 return 0;
18359}
18360_ACEOF
18361rm -f conftest.$ac_objext conftest$ac_exeext
18362if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018363 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018365 grep -v '^ *+' conftest.er1 >conftest.err
18366 rm -f conftest.er1
18367 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18369 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018370 { ac_try='test -z "$ac_c_werror_flag"
18371 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18373 (eval $ac_try) 2>&5
18374 ac_status=$?
18375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18376 (exit $ac_status); }; } &&
18377 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18379 (eval $ac_try) 2>&5
18380 ac_status=$?
18381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18382 (exit $ac_status); }; }; then
18383 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018384else
Martin v. Löwis11437992002-04-12 09:54:03 +000018385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018386sed 's/^/| /' conftest.$ac_ext >&5
18387
Martin v. Löwis11437992002-04-12 09:54:03 +000018388eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018389fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018390rm -f conftest.err conftest.$ac_objext \
18391 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018392fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018393echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18394echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18395if test `eval echo '${'$as_ac_var'}'` = yes; then
18396 cat >>confdefs.h <<_ACEOF
18397#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18398_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018400fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018401done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018402
Michael W. Hudson54241132001-12-07 15:38:26 +000018403
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018404fi
18405
Michael W. Hudson54241132001-12-07 15:38:26 +000018406
18407
18408
18409
18410
18411
Guido van Rossum627b2d71993-12-24 10:39:16 +000018412# checks for system services
18413# (none yet)
18414
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018415# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000018416echo "$as_me:$LINENO: checking for __fpu_control" >&5
18417echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
18418if test "${ac_cv_func___fpu_control+set}" = set; then
18419 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018420else
Martin v. Löwis11437992002-04-12 09:54:03 +000018421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018422/* confdefs.h. */
18423_ACEOF
18424cat confdefs.h >>conftest.$ac_ext
18425cat >>conftest.$ac_ext <<_ACEOF
18426/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018427/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018428 which can conflict with char __fpu_control (); below.
18429 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018430 <limits.h> exists even on freestanding compilers. Under hpux,
18431 including <limits.h> includes <sys/time.h> and causes problems
18432 checking for functions defined therein. */
18433#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018434# include <limits.h>
18435#else
18436# include <assert.h>
18437#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018438/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018439#ifdef __cplusplus
18440extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018441{
Martin v. Löwis11437992002-04-12 09:54:03 +000018442#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018443/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018444 builtin and then its argument prototype would still apply. */
18445char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018446/* The GNU C library defines this for functions which it implements
18447 to always fail with ENOSYS. Some functions are actually named
18448 something starting with __ and the normal name is an alias. */
18449#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
18450choke me
18451#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018452char (*f) () = __fpu_control;
18453#endif
18454#ifdef __cplusplus
18455}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018456#endif
18457
Skip Montanaro6dead952003-09-25 14:50:04 +000018458int
18459main ()
18460{
18461return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000018462 ;
18463 return 0;
18464}
18465_ACEOF
18466rm -f conftest.$ac_objext conftest$ac_exeext
18467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018468 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018470 grep -v '^ *+' conftest.er1 >conftest.err
18471 rm -f conftest.er1
18472 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18474 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018475 { ac_try='test -z "$ac_c_werror_flag"
18476 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18478 (eval $ac_try) 2>&5
18479 ac_status=$?
18480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18481 (exit $ac_status); }; } &&
18482 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18484 (eval $ac_try) 2>&5
18485 ac_status=$?
18486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18487 (exit $ac_status); }; }; then
18488 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018489else
Martin v. Löwis11437992002-04-12 09:54:03 +000018490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018491sed 's/^/| /' conftest.$ac_ext >&5
18492
Martin v. Löwis11437992002-04-12 09:54:03 +000018493ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018494fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018495rm -f conftest.err conftest.$ac_objext \
18496 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018498echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
18499echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
18500if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018501 :
18502else
Martin v. Löwis11437992002-04-12 09:54:03 +000018503
18504echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
18505echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
18506if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
18507 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018508else
Martin v. Löwis11437992002-04-12 09:54:03 +000018509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018510LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018512/* confdefs.h. */
18513_ACEOF
18514cat confdefs.h >>conftest.$ac_ext
18515cat >>conftest.$ac_ext <<_ACEOF
18516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018517
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018518/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018519#ifdef __cplusplus
18520extern "C"
18521#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018522/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 builtin and then its argument prototype would still apply. */
18524char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018525int
18526main ()
18527{
18528__fpu_control ();
18529 ;
18530 return 0;
18531}
18532_ACEOF
18533rm -f conftest.$ac_objext conftest$ac_exeext
18534if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018535 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018537 grep -v '^ *+' conftest.er1 >conftest.err
18538 rm -f conftest.er1
18539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18541 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018542 { ac_try='test -z "$ac_c_werror_flag"
18543 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18545 (eval $ac_try) 2>&5
18546 ac_status=$?
18547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18548 (exit $ac_status); }; } &&
18549 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18551 (eval $ac_try) 2>&5
18552 ac_status=$?
18553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18554 (exit $ac_status); }; }; then
18555 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018556else
Martin v. Löwis11437992002-04-12 09:54:03 +000018557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018558sed 's/^/| /' conftest.$ac_ext >&5
18559
Martin v. Löwis11437992002-04-12 09:54:03 +000018560ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018561fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018562rm -f conftest.err conftest.$ac_objext \
18563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018564LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018566echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
18567echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
18568if test $ac_cv_lib_ieee___fpu_control = yes; then
18569 cat >>confdefs.h <<_ACEOF
18570#define HAVE_LIBIEEE 1
18571_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018572
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018573 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018574
Guido van Rossum627b2d71993-12-24 10:39:16 +000018575fi
18576
Michael W. Hudson54241132001-12-07 15:38:26 +000018577
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018578fi
18579
Michael W. Hudson54241132001-12-07 15:38:26 +000018580
Guido van Rossum7f253911997-05-09 02:42:48 +000018581# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000018582echo "$as_me:$LINENO: checking for --with-fpectl" >&5
18583echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
18584
Guido van Rossum7f253911997-05-09 02:42:48 +000018585# Check whether --with-fpectl or --without-fpectl was given.
18586if test "${with_fpectl+set}" = set; then
18587 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000018588
Guido van Rossum7f253911997-05-09 02:42:48 +000018589if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018590then
18591
18592cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000018593#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018594_ACEOF
18595
18596 echo "$as_me:$LINENO: result: yes" >&5
18597echo "${ECHO_T}yes" >&6
18598else echo "$as_me:$LINENO: result: no" >&5
18599echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018600fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018601else
Martin v. Löwis11437992002-04-12 09:54:03 +000018602 echo "$as_me:$LINENO: result: no" >&5
18603echo "${ECHO_T}no" >&6
18604fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000018605
Guido van Rossum7f43da71994-08-01 12:15:30 +000018606# check for --with-libm=...
18607
Guido van Rossum563e7081996-09-10 18:20:48 +000018608case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000018609Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000018610BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000018611*) LIBM=-lm
18612esac
Martin v. Löwis11437992002-04-12 09:54:03 +000018613echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
18614echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
18615
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018616# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018617if test "${with_libm+set}" = set; then
18618 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000018619
Guido van Rossum7f253911997-05-09 02:42:48 +000018620if test "$withval" = no
18621then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000018622 echo "$as_me:$LINENO: result: force LIBM empty" >&5
18623echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018624elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018625then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
18627echo "${ECHO_T}set LIBM=\"$withval\"" >&6
18628else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
18629echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
18630 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018631fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018632else
Martin v. Löwis11437992002-04-12 09:54:03 +000018633 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
18634echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
18635fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018636
18637# check for --with-libc=...
18638
Martin v. Löwis11437992002-04-12 09:54:03 +000018639echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18640echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18641
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018642# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018643if test "${with_libc+set}" = set; then
18644 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018645
Guido van Rossum7f253911997-05-09 02:42:48 +000018646if test "$withval" = no
18647then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018648 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18649echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018650elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018651then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018652 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18653echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18654else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18655echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18656 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018657fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018658else
Martin v. Löwis11437992002-04-12 09:54:03 +000018659 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18660echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18661fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018662
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018663# check for hypot() in math library
18664LIBS_SAVE=$LIBS
18665LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018666
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018667for ac_func in hypot
18668do
Martin v. Löwis11437992002-04-12 09:54:03 +000018669as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18670echo "$as_me:$LINENO: checking for $ac_func" >&5
18671echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18672if eval "test \"\${$as_ac_var+set}\" = set"; then
18673 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018674else
Martin v. Löwis11437992002-04-12 09:54:03 +000018675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018676/* confdefs.h. */
18677_ACEOF
18678cat confdefs.h >>conftest.$ac_ext
18679cat >>conftest.$ac_ext <<_ACEOF
18680/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018681/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018682 which can conflict with char $ac_func (); below.
18683 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018684 <limits.h> exists even on freestanding compilers. Under hpux,
18685 including <limits.h> includes <sys/time.h> and causes problems
18686 checking for functions defined therein. */
18687#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018688# include <limits.h>
18689#else
18690# include <assert.h>
18691#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018692/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018693#ifdef __cplusplus
18694extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018695{
Martin v. Löwis11437992002-04-12 09:54:03 +000018696#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018697/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018698 builtin and then its argument prototype would still apply. */
18699char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018700/* The GNU C library defines this for functions which it implements
18701 to always fail with ENOSYS. Some functions are actually named
18702 something starting with __ and the normal name is an alias. */
18703#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18704choke me
18705#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018706char (*f) () = $ac_func;
18707#endif
18708#ifdef __cplusplus
18709}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018710#endif
18711
Skip Montanaro6dead952003-09-25 14:50:04 +000018712int
18713main ()
18714{
18715return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018716 ;
18717 return 0;
18718}
18719_ACEOF
18720rm -f conftest.$ac_objext conftest$ac_exeext
18721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018722 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018724 grep -v '^ *+' conftest.er1 >conftest.err
18725 rm -f conftest.er1
18726 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18728 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018729 { ac_try='test -z "$ac_c_werror_flag"
18730 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18732 (eval $ac_try) 2>&5
18733 ac_status=$?
18734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18735 (exit $ac_status); }; } &&
18736 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18738 (eval $ac_try) 2>&5
18739 ac_status=$?
18740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18741 (exit $ac_status); }; }; then
18742 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018743else
Martin v. Löwis11437992002-04-12 09:54:03 +000018744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018745sed 's/^/| /' conftest.$ac_ext >&5
18746
Martin v. Löwis11437992002-04-12 09:54:03 +000018747eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018748fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018749rm -f conftest.err conftest.$ac_objext \
18750 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018752echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18753echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18754if test `eval echo '${'$as_ac_var'}'` = yes; then
18755 cat >>confdefs.h <<_ACEOF
18756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18757_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018758
Michael W. Hudson54241132001-12-07 15:38:26 +000018759else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018760 case $LIBOBJS in
18761 "$ac_func.$ac_objext" | \
18762 *" $ac_func.$ac_objext" | \
18763 "$ac_func.$ac_objext "* | \
18764 *" $ac_func.$ac_objext "* ) ;;
18765 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18766esac
18767
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018768fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018769done
18770
Michael W. Hudson54241132001-12-07 15:38:26 +000018771
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018772LIBS=$LIBS_SAVE
18773
Guido van Rossumef2255b2000-03-10 22:30:29 +000018774# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018775if test "${ac_cv_header_wchar_h+set}" = set; then
18776 echo "$as_me:$LINENO: checking for wchar.h" >&5
18777echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18778if test "${ac_cv_header_wchar_h+set}" = set; then
18779 echo $ECHO_N "(cached) $ECHO_C" >&6
18780fi
18781echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18782echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018783else
Martin v. Löwis11437992002-04-12 09:54:03 +000018784 # Is the header compilable?
18785echo "$as_me:$LINENO: checking wchar.h usability" >&5
18786echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018788/* confdefs.h. */
18789_ACEOF
18790cat confdefs.h >>conftest.$ac_ext
18791cat >>conftest.$ac_ext <<_ACEOF
18792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018793$ac_includes_default
18794#include <wchar.h>
18795_ACEOF
18796rm -f conftest.$ac_objext
18797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018798 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018800 grep -v '^ *+' conftest.er1 >conftest.err
18801 rm -f conftest.er1
18802 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18804 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018805 { ac_try='test -z "$ac_c_werror_flag"
18806 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18808 (eval $ac_try) 2>&5
18809 ac_status=$?
18810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18811 (exit $ac_status); }; } &&
18812 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18814 (eval $ac_try) 2>&5
18815 ac_status=$?
18816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18817 (exit $ac_status); }; }; then
18818 ac_header_compiler=yes
18819else
18820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018821sed 's/^/| /' conftest.$ac_ext >&5
18822
Martin v. Löwis11437992002-04-12 09:54:03 +000018823ac_header_compiler=no
18824fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018826echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18827echo "${ECHO_T}$ac_header_compiler" >&6
18828
18829# Is the header present?
18830echo "$as_me:$LINENO: checking wchar.h presence" >&5
18831echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18832cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018833/* confdefs.h. */
18834_ACEOF
18835cat confdefs.h >>conftest.$ac_ext
18836cat >>conftest.$ac_ext <<_ACEOF
18837/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018838#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018839_ACEOF
18840if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18841 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18842 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018843 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018844 rm -f conftest.er1
18845 cat conftest.err >&5
18846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18847 (exit $ac_status); } >/dev/null; then
18848 if test -s conftest.err; then
18849 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018850 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018851 else
18852 ac_cpp_err=
18853 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018854else
Martin v. Löwis11437992002-04-12 09:54:03 +000018855 ac_cpp_err=yes
18856fi
18857if test -z "$ac_cpp_err"; then
18858 ac_header_preproc=yes
18859else
18860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018861sed 's/^/| /' conftest.$ac_ext >&5
18862
Martin v. Löwis11437992002-04-12 09:54:03 +000018863 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018864fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018865rm -f conftest.err conftest.$ac_ext
18866echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18867echo "${ECHO_T}$ac_header_preproc" >&6
18868
18869# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018870case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18871 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018872 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18873echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018874 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18875echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18876 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018877 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018878 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018879 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18880echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018881 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18882echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18883 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18884echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18885 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18886echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018887 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18888echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018889 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18890echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018891 (
18892 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000018893## ------------------------------------------------ ##
18894## Report this to http://www.python.org/python-bugs ##
18895## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018896_ASBOX
18897 ) |
18898 sed "s/^/$as_me: WARNING: /" >&2
18899 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018900esac
18901echo "$as_me:$LINENO: checking for wchar.h" >&5
18902echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18903if test "${ac_cv_header_wchar_h+set}" = set; then
18904 echo $ECHO_N "(cached) $ECHO_C" >&6
18905else
18906 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018907fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018908echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18909echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18910
18911fi
18912if test $ac_cv_header_wchar_h = yes; then
18913
18914
18915cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018916#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018917_ACEOF
18918
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018919 wchar_h="yes"
18920
Guido van Rossumef2255b2000-03-10 22:30:29 +000018921else
Martin v. Löwis11437992002-04-12 09:54:03 +000018922 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018923
18924fi
18925
Michael W. Hudson54241132001-12-07 15:38:26 +000018926
Martin v. Löwis11437992002-04-12 09:54:03 +000018927
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018928# determine wchar_t size
18929if test "$wchar_h" = yes
18930then
Martin v. Löwis11437992002-04-12 09:54:03 +000018931 echo "$as_me:$LINENO: checking for wchar_t" >&5
18932echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18933if test "${ac_cv_type_wchar_t+set}" = set; then
18934 echo $ECHO_N "(cached) $ECHO_C" >&6
18935else
18936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018937/* confdefs.h. */
18938_ACEOF
18939cat confdefs.h >>conftest.$ac_ext
18940cat >>conftest.$ac_ext <<_ACEOF
18941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018942#include <wchar.h>
18943
Martin v. Löwis11437992002-04-12 09:54:03 +000018944int
18945main ()
18946{
18947if ((wchar_t *) 0)
18948 return 0;
18949if (sizeof (wchar_t))
18950 return 0;
18951 ;
18952 return 0;
18953}
18954_ACEOF
18955rm -f conftest.$ac_objext
18956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018957 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018959 grep -v '^ *+' conftest.er1 >conftest.err
18960 rm -f conftest.er1
18961 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18963 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018964 { ac_try='test -z "$ac_c_werror_flag"
18965 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18967 (eval $ac_try) 2>&5
18968 ac_status=$?
18969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18970 (exit $ac_status); }; } &&
18971 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18973 (eval $ac_try) 2>&5
18974 ac_status=$?
18975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18976 (exit $ac_status); }; }; then
18977 ac_cv_type_wchar_t=yes
18978else
18979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018980sed 's/^/| /' conftest.$ac_ext >&5
18981
Martin v. Löwis11437992002-04-12 09:54:03 +000018982ac_cv_type_wchar_t=no
18983fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018984rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018985fi
18986echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18987echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18988
18989echo "$as_me:$LINENO: checking size of wchar_t" >&5
18990echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18991if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18992 echo $ECHO_N "(cached) $ECHO_C" >&6
18993else
18994 if test "$ac_cv_type_wchar_t" = yes; then
18995 # The cast to unsigned long works around a bug in the HP C Compiler
18996 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18997 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18998 # This bug is HP SR number 8606223364.
18999 if test "$cross_compiling" = yes; then
19000 # Depending upon the size, compute the lo and hi bounds.
19001cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019002/* confdefs.h. */
19003_ACEOF
19004cat confdefs.h >>conftest.$ac_ext
19005cat >>conftest.$ac_ext <<_ACEOF
19006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019007#include <wchar.h>
19008
Martin v. Löwis11437992002-04-12 09:54:03 +000019009int
19010main ()
19011{
19012static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
19013test_array [0] = 0
19014
19015 ;
19016 return 0;
19017}
19018_ACEOF
19019rm -f conftest.$ac_objext
19020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019021 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019023 grep -v '^ *+' conftest.er1 >conftest.err
19024 rm -f conftest.er1
19025 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19027 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019028 { ac_try='test -z "$ac_c_werror_flag"
19029 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19031 (eval $ac_try) 2>&5
19032 ac_status=$?
19033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19034 (exit $ac_status); }; } &&
19035 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19037 (eval $ac_try) 2>&5
19038 ac_status=$?
19039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19040 (exit $ac_status); }; }; then
19041 ac_lo=0 ac_mid=0
19042 while :; do
19043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019044/* confdefs.h. */
19045_ACEOF
19046cat confdefs.h >>conftest.$ac_ext
19047cat >>conftest.$ac_ext <<_ACEOF
19048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019049#include <wchar.h>
19050
Martin v. Löwis11437992002-04-12 09:54:03 +000019051int
19052main ()
19053{
19054static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19055test_array [0] = 0
19056
19057 ;
19058 return 0;
19059}
19060_ACEOF
19061rm -f conftest.$ac_objext
19062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019063 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019065 grep -v '^ *+' conftest.er1 >conftest.err
19066 rm -f conftest.er1
19067 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19069 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019070 { ac_try='test -z "$ac_c_werror_flag"
19071 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19073 (eval $ac_try) 2>&5
19074 ac_status=$?
19075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19076 (exit $ac_status); }; } &&
19077 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19079 (eval $ac_try) 2>&5
19080 ac_status=$?
19081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19082 (exit $ac_status); }; }; then
19083 ac_hi=$ac_mid; break
19084else
19085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019086sed 's/^/| /' conftest.$ac_ext >&5
19087
Martin v. Löwis11437992002-04-12 09:54:03 +000019088ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019089 if test $ac_lo -le $ac_mid; then
19090 ac_lo= ac_hi=
19091 break
19092 fi
19093 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000019094fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019096 done
19097else
19098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019099sed 's/^/| /' conftest.$ac_ext >&5
19100
Martin v. Löwis11437992002-04-12 09:54:03 +000019101cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019102/* confdefs.h. */
19103_ACEOF
19104cat confdefs.h >>conftest.$ac_ext
19105cat >>conftest.$ac_ext <<_ACEOF
19106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019107#include <wchar.h>
19108
Martin v. Löwis11437992002-04-12 09:54:03 +000019109int
19110main ()
19111{
19112static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
19113test_array [0] = 0
19114
19115 ;
19116 return 0;
19117}
19118_ACEOF
19119rm -f conftest.$ac_objext
19120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019121 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019123 grep -v '^ *+' conftest.er1 >conftest.err
19124 rm -f conftest.er1
19125 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19127 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019128 { ac_try='test -z "$ac_c_werror_flag"
19129 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19131 (eval $ac_try) 2>&5
19132 ac_status=$?
19133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19134 (exit $ac_status); }; } &&
19135 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19137 (eval $ac_try) 2>&5
19138 ac_status=$?
19139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19140 (exit $ac_status); }; }; then
19141 ac_hi=-1 ac_mid=-1
19142 while :; do
19143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019144/* confdefs.h. */
19145_ACEOF
19146cat confdefs.h >>conftest.$ac_ext
19147cat >>conftest.$ac_ext <<_ACEOF
19148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019149#include <wchar.h>
19150
Martin v. Löwis11437992002-04-12 09:54:03 +000019151int
19152main ()
19153{
19154static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
19155test_array [0] = 0
19156
19157 ;
19158 return 0;
19159}
19160_ACEOF
19161rm -f conftest.$ac_objext
19162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019163 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019165 grep -v '^ *+' conftest.er1 >conftest.err
19166 rm -f conftest.er1
19167 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19169 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019170 { ac_try='test -z "$ac_c_werror_flag"
19171 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19173 (eval $ac_try) 2>&5
19174 ac_status=$?
19175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19176 (exit $ac_status); }; } &&
19177 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19179 (eval $ac_try) 2>&5
19180 ac_status=$?
19181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19182 (exit $ac_status); }; }; then
19183 ac_lo=$ac_mid; break
19184else
19185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019186sed 's/^/| /' conftest.$ac_ext >&5
19187
Martin v. Löwis11437992002-04-12 09:54:03 +000019188ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019189 if test $ac_mid -le $ac_hi; then
19190 ac_lo= ac_hi=
19191 break
19192 fi
19193 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000019194fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019195rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019196 done
19197else
19198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019199sed 's/^/| /' conftest.$ac_ext >&5
19200
Martin v. Löwis11437992002-04-12 09:54:03 +000019201ac_lo= ac_hi=
19202fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019203rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019204fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019205rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019206# Binary search between lo and hi bounds.
19207while test "x$ac_lo" != "x$ac_hi"; do
19208 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019210/* confdefs.h. */
19211_ACEOF
19212cat confdefs.h >>conftest.$ac_ext
19213cat >>conftest.$ac_ext <<_ACEOF
19214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019215#include <wchar.h>
19216
Martin v. Löwis11437992002-04-12 09:54:03 +000019217int
19218main ()
19219{
19220static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19221test_array [0] = 0
19222
19223 ;
19224 return 0;
19225}
19226_ACEOF
19227rm -f conftest.$ac_objext
19228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019229 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019231 grep -v '^ *+' conftest.er1 >conftest.err
19232 rm -f conftest.er1
19233 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19235 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019236 { ac_try='test -z "$ac_c_werror_flag"
19237 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19239 (eval $ac_try) 2>&5
19240 ac_status=$?
19241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19242 (exit $ac_status); }; } &&
19243 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19245 (eval $ac_try) 2>&5
19246 ac_status=$?
19247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19248 (exit $ac_status); }; }; then
19249 ac_hi=$ac_mid
19250else
19251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019252sed 's/^/| /' conftest.$ac_ext >&5
19253
Martin v. Löwis11437992002-04-12 09:54:03 +000019254ac_lo=`expr '(' $ac_mid ')' + 1`
19255fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019256rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019257done
19258case $ac_lo in
19259?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019260'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19261See \`config.log' for more details." >&5
19262echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19263See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019264 { (exit 1); exit 1; }; } ;;
19265esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019266else
19267 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000019268 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19269See \`config.log' for more details." >&5
19270echo "$as_me: error: cannot run test program while cross compiling
19271See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019272 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000019273else
Martin v. Löwis11437992002-04-12 09:54:03 +000019274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019275/* confdefs.h. */
19276_ACEOF
19277cat confdefs.h >>conftest.$ac_ext
19278cat >>conftest.$ac_ext <<_ACEOF
19279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019280#include <wchar.h>
19281
19282long longval () { return (long) (sizeof (wchar_t)); }
19283unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000019284#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019285#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019286int
19287main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019288{
Martin v. Löwis11437992002-04-12 09:54:03 +000019289
19290 FILE *f = fopen ("conftest.val", "w");
19291 if (! f)
19292 exit (1);
19293 if (((long) (sizeof (wchar_t))) < 0)
19294 {
19295 long i = longval ();
19296 if (i != ((long) (sizeof (wchar_t))))
19297 exit (1);
19298 fprintf (f, "%ld\n", i);
19299 }
19300 else
19301 {
19302 unsigned long i = ulongval ();
19303 if (i != ((long) (sizeof (wchar_t))))
19304 exit (1);
19305 fprintf (f, "%lu\n", i);
19306 }
19307 exit (ferror (f) || fclose (f) != 0);
19308
19309 ;
19310 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000019311}
Martin v. Löwis11437992002-04-12 09:54:03 +000019312_ACEOF
19313rm -f conftest$ac_exeext
19314if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19315 (eval $ac_link) 2>&5
19316 ac_status=$?
19317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19318 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19320 (eval $ac_try) 2>&5
19321 ac_status=$?
19322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19323 (exit $ac_status); }; }; then
19324 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000019325else
Martin v. Löwis11437992002-04-12 09:54:03 +000019326 echo "$as_me: program exited with status $ac_status" >&5
19327echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019328sed 's/^/| /' conftest.$ac_ext >&5
19329
Martin v. Löwis11437992002-04-12 09:54:03 +000019330( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000019331{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19332See \`config.log' for more details." >&5
19333echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19334See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019335 { (exit 1); exit 1; }; }
19336fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019337rm -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 +000019338fi
19339fi
19340rm -f conftest.val
19341else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019342 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000019343fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019344fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019345echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
19346echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
19347cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019348#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019349_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019350
Michael W. Hudson54241132001-12-07 15:38:26 +000019351
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019352fi
19353
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019354echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
19355echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
19356have_ucs4_tcl=no
19357cat >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öwisfa3bdea2003-09-04 18:50:54 +000019363
19364#include <tcl.h>
19365#if TCL_UTF_MAX != 6
19366# error "NOT UCS4_TCL"
19367#endif
19368int
19369main ()
19370{
19371
19372 ;
19373 return 0;
19374}
19375_ACEOF
19376rm -f conftest.$ac_objext
19377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019378 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019380 grep -v '^ *+' conftest.er1 >conftest.err
19381 rm -f conftest.er1
19382 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19384 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019385 { ac_try='test -z "$ac_c_werror_flag"
19386 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19388 (eval $ac_try) 2>&5
19389 ac_status=$?
19390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19391 (exit $ac_status); }; } &&
19392 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19394 (eval $ac_try) 2>&5
19395 ac_status=$?
19396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19397 (exit $ac_status); }; }; then
19398
19399
19400cat >>confdefs.h <<\_ACEOF
19401#define HAVE_UCS4_TCL 1
19402_ACEOF
19403
19404 have_ucs4_tcl=yes
19405
19406else
19407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019408sed 's/^/| /' conftest.$ac_ext >&5
19409
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019410fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019411rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019412echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
19413echo "${ECHO_T}$have_ucs4_tcl" >&6
19414
Skip Montanaro6dead952003-09-25 14:50:04 +000019415# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019416if test "$wchar_h" = yes
19417then
19418 # check whether wchar_t is signed or not
19419 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
19420echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
19421 if test "${ac_cv_wchar_t_signed+set}" = set; then
19422 echo $ECHO_N "(cached) $ECHO_C" >&6
19423else
19424
19425 if test "$cross_compiling" = yes; then
19426 ac_cv_wchar_t_signed=yes
19427else
19428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019429/* confdefs.h. */
19430_ACEOF
19431cat confdefs.h >>conftest.$ac_ext
19432cat >>conftest.$ac_ext <<_ACEOF
19433/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019434
19435 #include <wchar.h>
19436 int main()
19437 {
19438 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
19439 }
19440
19441_ACEOF
19442rm -f conftest$ac_exeext
19443if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19444 (eval $ac_link) 2>&5
19445 ac_status=$?
19446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19447 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19448 { (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_cv_wchar_t_signed=yes
19454else
19455 echo "$as_me: program exited with status $ac_status" >&5
19456echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019457sed 's/^/| /' conftest.$ac_ext >&5
19458
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019459( exit $ac_status )
19460ac_cv_wchar_t_signed=no
19461fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019462rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019463fi
19464fi
19465
19466 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
19467echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
19468fi
19469
Martin v. Löwis11437992002-04-12 09:54:03 +000019470echo "$as_me:$LINENO: checking what type to use for unicode" >&5
19471echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019472# Check whether --enable-unicode or --disable-unicode was given.
19473if test "${enable_unicode+set}" = set; then
19474 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000019475
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019476else
19477 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000019478fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019479
19480if test $enable_unicode = yes
19481then
Martin v. Löwisfd917792001-06-27 20:22:04 +000019482 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019483 case "$have_ucs4_tcl" in
19484 yes) enable_unicode="ucs4"
19485 ;;
19486 *) enable_unicode="ucs2"
19487 ;;
19488 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019489fi
19490
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019491
19492
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019493case "$enable_unicode" in
19494ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000019495 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019496#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000019497_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019498
19499 ;;
19500ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000019501 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019502#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000019503_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019504
19505 ;;
19506esac
19507
Michael W. Hudson54241132001-12-07 15:38:26 +000019508
Martin v. Löwis11437992002-04-12 09:54:03 +000019509
19510
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019511
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019512if test "$enable_unicode" = "no"
19513then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019514 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000019515 echo "$as_me:$LINENO: result: not used" >&5
19516echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019517else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019518 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000019519
19520cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019521#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019522_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019523
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019524
19525 # wchar_t is only usable if it maps to an unsigned type
19526 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000019527 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019528 then
19529 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019530
Martin v. Löwis11437992002-04-12 09:54:03 +000019531cat >>confdefs.h <<\_ACEOF
19532#define HAVE_USABLE_WCHAR_T 1
19533_ACEOF
19534
19535 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019536#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019537_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019538
19539 elif test "$ac_cv_sizeof_short" = "$unicode_size"
19540 then
19541 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000019542 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019543#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000019544_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019545
19546 elif test "$ac_cv_sizeof_long" = "$unicode_size"
19547 then
19548 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000019549 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019550#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000019551_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019552
19553 else
19554 PY_UNICODE_TYPE="no type found"
19555 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019556 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
19557echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019558fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019559
19560# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019561echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
19562echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
19563if test "${ac_cv_c_bigendian+set}" = set; then
19564 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019565else
Martin v. Löwis11437992002-04-12 09:54:03 +000019566 # See if sys/param.h defines the BYTE_ORDER macro.
19567cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019568/* confdefs.h. */
19569_ACEOF
19570cat confdefs.h >>conftest.$ac_ext
19571cat >>conftest.$ac_ext <<_ACEOF
19572/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019573#include <sys/types.h>
19574#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019575
Martin v. Löwis11437992002-04-12 09:54:03 +000019576int
19577main ()
19578{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019579#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
19580 bogus endian macros
19581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019582
19583 ;
19584 return 0;
19585}
19586_ACEOF
19587rm -f conftest.$ac_objext
19588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019589 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019591 grep -v '^ *+' conftest.er1 >conftest.err
19592 rm -f conftest.er1
19593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19595 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019596 { ac_try='test -z "$ac_c_werror_flag"
19597 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19599 (eval $ac_try) 2>&5
19600 ac_status=$?
19601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19602 (exit $ac_status); }; } &&
19603 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19605 (eval $ac_try) 2>&5
19606 ac_status=$?
19607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19608 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019609 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000019610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019611/* confdefs.h. */
19612_ACEOF
19613cat confdefs.h >>conftest.$ac_ext
19614cat >>conftest.$ac_ext <<_ACEOF
19615/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019616#include <sys/types.h>
19617#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019618
Martin v. Löwis11437992002-04-12 09:54:03 +000019619int
19620main ()
19621{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019622#if BYTE_ORDER != BIG_ENDIAN
19623 not big endian
19624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019625
19626 ;
19627 return 0;
19628}
19629_ACEOF
19630rm -f conftest.$ac_objext
19631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019632 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019634 grep -v '^ *+' conftest.er1 >conftest.err
19635 rm -f conftest.er1
19636 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19638 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019639 { ac_try='test -z "$ac_c_werror_flag"
19640 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19642 (eval $ac_try) 2>&5
19643 ac_status=$?
19644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19645 (exit $ac_status); }; } &&
19646 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19648 (eval $ac_try) 2>&5
19649 ac_status=$?
19650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19651 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019652 ac_cv_c_bigendian=yes
19653else
Martin v. Löwis11437992002-04-12 09:54:03 +000019654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019655sed 's/^/| /' conftest.$ac_ext >&5
19656
Martin v. Löwis11437992002-04-12 09:54:03 +000019657ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019658fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019659rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019660else
Martin v. Löwis11437992002-04-12 09:54:03 +000019661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019662sed 's/^/| /' conftest.$ac_ext >&5
19663
Martin v. Löwis11437992002-04-12 09:54:03 +000019664# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019665if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019666 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019667 ac_cv_c_bigendian=unknown
19668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019669/* confdefs.h. */
19670_ACEOF
19671cat confdefs.h >>conftest.$ac_ext
19672cat >>conftest.$ac_ext <<_ACEOF
19673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019674short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19675short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19676void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19677short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19678short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19679void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019680int
19681main ()
19682{
19683 _ascii (); _ebcdic ();
19684 ;
19685 return 0;
19686}
19687_ACEOF
19688rm -f conftest.$ac_objext
19689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019690 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019692 grep -v '^ *+' conftest.er1 >conftest.err
19693 rm -f conftest.er1
19694 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19696 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019697 { ac_try='test -z "$ac_c_werror_flag"
19698 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19700 (eval $ac_try) 2>&5
19701 ac_status=$?
19702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19703 (exit $ac_status); }; } &&
19704 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19706 (eval $ac_try) 2>&5
19707 ac_status=$?
19708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19709 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019710 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019711 ac_cv_c_bigendian=yes
19712fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019713if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019714 if test "$ac_cv_c_bigendian" = unknown; then
19715 ac_cv_c_bigendian=no
19716 else
19717 # finding both strings is unlikely to happen, but who knows?
19718 ac_cv_c_bigendian=unknown
19719 fi
19720fi
19721else
19722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019723sed 's/^/| /' conftest.$ac_ext >&5
19724
Martin v. Löwis11437992002-04-12 09:54:03 +000019725fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019726rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019727else
19728 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019729/* confdefs.h. */
19730_ACEOF
19731cat confdefs.h >>conftest.$ac_ext
19732cat >>conftest.$ac_ext <<_ACEOF
19733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019734int
19735main ()
19736{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019737 /* Are we little or big endian? From Harbison&Steele. */
19738 union
19739 {
19740 long l;
19741 char c[sizeof (long)];
19742 } u;
19743 u.l = 1;
19744 exit (u.c[sizeof (long) - 1] == 1);
19745}
Martin v. Löwis11437992002-04-12 09:54:03 +000019746_ACEOF
19747rm -f conftest$ac_exeext
19748if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19749 (eval $ac_link) 2>&5
19750 ac_status=$?
19751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19752 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19754 (eval $ac_try) 2>&5
19755 ac_status=$?
19756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19757 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019758 ac_cv_c_bigendian=no
19759else
Martin v. Löwis11437992002-04-12 09:54:03 +000019760 echo "$as_me: program exited with status $ac_status" >&5
19761echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019762sed 's/^/| /' conftest.$ac_ext >&5
19763
Martin v. Löwis11437992002-04-12 09:54:03 +000019764( exit $ac_status )
19765ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019766fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019767rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019768fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019769fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019771fi
19772echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19773echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19774case $ac_cv_c_bigendian in
19775 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019776
Martin v. Löwis11437992002-04-12 09:54:03 +000019777cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019778#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019779_ACEOF
19780 ;;
19781 no)
19782 ;;
19783 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019784 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019785presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019786echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019787presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19788 { (exit 1); exit 1; }; } ;;
19789esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019790
Michael W. Hudson54241132001-12-07 15:38:26 +000019791
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019792# Check whether right shifting a negative integer extends the sign bit
19793# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019794echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19795echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19796if test "${ac_cv_rshift_extends_sign+set}" = set; then
19797 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019798else
Martin v. Löwis11437992002-04-12 09:54:03 +000019799
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019800if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019801 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019802else
Martin v. Löwis11437992002-04-12 09:54:03 +000019803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019804/* confdefs.h. */
19805_ACEOF
19806cat confdefs.h >>conftest.$ac_ext
19807cat >>conftest.$ac_ext <<_ACEOF
19808/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019809
19810int main()
19811{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019812 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019813}
19814
Martin v. Löwis11437992002-04-12 09:54:03 +000019815_ACEOF
19816rm -f conftest$ac_exeext
19817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19818 (eval $ac_link) 2>&5
19819 ac_status=$?
19820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19823 (eval $ac_try) 2>&5
19824 ac_status=$?
19825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19826 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000019827 ac_cv_rshift_extends_sign=yes
19828else
Martin v. Löwis11437992002-04-12 09:54:03 +000019829 echo "$as_me: program exited with status $ac_status" >&5
19830echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019831sed 's/^/| /' conftest.$ac_ext >&5
19832
Martin v. Löwis11437992002-04-12 09:54:03 +000019833( exit $ac_status )
19834ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019835fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019836rm -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 +000019837fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019838fi
19839
Martin v. Löwis11437992002-04-12 09:54:03 +000019840echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19841echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019842if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019843then
Martin v. Löwis11437992002-04-12 09:54:03 +000019844
19845cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019846#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019847_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019848
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019849fi
19850
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019851# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019852echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19853echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19854if test "${ac_cv_have_getc_unlocked+set}" = set; then
19855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019856else
Martin v. Löwis11437992002-04-12 09:54:03 +000019857
19858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019859/* confdefs.h. */
19860_ACEOF
19861cat confdefs.h >>conftest.$ac_ext
19862cat >>conftest.$ac_ext <<_ACEOF
19863/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019864#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019865int
19866main ()
19867{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019868
19869 FILE *f = fopen("/dev/null", "r");
19870 flockfile(f);
19871 getc_unlocked(f);
19872 funlockfile(f);
19873
Martin v. Löwis11437992002-04-12 09:54:03 +000019874 ;
19875 return 0;
19876}
19877_ACEOF
19878rm -f conftest.$ac_objext conftest$ac_exeext
19879if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019880 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019882 grep -v '^ *+' conftest.er1 >conftest.err
19883 rm -f conftest.er1
19884 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19886 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019887 { ac_try='test -z "$ac_c_werror_flag"
19888 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19890 (eval $ac_try) 2>&5
19891 ac_status=$?
19892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19893 (exit $ac_status); }; } &&
19894 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19896 (eval $ac_try) 2>&5
19897 ac_status=$?
19898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19899 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019900 ac_cv_have_getc_unlocked=yes
19901else
Martin v. Löwis11437992002-04-12 09:54:03 +000019902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019903sed 's/^/| /' conftest.$ac_ext >&5
19904
Martin v. Löwis11437992002-04-12 09:54:03 +000019905ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019906fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019907rm -f conftest.err conftest.$ac_objext \
19908 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019909fi
19910
Martin v. Löwis11437992002-04-12 09:54:03 +000019911echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19912echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019913if test "$ac_cv_have_getc_unlocked" = yes
19914then
Martin v. Löwis11437992002-04-12 09:54:03 +000019915
19916cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019917#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019918_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019919
19920fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019921
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000019922# check where readline lives
19923
19924echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
19925echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
19926if test "${ac_cv_lib_readline_readline+set}" = set; then
19927 echo $ECHO_N "(cached) $ECHO_C" >&6
19928else
19929 ac_check_lib_save_LIBS=$LIBS
19930LIBS="-lreadline $LIBS"
19931cat >conftest.$ac_ext <<_ACEOF
19932/* confdefs.h. */
19933_ACEOF
19934cat confdefs.h >>conftest.$ac_ext
19935cat >>conftest.$ac_ext <<_ACEOF
19936/* end confdefs.h. */
19937
19938/* Override any gcc2 internal prototype to avoid an error. */
19939#ifdef __cplusplus
19940extern "C"
19941#endif
19942/* We use char because int might match the return type of a gcc2
19943 builtin and then its argument prototype would still apply. */
19944char readline ();
19945int
19946main ()
19947{
19948readline ();
19949 ;
19950 return 0;
19951}
19952_ACEOF
19953rm -f conftest.$ac_objext conftest$ac_exeext
19954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19955 (eval $ac_link) 2>conftest.er1
19956 ac_status=$?
19957 grep -v '^ *+' conftest.er1 >conftest.err
19958 rm -f conftest.er1
19959 cat conftest.err >&5
19960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19961 (exit $ac_status); } &&
19962 { ac_try='test -z "$ac_c_werror_flag"
19963 || test ! -s conftest.err'
19964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19965 (eval $ac_try) 2>&5
19966 ac_status=$?
19967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19968 (exit $ac_status); }; } &&
19969 { ac_try='test -s conftest$ac_exeext'
19970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19971 (eval $ac_try) 2>&5
19972 ac_status=$?
19973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19974 (exit $ac_status); }; }; then
19975 ac_cv_lib_readline_readline=yes
19976else
19977 echo "$as_me: failed program was:" >&5
19978sed 's/^/| /' conftest.$ac_ext >&5
19979
19980ac_cv_lib_readline_readline=no
19981fi
19982rm -f conftest.err conftest.$ac_objext \
19983 conftest$ac_exeext conftest.$ac_ext
19984LIBS=$ac_check_lib_save_LIBS
19985fi
19986echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
19987echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
19988if test $ac_cv_lib_readline_readline = yes; then
19989 cat >>confdefs.h <<_ACEOF
19990#define HAVE_LIBREADLINE 1
19991_ACEOF
19992
19993 LIBS="-lreadline $LIBS"
19994
19995fi
19996
19997if test "$ac_cv_have_readline_readline" = no
19998then
19999
20000echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
20001echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
20002if test "${ac_cv_lib_termcap_readline+set}" = set; then
20003 echo $ECHO_N "(cached) $ECHO_C" >&6
20004else
20005 ac_check_lib_save_LIBS=$LIBS
20006LIBS="-ltermcap $LIBS"
20007cat >conftest.$ac_ext <<_ACEOF
20008/* confdefs.h. */
20009_ACEOF
20010cat confdefs.h >>conftest.$ac_ext
20011cat >>conftest.$ac_ext <<_ACEOF
20012/* end confdefs.h. */
20013
20014/* Override any gcc2 internal prototype to avoid an error. */
20015#ifdef __cplusplus
20016extern "C"
20017#endif
20018/* We use char because int might match the return type of a gcc2
20019 builtin and then its argument prototype would still apply. */
20020char readline ();
20021int
20022main ()
20023{
20024readline ();
20025 ;
20026 return 0;
20027}
20028_ACEOF
20029rm -f conftest.$ac_objext conftest$ac_exeext
20030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20031 (eval $ac_link) 2>conftest.er1
20032 ac_status=$?
20033 grep -v '^ *+' conftest.er1 >conftest.err
20034 rm -f conftest.er1
20035 cat conftest.err >&5
20036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20037 (exit $ac_status); } &&
20038 { ac_try='test -z "$ac_c_werror_flag"
20039 || test ! -s conftest.err'
20040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20041 (eval $ac_try) 2>&5
20042 ac_status=$?
20043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20044 (exit $ac_status); }; } &&
20045 { ac_try='test -s conftest$ac_exeext'
20046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20047 (eval $ac_try) 2>&5
20048 ac_status=$?
20049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20050 (exit $ac_status); }; }; then
20051 ac_cv_lib_termcap_readline=yes
20052else
20053 echo "$as_me: failed program was:" >&5
20054sed 's/^/| /' conftest.$ac_ext >&5
20055
20056ac_cv_lib_termcap_readline=no
20057fi
20058rm -f conftest.err conftest.$ac_objext \
20059 conftest$ac_exeext conftest.$ac_ext
20060LIBS=$ac_check_lib_save_LIBS
20061fi
20062echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
20063echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
20064if test $ac_cv_lib_termcap_readline = yes; then
20065 cat >>confdefs.h <<_ACEOF
20066#define HAVE_LIBTERMCAP 1
20067_ACEOF
20068
20069 LIBS="-ltermcap $LIBS"
20070
20071fi
20072
20073fi
20074
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020075# check for readline 2.1
20076echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
20077echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
20078if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
20079 echo $ECHO_N "(cached) $ECHO_C" >&6
20080else
20081 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020082LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020083cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020084/* confdefs.h. */
20085_ACEOF
20086cat confdefs.h >>conftest.$ac_ext
20087cat >>conftest.$ac_ext <<_ACEOF
20088/* end confdefs.h. */
20089
20090/* Override any gcc2 internal prototype to avoid an error. */
20091#ifdef __cplusplus
20092extern "C"
20093#endif
20094/* We use char because int might match the return type of a gcc2
20095 builtin and then its argument prototype would still apply. */
20096char rl_callback_handler_install ();
20097int
20098main ()
20099{
20100rl_callback_handler_install ();
20101 ;
20102 return 0;
20103}
20104_ACEOF
20105rm -f conftest.$ac_objext conftest$ac_exeext
20106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020107 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020109 grep -v '^ *+' conftest.er1 >conftest.err
20110 rm -f conftest.er1
20111 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20113 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020114 { ac_try='test -z "$ac_c_werror_flag"
20115 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20117 (eval $ac_try) 2>&5
20118 ac_status=$?
20119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20120 (exit $ac_status); }; } &&
20121 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20123 (eval $ac_try) 2>&5
20124 ac_status=$?
20125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20126 (exit $ac_status); }; }; then
20127 ac_cv_lib_readline_rl_callback_handler_install=yes
20128else
20129 echo "$as_me: failed program was:" >&5
20130sed 's/^/| /' conftest.$ac_ext >&5
20131
20132ac_cv_lib_readline_rl_callback_handler_install=no
20133fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020134rm -f conftest.err conftest.$ac_objext \
20135 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020136LIBS=$ac_check_lib_save_LIBS
20137fi
20138echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
20139echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
20140if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
20141
20142cat >>confdefs.h <<\_ACEOF
20143#define HAVE_RL_CALLBACK 1
20144_ACEOF
20145
20146fi
20147
20148
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020149# check for readline 2.2
20150cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020151/* confdefs.h. */
20152_ACEOF
20153cat confdefs.h >>conftest.$ac_ext
20154cat >>conftest.$ac_ext <<_ACEOF
20155/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020156#include <readline/readline.h>
20157_ACEOF
20158if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20159 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20160 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020161 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020162 rm -f conftest.er1
20163 cat conftest.err >&5
20164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20165 (exit $ac_status); } >/dev/null; then
20166 if test -s conftest.err; then
20167 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020168 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020169 else
20170 ac_cpp_err=
20171 fi
20172else
20173 ac_cpp_err=yes
20174fi
20175if test -z "$ac_cpp_err"; then
20176 have_readline=yes
20177else
20178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020179sed 's/^/| /' conftest.$ac_ext >&5
20180
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020181 have_readline=no
20182fi
20183rm -f conftest.err conftest.$ac_ext
20184if test $have_readline = yes
20185then
20186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020187/* confdefs.h. */
20188_ACEOF
20189cat confdefs.h >>conftest.$ac_ext
20190cat >>conftest.$ac_ext <<_ACEOF
20191/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020192#include <readline/readline.h>
20193
20194_ACEOF
20195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000020196 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020197
20198cat >>confdefs.h <<\_ACEOF
20199#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
20200_ACEOF
20201
20202fi
20203rm -f conftest*
20204
20205fi
20206
Martin v. Löwis0daad592001-09-30 21:09:59 +000020207# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000020208echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
20209echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
20210if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
20211 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000020212else
Martin v. Löwis11437992002-04-12 09:54:03 +000020213 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020214LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020216/* confdefs.h. */
20217_ACEOF
20218cat confdefs.h >>conftest.$ac_ext
20219cat >>conftest.$ac_ext <<_ACEOF
20220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020221
Guido van Rossum353ae582001-07-10 16:45:32 +000020222/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020223#ifdef __cplusplus
20224extern "C"
20225#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000020226/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020227 builtin and then its argument prototype would still apply. */
20228char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020229int
20230main ()
20231{
20232rl_pre_input_hook ();
20233 ;
20234 return 0;
20235}
20236_ACEOF
20237rm -f conftest.$ac_objext conftest$ac_exeext
20238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020239 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020241 grep -v '^ *+' conftest.er1 >conftest.err
20242 rm -f conftest.er1
20243 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20245 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020246 { ac_try='test -z "$ac_c_werror_flag"
20247 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20249 (eval $ac_try) 2>&5
20250 ac_status=$?
20251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20252 (exit $ac_status); }; } &&
20253 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20255 (eval $ac_try) 2>&5
20256 ac_status=$?
20257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20258 (exit $ac_status); }; }; then
20259 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000020260else
Martin v. Löwis11437992002-04-12 09:54:03 +000020261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020262sed 's/^/| /' conftest.$ac_ext >&5
20263
Martin v. Löwis11437992002-04-12 09:54:03 +000020264ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000020265fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020266rm -f conftest.err conftest.$ac_objext \
20267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020268LIBS=$ac_check_lib_save_LIBS
20269fi
20270echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
20271echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
20272if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020273
Martin v. Löwis11437992002-04-12 09:54:03 +000020274cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020275#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020276_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020277
Martin v. Löwis0daad592001-09-30 21:09:59 +000020278fi
20279
Michael W. Hudson54241132001-12-07 15:38:26 +000020280
Martin v. Löwis0daad592001-09-30 21:09:59 +000020281# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000020282echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
20283echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
20284if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
20285 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000020286else
Martin v. Löwis11437992002-04-12 09:54:03 +000020287 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020288LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020290/* confdefs.h. */
20291_ACEOF
20292cat confdefs.h >>conftest.$ac_ext
20293cat >>conftest.$ac_ext <<_ACEOF
20294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020295
Martin v. Löwis0daad592001-09-30 21:09:59 +000020296/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020297#ifdef __cplusplus
20298extern "C"
20299#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000020300/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020301 builtin and then its argument prototype would still apply. */
20302char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020303int
20304main ()
20305{
20306rl_completion_matches ();
20307 ;
20308 return 0;
20309}
20310_ACEOF
20311rm -f conftest.$ac_objext conftest$ac_exeext
20312if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020313 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020315 grep -v '^ *+' conftest.er1 >conftest.err
20316 rm -f conftest.er1
20317 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20319 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020320 { ac_try='test -z "$ac_c_werror_flag"
20321 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20323 (eval $ac_try) 2>&5
20324 ac_status=$?
20325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20326 (exit $ac_status); }; } &&
20327 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20329 (eval $ac_try) 2>&5
20330 ac_status=$?
20331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20332 (exit $ac_status); }; }; then
20333 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000020334else
Martin v. Löwis11437992002-04-12 09:54:03 +000020335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020336sed 's/^/| /' conftest.$ac_ext >&5
20337
Martin v. Löwis11437992002-04-12 09:54:03 +000020338ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000020339fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020340rm -f conftest.err conftest.$ac_objext \
20341 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020342LIBS=$ac_check_lib_save_LIBS
20343fi
20344echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
20345echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
20346if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020347
Martin v. Löwis11437992002-04-12 09:54:03 +000020348cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020349#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020350_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020351
Guido van Rossum353ae582001-07-10 16:45:32 +000020352fi
20353
Jack Jansendd19cf82001-12-06 22:36:17 +000020354
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020355# also in readline 4.2
20356cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020357/* confdefs.h. */
20358_ACEOF
20359cat confdefs.h >>conftest.$ac_ext
20360cat >>conftest.$ac_ext <<_ACEOF
20361/* end confdefs.h. */
20362#include <readline/readline.h>
20363_ACEOF
20364if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20365 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20366 ac_status=$?
20367 grep -v '^ *+' conftest.er1 >conftest.err
20368 rm -f conftest.er1
20369 cat conftest.err >&5
20370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20371 (exit $ac_status); } >/dev/null; then
20372 if test -s conftest.err; then
20373 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020374 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020375 else
20376 ac_cpp_err=
20377 fi
20378else
20379 ac_cpp_err=yes
20380fi
20381if test -z "$ac_cpp_err"; then
20382 have_readline=yes
20383else
20384 echo "$as_me: failed program was:" >&5
20385sed 's/^/| /' conftest.$ac_ext >&5
20386
20387 have_readline=no
20388fi
20389rm -f conftest.err conftest.$ac_ext
20390if test $have_readline = yes
20391then
20392 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020393/* confdefs.h. */
20394_ACEOF
20395cat confdefs.h >>conftest.$ac_ext
20396cat >>conftest.$ac_ext <<_ACEOF
20397/* end confdefs.h. */
20398#include <readline/readline.h>
20399
20400_ACEOF
20401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20402 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
20403
20404cat >>confdefs.h <<\_ACEOF
20405#define HAVE_RL_CATCH_SIGNAL 1
20406_ACEOF
20407
20408fi
20409rm -f conftest*
20410
20411fi
20412
Martin v. Löwis11437992002-04-12 09:54:03 +000020413echo "$as_me:$LINENO: checking for broken nice()" >&5
20414echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
20415if test "${ac_cv_broken_nice+set}" = set; then
20416 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020417else
Martin v. Löwis11437992002-04-12 09:54:03 +000020418
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020419if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020420 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020421else
Martin v. Löwis11437992002-04-12 09:54:03 +000020422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020423/* confdefs.h. */
20424_ACEOF
20425cat confdefs.h >>conftest.$ac_ext
20426cat >>conftest.$ac_ext <<_ACEOF
20427/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020428
20429int main()
20430{
20431 int val1 = nice(1);
20432 if (val1 != -1 && val1 == nice(2))
20433 exit(0);
20434 exit(1);
20435}
20436
Martin v. Löwis11437992002-04-12 09:54:03 +000020437_ACEOF
20438rm -f conftest$ac_exeext
20439if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20440 (eval $ac_link) 2>&5
20441 ac_status=$?
20442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20443 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20445 (eval $ac_try) 2>&5
20446 ac_status=$?
20447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20448 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020449 ac_cv_broken_nice=yes
20450else
Martin v. Löwis11437992002-04-12 09:54:03 +000020451 echo "$as_me: program exited with status $ac_status" >&5
20452echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020453sed 's/^/| /' conftest.$ac_ext >&5
20454
Martin v. Löwis11437992002-04-12 09:54:03 +000020455( exit $ac_status )
20456ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020457fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020458rm -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 +000020459fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020460fi
20461
Martin v. Löwis11437992002-04-12 09:54:03 +000020462echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
20463echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020464if test "$ac_cv_broken_nice" = yes
20465then
Martin v. Löwis11437992002-04-12 09:54:03 +000020466
20467cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020468#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020469_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000020470
20471fi
20472
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020473echo "$as_me:$LINENO: checking for broken poll()" >&5
20474echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
20475if test "$cross_compiling" = yes; then
20476 ac_cv_broken_poll=no
20477else
20478 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020479/* confdefs.h. */
20480_ACEOF
20481cat confdefs.h >>conftest.$ac_ext
20482cat >>conftest.$ac_ext <<_ACEOF
20483/* end confdefs.h. */
20484
20485#include <poll.h>
20486
20487int main (void)
20488 {
20489 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
20490
20491 close (42);
20492
20493 int poll_test = poll (&poll_struct, 1, 0);
20494
20495 if (poll_test < 0)
20496 {
20497 exit(0);
20498 }
20499 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
20500 {
20501 exit(0);
20502 }
20503 else
20504 {
20505 exit(1);
20506 }
20507 }
20508
20509_ACEOF
20510rm -f conftest$ac_exeext
20511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20512 (eval $ac_link) 2>&5
20513 ac_status=$?
20514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20517 (eval $ac_try) 2>&5
20518 ac_status=$?
20519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20520 (exit $ac_status); }; }; then
20521 ac_cv_broken_poll=yes
20522else
20523 echo "$as_me: program exited with status $ac_status" >&5
20524echo "$as_me: failed program was:" >&5
20525sed 's/^/| /' conftest.$ac_ext >&5
20526
20527( exit $ac_status )
20528ac_cv_broken_poll=no
20529fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020530rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020531fi
20532echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
20533echo "${ECHO_T}$ac_cv_broken_poll" >&6
20534if test "$ac_cv_broken_poll" = yes
20535then
20536
20537cat >>confdefs.h <<\_ACEOF
20538#define HAVE_BROKEN_POLL 1
20539_ACEOF
20540
20541fi
20542
Brett Cannon43802422005-02-10 20:48:03 +000020543# 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 +000020544# (which is not required by ISO C or UNIX spec) and/or if we support
20545# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000020546echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20547echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20548if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20549 echo $ECHO_N "(cached) $ECHO_C" >&6
20550else
20551 cat >conftest.$ac_ext <<_ACEOF
20552/* confdefs.h. */
20553_ACEOF
20554cat confdefs.h >>conftest.$ac_ext
20555cat >>conftest.$ac_ext <<_ACEOF
20556/* end confdefs.h. */
20557#include <sys/types.h>
20558#include <$ac_cv_struct_tm>
20559
20560
20561int
20562main ()
20563{
20564static struct tm ac_aggr;
20565if (ac_aggr.tm_zone)
20566return 0;
20567 ;
20568 return 0;
20569}
20570_ACEOF
20571rm -f conftest.$ac_objext
20572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20573 (eval $ac_compile) 2>conftest.er1
20574 ac_status=$?
20575 grep -v '^ *+' conftest.er1 >conftest.err
20576 rm -f conftest.er1
20577 cat conftest.err >&5
20578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20579 (exit $ac_status); } &&
20580 { ac_try='test -z "$ac_c_werror_flag"
20581 || test ! -s conftest.err'
20582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20583 (eval $ac_try) 2>&5
20584 ac_status=$?
20585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20586 (exit $ac_status); }; } &&
20587 { ac_try='test -s conftest.$ac_objext'
20588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20589 (eval $ac_try) 2>&5
20590 ac_status=$?
20591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20592 (exit $ac_status); }; }; then
20593 ac_cv_member_struct_tm_tm_zone=yes
20594else
20595 echo "$as_me: failed program was:" >&5
20596sed 's/^/| /' conftest.$ac_ext >&5
20597
20598cat >conftest.$ac_ext <<_ACEOF
20599/* confdefs.h. */
20600_ACEOF
20601cat confdefs.h >>conftest.$ac_ext
20602cat >>conftest.$ac_ext <<_ACEOF
20603/* end confdefs.h. */
20604#include <sys/types.h>
20605#include <$ac_cv_struct_tm>
20606
20607
20608int
20609main ()
20610{
20611static struct tm ac_aggr;
20612if (sizeof ac_aggr.tm_zone)
20613return 0;
20614 ;
20615 return 0;
20616}
20617_ACEOF
20618rm -f conftest.$ac_objext
20619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20620 (eval $ac_compile) 2>conftest.er1
20621 ac_status=$?
20622 grep -v '^ *+' conftest.er1 >conftest.err
20623 rm -f conftest.er1
20624 cat conftest.err >&5
20625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20626 (exit $ac_status); } &&
20627 { ac_try='test -z "$ac_c_werror_flag"
20628 || test ! -s conftest.err'
20629 { (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); }; } &&
20634 { ac_try='test -s conftest.$ac_objext'
20635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20636 (eval $ac_try) 2>&5
20637 ac_status=$?
20638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20639 (exit $ac_status); }; }; then
20640 ac_cv_member_struct_tm_tm_zone=yes
20641else
20642 echo "$as_me: failed program was:" >&5
20643sed 's/^/| /' conftest.$ac_ext >&5
20644
20645ac_cv_member_struct_tm_tm_zone=no
20646fi
20647rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20648fi
20649rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20650fi
20651echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20652echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20653if test $ac_cv_member_struct_tm_tm_zone = yes; then
20654
20655cat >>confdefs.h <<_ACEOF
20656#define HAVE_STRUCT_TM_TM_ZONE 1
20657_ACEOF
20658
20659
20660fi
20661
20662if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20663
20664cat >>confdefs.h <<\_ACEOF
20665#define HAVE_TM_ZONE 1
20666_ACEOF
20667
20668else
20669 echo "$as_me:$LINENO: checking for tzname" >&5
20670echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20671if test "${ac_cv_var_tzname+set}" = set; then
20672 echo $ECHO_N "(cached) $ECHO_C" >&6
20673else
20674 cat >conftest.$ac_ext <<_ACEOF
20675/* confdefs.h. */
20676_ACEOF
20677cat confdefs.h >>conftest.$ac_ext
20678cat >>conftest.$ac_ext <<_ACEOF
20679/* end confdefs.h. */
20680#include <time.h>
20681#ifndef tzname /* For SGI. */
20682extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20683#endif
20684
20685int
20686main ()
20687{
20688atoi(*tzname);
20689 ;
20690 return 0;
20691}
20692_ACEOF
20693rm -f conftest.$ac_objext conftest$ac_exeext
20694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20695 (eval $ac_link) 2>conftest.er1
20696 ac_status=$?
20697 grep -v '^ *+' conftest.er1 >conftest.err
20698 rm -f conftest.er1
20699 cat conftest.err >&5
20700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20701 (exit $ac_status); } &&
20702 { ac_try='test -z "$ac_c_werror_flag"
20703 || test ! -s conftest.err'
20704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20705 (eval $ac_try) 2>&5
20706 ac_status=$?
20707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20708 (exit $ac_status); }; } &&
20709 { ac_try='test -s conftest$ac_exeext'
20710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20711 (eval $ac_try) 2>&5
20712 ac_status=$?
20713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20714 (exit $ac_status); }; }; then
20715 ac_cv_var_tzname=yes
20716else
20717 echo "$as_me: failed program was:" >&5
20718sed 's/^/| /' conftest.$ac_ext >&5
20719
20720ac_cv_var_tzname=no
20721fi
20722rm -f conftest.err conftest.$ac_objext \
20723 conftest$ac_exeext conftest.$ac_ext
20724fi
20725echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20726echo "${ECHO_T}$ac_cv_var_tzname" >&6
20727 if test $ac_cv_var_tzname = yes; then
20728
20729cat >>confdefs.h <<\_ACEOF
20730#define HAVE_TZNAME 1
20731_ACEOF
20732
20733 fi
20734fi
20735
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020736
Martin v. Löwis1d459062005-03-14 21:23:33 +000020737# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020738echo "$as_me:$LINENO: checking for working tzset()" >&5
20739echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
20740if test "${ac_cv_working_tzset+set}" = set; then
20741 echo $ECHO_N "(cached) $ECHO_C" >&6
20742else
20743
20744if test "$cross_compiling" = yes; then
20745 ac_cv_working_tzset=no
20746else
20747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020748/* confdefs.h. */
20749_ACEOF
20750cat confdefs.h >>conftest.$ac_ext
20751cat >>conftest.$ac_ext <<_ACEOF
20752/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020753
20754#include <stdlib.h>
20755#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000020756#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000020757
20758#if HAVE_TZNAME
20759extern char *tzname[];
20760#endif
20761
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020762int main()
20763{
Brett Cannon18367812003-09-19 00:59:16 +000020764 /* Note that we need to ensure that not only does tzset(3)
20765 do 'something' with localtime, but it works as documented
20766 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000020767 This includes making sure that tzname is set properly if
20768 tm->tm_zone does not exist since it is the alternative way
20769 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000020770
20771 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000020772 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000020773 */
20774
Martin v. Löwis1d459062005-03-14 21:23:33 +000020775 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000020776 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
20777
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020778 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020779 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020780 if (localtime(&groundhogday)->tm_hour != 0)
20781 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020782#if HAVE_TZNAME
20783 /* For UTC, tzname[1] is sometimes "", sometimes " " */
20784 if (strcmp(tzname[0], "UTC") ||
20785 (tzname[1][0] != 0 && tzname[1][0] != ' '))
20786 exit(1);
20787#endif
Brett Cannon18367812003-09-19 00:59:16 +000020788
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020789 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020790 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020791 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020792 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020793#if HAVE_TZNAME
20794 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
20795 exit(1);
20796#endif
Brett Cannon18367812003-09-19 00:59:16 +000020797
20798 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
20799 tzset();
20800 if (localtime(&groundhogday)->tm_hour != 11)
20801 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020802#if HAVE_TZNAME
20803 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
20804 exit(1);
20805#endif
20806
20807#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000020808 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
20809 exit(1);
20810 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
20811 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020812#endif
Brett Cannon18367812003-09-19 00:59:16 +000020813
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020814 exit(0);
20815}
20816
20817_ACEOF
20818rm -f conftest$ac_exeext
20819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20820 (eval $ac_link) 2>&5
20821 ac_status=$?
20822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20823 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20825 (eval $ac_try) 2>&5
20826 ac_status=$?
20827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20828 (exit $ac_status); }; }; then
20829 ac_cv_working_tzset=yes
20830else
20831 echo "$as_me: program exited with status $ac_status" >&5
20832echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020833sed 's/^/| /' conftest.$ac_ext >&5
20834
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020835( exit $ac_status )
20836ac_cv_working_tzset=no
20837fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020838rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020839fi
20840fi
20841
20842echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
20843echo "${ECHO_T}$ac_cv_working_tzset" >&6
20844if test "$ac_cv_working_tzset" = yes
20845then
20846
20847cat >>confdefs.h <<\_ACEOF
20848#define HAVE_WORKING_TZSET 1
20849_ACEOF
20850
20851fi
20852
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020853# Look for subsecond timestamps in struct stat
20854echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
20855echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
20856if test "${ac_cv_stat_tv_nsec+set}" = set; then
20857 echo $ECHO_N "(cached) $ECHO_C" >&6
20858else
20859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020860/* confdefs.h. */
20861_ACEOF
20862cat confdefs.h >>conftest.$ac_ext
20863cat >>conftest.$ac_ext <<_ACEOF
20864/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020865#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020866int
20867main ()
20868{
20869
20870struct stat st;
20871st.st_mtim.tv_nsec = 1;
20872
20873 ;
20874 return 0;
20875}
20876_ACEOF
20877rm -f conftest.$ac_objext
20878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020879 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020881 grep -v '^ *+' conftest.er1 >conftest.err
20882 rm -f conftest.er1
20883 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20885 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020886 { ac_try='test -z "$ac_c_werror_flag"
20887 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20889 (eval $ac_try) 2>&5
20890 ac_status=$?
20891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20892 (exit $ac_status); }; } &&
20893 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20895 (eval $ac_try) 2>&5
20896 ac_status=$?
20897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20898 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000020899 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020900else
20901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020902sed 's/^/| /' conftest.$ac_ext >&5
20903
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020904ac_cv_stat_tv_nsec=no
20905fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020907fi
20908
20909echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
20910echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
20911if test "$ac_cv_stat_tv_nsec" = yes
20912then
20913
20914cat >>confdefs.h <<\_ACEOF
20915#define HAVE_STAT_TV_NSEC 1
20916_ACEOF
20917
20918fi
20919
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020920# Look for BSD style subsecond timestamps in struct stat
20921echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
20922echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
20923if test "${ac_cv_stat_tv_nsec2+set}" = set; then
20924 echo $ECHO_N "(cached) $ECHO_C" >&6
20925else
20926 cat >conftest.$ac_ext <<_ACEOF
20927/* confdefs.h. */
20928_ACEOF
20929cat confdefs.h >>conftest.$ac_ext
20930cat >>conftest.$ac_ext <<_ACEOF
20931/* end confdefs.h. */
20932#include <sys/stat.h>
20933int
20934main ()
20935{
20936
20937struct stat st;
20938st.st_mtimespec.tv_nsec = 1;
20939
20940 ;
20941 return 0;
20942}
20943_ACEOF
20944rm -f conftest.$ac_objext
20945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20946 (eval $ac_compile) 2>conftest.er1
20947 ac_status=$?
20948 grep -v '^ *+' conftest.er1 >conftest.err
20949 rm -f conftest.er1
20950 cat conftest.err >&5
20951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20952 (exit $ac_status); } &&
20953 { ac_try='test -z "$ac_c_werror_flag"
20954 || test ! -s conftest.err'
20955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20956 (eval $ac_try) 2>&5
20957 ac_status=$?
20958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20959 (exit $ac_status); }; } &&
20960 { ac_try='test -s conftest.$ac_objext'
20961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20962 (eval $ac_try) 2>&5
20963 ac_status=$?
20964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20965 (exit $ac_status); }; }; then
20966 ac_cv_stat_tv_nsec2=yes
20967else
20968 echo "$as_me: failed program was:" >&5
20969sed 's/^/| /' conftest.$ac_ext >&5
20970
20971ac_cv_stat_tv_nsec2=no
20972fi
20973rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20974fi
20975
20976echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
20977echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
20978if test "$ac_cv_stat_tv_nsec2" = yes
20979then
20980
20981cat >>confdefs.h <<\_ACEOF
20982#define HAVE_STAT_TV_NSEC2 1
20983_ACEOF
20984
20985fi
20986
Jack Jansen666b1e72001-10-31 12:11:48 +000020987# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000020988echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
20989echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
20990if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
20991 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020992else
Martin v. Löwis11437992002-04-12 09:54:03 +000020993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020994/* confdefs.h. */
20995_ACEOF
20996cat confdefs.h >>conftest.$ac_ext
20997cat >>conftest.$ac_ext <<_ACEOF
20998/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020999#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021000int
21001main ()
21002{
Jack Jansen666b1e72001-10-31 12:11:48 +000021003
21004 int rtn;
21005 rtn = mvwdelch(0,0,0);
21006
Martin v. Löwis11437992002-04-12 09:54:03 +000021007 ;
21008 return 0;
21009}
21010_ACEOF
21011rm -f conftest.$ac_objext
21012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021013 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021015 grep -v '^ *+' conftest.er1 >conftest.err
21016 rm -f conftest.er1
21017 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21019 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021020 { ac_try='test -z "$ac_c_werror_flag"
21021 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21023 (eval $ac_try) 2>&5
21024 ac_status=$?
21025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21026 (exit $ac_status); }; } &&
21027 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21029 (eval $ac_try) 2>&5
21030 ac_status=$?
21031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21032 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021033 ac_cv_mvwdelch_is_expression=yes
21034else
Martin v. Löwis11437992002-04-12 09:54:03 +000021035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021036sed 's/^/| /' conftest.$ac_ext >&5
21037
Martin v. Löwis11437992002-04-12 09:54:03 +000021038ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021039fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021041fi
21042
Martin v. Löwis11437992002-04-12 09:54:03 +000021043echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
21044echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021045
21046if test "$ac_cv_mvwdelch_is_expression" = yes
21047then
Martin v. Löwis11437992002-04-12 09:54:03 +000021048
21049cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021050#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021051_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021052
21053fi
21054
Martin v. Löwis11437992002-04-12 09:54:03 +000021055echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
21056echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
21057if test "${ac_cv_window_has_flags+set}" = set; then
21058 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021059else
Martin v. Löwis11437992002-04-12 09:54:03 +000021060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021061/* confdefs.h. */
21062_ACEOF
21063cat confdefs.h >>conftest.$ac_ext
21064cat >>conftest.$ac_ext <<_ACEOF
21065/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000021066#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021067int
21068main ()
21069{
Jack Jansen666b1e72001-10-31 12:11:48 +000021070
21071 WINDOW *w;
21072 w->_flags = 0;
21073
Martin v. Löwis11437992002-04-12 09:54:03 +000021074 ;
21075 return 0;
21076}
21077_ACEOF
21078rm -f conftest.$ac_objext
21079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021080 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021082 grep -v '^ *+' conftest.er1 >conftest.err
21083 rm -f conftest.er1
21084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21086 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021087 { ac_try='test -z "$ac_c_werror_flag"
21088 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21090 (eval $ac_try) 2>&5
21091 ac_status=$?
21092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21093 (exit $ac_status); }; } &&
21094 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21096 (eval $ac_try) 2>&5
21097 ac_status=$?
21098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21099 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021100 ac_cv_window_has_flags=yes
21101else
Martin v. Löwis11437992002-04-12 09:54:03 +000021102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021103sed 's/^/| /' conftest.$ac_ext >&5
21104
Martin v. Löwis11437992002-04-12 09:54:03 +000021105ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021106fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021107rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021108fi
21109
Martin v. Löwis11437992002-04-12 09:54:03 +000021110echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
21111echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021112
Jack Jansen666b1e72001-10-31 12:11:48 +000021113
21114if test "$ac_cv_window_has_flags" = yes
21115then
Martin v. Löwis11437992002-04-12 09:54:03 +000021116
21117cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021118#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021119_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021120
21121fi
21122
Martin v. Löwis24a880b2002-12-31 12:55:15 +000021123echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
21124echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
21125
21126if test -e /dev/ptmx
21127then
21128 echo "$as_me:$LINENO: result: yes" >&5
21129echo "${ECHO_T}yes" >&6
21130
21131cat >>confdefs.h <<\_ACEOF
21132#define HAVE_DEV_PTMX 1
21133_ACEOF
21134
21135else
21136 echo "$as_me:$LINENO: result: no" >&5
21137echo "${ECHO_T}no" >&6
21138fi
21139
Neal Norwitz865400f2003-03-21 01:42:58 +000021140echo "$as_me:$LINENO: checking for /dev/ptc" >&5
21141echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
21142
21143if test -e /dev/ptc
21144then
21145 echo "$as_me:$LINENO: result: yes" >&5
21146echo "${ECHO_T}yes" >&6
21147
21148cat >>confdefs.h <<\_ACEOF
21149#define HAVE_DEV_PTC 1
21150_ACEOF
21151
21152else
21153 echo "$as_me:$LINENO: result: no" >&5
21154echo "${ECHO_T}no" >&6
21155fi
21156
Martin v. Löwis11437992002-04-12 09:54:03 +000021157echo "$as_me:$LINENO: checking for socklen_t" >&5
21158echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
21159if test "${ac_cv_type_socklen_t+set}" = set; then
21160 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000021161else
Martin v. Löwis11437992002-04-12 09:54:03 +000021162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021163/* confdefs.h. */
21164_ACEOF
21165cat confdefs.h >>conftest.$ac_ext
21166cat >>conftest.$ac_ext <<_ACEOF
21167/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000021168
21169#ifdef HAVE_SYS_TYPES_H
21170#include <sys/types.h>
21171#endif
21172#ifdef HAVE_SYS_SOCKET_H
21173#include <sys/socket.h>
21174#endif
21175
21176
Martin v. Löwis11437992002-04-12 09:54:03 +000021177int
21178main ()
21179{
21180if ((socklen_t *) 0)
21181 return 0;
21182if (sizeof (socklen_t))
21183 return 0;
21184 ;
21185 return 0;
21186}
21187_ACEOF
21188rm -f conftest.$ac_objext
21189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021190 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021192 grep -v '^ *+' conftest.er1 >conftest.err
21193 rm -f conftest.er1
21194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21196 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021197 { ac_try='test -z "$ac_c_werror_flag"
21198 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21200 (eval $ac_try) 2>&5
21201 ac_status=$?
21202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21203 (exit $ac_status); }; } &&
21204 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21206 (eval $ac_try) 2>&5
21207 ac_status=$?
21208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21209 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000021210 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000021211else
Martin v. Löwis11437992002-04-12 09:54:03 +000021212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021213sed 's/^/| /' conftest.$ac_ext >&5
21214
Martin v. Löwis11437992002-04-12 09:54:03 +000021215ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000021216fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021217rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021218fi
21219echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
21220echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
21221if test $ac_cv_type_socklen_t = yes; then
21222 :
21223else
Guido van Rossum95713eb2000-05-18 20:53:31 +000021224
Martin v. Löwis01c04012002-11-11 14:58:44 +000021225cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021226#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000021227_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021228
21229fi
21230
Michael W. Hudson54241132001-12-07 15:38:26 +000021231
Michael W. Hudson54241132001-12-07 15:38:26 +000021232
21233
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000021234for h in `(cd $srcdir;echo Python/thread_*.h)`
21235do
21236 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
21237done
21238
Michael W. Hudson54241132001-12-07 15:38:26 +000021239
Neal Norwitzd24499d2005-12-18 21:36:39 +000021240SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwis11437992002-04-12 09:54:03 +000021241echo "$as_me:$LINENO: checking for build directories" >&5
21242echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021243for dir in $SRCDIRS; do
21244 if test ! -d $dir; then
21245 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000021246 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021247done
Martin v. Löwis11437992002-04-12 09:54:03 +000021248echo "$as_me:$LINENO: result: done" >&5
21249echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000021250
Guido van Rossum627b2d71993-12-24 10:39:16 +000021251# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000021252 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000021253
Martin v. Löwis11437992002-04-12 09:54:03 +000021254cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021255# This file is a shell script that caches the results of configure
21256# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000021257# scripts and configure runs, see configure's option --config-cache.
21258# It is not useful on other systems. If it contains results you don't
21259# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021260#
Martin v. Löwis11437992002-04-12 09:54:03 +000021261# config.status only pays attention to the cache file if you give it
21262# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021263#
Skip Montanaro6dead952003-09-25 14:50:04 +000021264# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000021265# loading this file, other *unset* `ac_cv_foo' will be assigned the
21266# following values.
21267
21268_ACEOF
21269
Guido van Rossumf78abae1997-01-21 22:02:36 +000021270# The following way of writing the cache mishandles newlines in values,
21271# but we know of no workaround that is simple, portable, and efficient.
21272# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021273# Ultrix sh set writes to stderr and can't be redirected directly,
21274# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000021275{
21276 (set) 2>&1 |
21277 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21278 *ac_space=\ *)
21279 # `set' does not quote correctly, so add quotes (double-quote
21280 # substitution turns \\\\ into \\, and sed turns \\ into \).
21281 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021282 "s/'/'\\\\''/g;
21283 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021284 ;;
21285 *)
21286 # `set' quotes correctly as required by POSIX, so do not add quotes.
21287 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021288 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021289 ;;
21290 esac;
21291} |
21292 sed '
21293 t clear
21294 : clear
21295 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21296 t end
21297 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21298 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000021299if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021300 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021301 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21302 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021303 else
21304 echo "not updating unwritable cache $cache_file"
21305 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021306fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021307rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000021308
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021309test "x$prefix" = xNONE && prefix=$ac_default_prefix
21310# Let make expand exec_prefix.
21311test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000021312
Martin v. Löwis11437992002-04-12 09:54:03 +000021313# VPATH may cause trouble with some makes, so we remove $(srcdir),
21314# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21315# trailing colons and then remove the whole line if VPATH becomes empty
21316# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000021317if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021318 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000021319s/:*\$(srcdir):*/:/;
21320s/:*\${srcdir}:*/:/;
21321s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021322s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000021323s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021324s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000021325}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021326fi
21327
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021328DEFS=-DHAVE_CONFIG_H
21329
Skip Montanaro6dead952003-09-25 14:50:04 +000021330ac_libobjs=
21331ac_ltlibobjs=
21332for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21333 # 1. Remove the extension, and $U if already installed.
21334 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021335 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021336 # 2. Add them.
21337 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21338 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21339done
21340LIBOBJS=$ac_libobjs
21341
21342LTLIBOBJS=$ac_ltlibobjs
21343
21344
Martin v. Löwis11437992002-04-12 09:54:03 +000021345
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021346: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000021347ac_clean_files_save=$ac_clean_files
21348ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21349{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21350echo "$as_me: creating $CONFIG_STATUS" >&6;}
21351cat >$CONFIG_STATUS <<_ACEOF
21352#! $SHELL
21353# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021354# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021355# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000021356# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021357
Martin v. Löwis11437992002-04-12 09:54:03 +000021358debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000021359ac_cs_recheck=false
21360ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021361SHELL=\${CONFIG_SHELL-$SHELL}
21362_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000021363
Martin v. Löwis11437992002-04-12 09:54:03 +000021364cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021365## --------------------- ##
21366## M4sh Initialization. ##
21367## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000021368
Martin v. Löwis11437992002-04-12 09:54:03 +000021369# Be Bourne compatible
21370if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21371 emulate sh
21372 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021373 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21374 # is contrary to our usage. Disable this feature.
21375 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021376elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21377 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000021378fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021379DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000021380
Martin v. Löwis11437992002-04-12 09:54:03 +000021381# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021382if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021383 as_unset=unset
21384else
21385 as_unset=false
21386fi
Michael W. Hudson54241132001-12-07 15:38:26 +000021387
Skip Montanaro6dead952003-09-25 14:50:04 +000021388
21389# Work around bugs in pre-3.0 UWIN ksh.
21390$as_unset ENV MAIL MAILPATH
21391PS1='$ '
21392PS2='> '
21393PS4='+ '
21394
21395# NLS nuisances.
21396for as_var in \
21397 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21398 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21399 LC_TELEPHONE LC_TIME
21400do
Skip Montanarof0d5f792004-08-15 14:08:23 +000021401 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000021402 eval $as_var=C; export $as_var
21403 else
21404 $as_unset $as_var
21405 fi
21406done
21407
21408# Required to use basename.
21409if expr a : '\(a\)' >/dev/null 2>&1; then
21410 as_expr=expr
21411else
21412 as_expr=false
21413fi
21414
21415if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
21416 as_basename=basename
21417else
21418 as_basename=false
21419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021420
21421
21422# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000021423as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021424$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21425 X"$0" : 'X\(//\)$' \| \
21426 X"$0" : 'X\(/\)$' \| \
21427 . : '\(.\)' 2>/dev/null ||
21428echo X/"$0" |
21429 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21430 /^X\/\(\/\/\)$/{ s//\1/; q; }
21431 /^X\/\(\/\).*/{ s//\1/; q; }
21432 s/.*/./; q'`
21433
Skip Montanaro6dead952003-09-25 14:50:04 +000021434
Martin v. Löwis11437992002-04-12 09:54:03 +000021435# PATH needs CR, and LINENO needs CR and PATH.
21436# Avoid depending upon Character Ranges.
21437as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21438as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21439as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21440as_cr_digits='0123456789'
21441as_cr_alnum=$as_cr_Letters$as_cr_digits
21442
21443# The user is always right.
21444if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021445 echo "#! /bin/sh" >conf$$.sh
21446 echo "exit 0" >>conf$$.sh
21447 chmod +x conf$$.sh
21448 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021449 PATH_SEPARATOR=';'
21450 else
21451 PATH_SEPARATOR=:
21452 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021453 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000021454fi
21455
21456
21457 as_lineno_1=$LINENO
21458 as_lineno_2=$LINENO
21459 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21460 test "x$as_lineno_1" != "x$as_lineno_2" &&
21461 test "x$as_lineno_3" = "x$as_lineno_2" || {
21462 # Find who we are. Look in the path if we contain no path at all
21463 # relative or not.
21464 case $0 in
21465 *[\\/]* ) as_myself=$0 ;;
21466 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21467for as_dir in $PATH
21468do
21469 IFS=$as_save_IFS
21470 test -z "$as_dir" && as_dir=.
21471 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21472done
21473
21474 ;;
21475 esac
21476 # We did not find ourselves, most probably we were run as `sh COMMAND'
21477 # in which case we are not to be found in the path.
21478 if test "x$as_myself" = x; then
21479 as_myself=$0
21480 fi
21481 if test ! -f "$as_myself"; then
21482 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21483echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21484 { (exit 1); exit 1; }; }
21485 fi
21486 case $CONFIG_SHELL in
21487 '')
21488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21489for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21490do
21491 IFS=$as_save_IFS
21492 test -z "$as_dir" && as_dir=.
21493 for as_base in sh bash ksh sh5; do
21494 case $as_dir in
21495 /*)
21496 if ("$as_dir/$as_base" -c '
21497 as_lineno_1=$LINENO
21498 as_lineno_2=$LINENO
21499 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21500 test "x$as_lineno_1" != "x$as_lineno_2" &&
21501 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021502 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21503 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021504 CONFIG_SHELL=$as_dir/$as_base
21505 export CONFIG_SHELL
21506 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21507 fi;;
21508 esac
21509 done
21510done
21511;;
Jack Jansendd19cf82001-12-06 22:36:17 +000021512 esac
21513
Martin v. Löwis11437992002-04-12 09:54:03 +000021514 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21515 # uniformly replaced by the line number. The first 'sed' inserts a
21516 # line-number line before each line; the second 'sed' does the real
21517 # work. The second script uses 'N' to pair each line-number line
21518 # with the numbered line, and appends trailing '-' during
21519 # substitution so that $LINENO is not a special case at line end.
21520 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21521 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21522 sed '=' <$as_myself |
21523 sed '
21524 N
21525 s,$,-,
21526 : loop
21527 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
21528 t loop
21529 s,-$,,
21530 s,^['$as_cr_digits']*\n,,
21531 ' >$as_me.lineno &&
21532 chmod +x $as_me.lineno ||
21533 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21534echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
21535 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021536
Martin v. Löwis11437992002-04-12 09:54:03 +000021537 # Don't try to exec as it changes $[0], causing all sort of problems
21538 # (the dirname of $[0] is not the place where we might find the
21539 # original and so on. Autoconf is especially sensible to this).
21540 . ./$as_me.lineno
21541 # Exit status is that of the last command.
21542 exit
21543}
21544
21545
21546case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21547 *c*,-n*) ECHO_N= ECHO_C='
21548' ECHO_T=' ' ;;
21549 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21550 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
21551esac
21552
21553if expr a : '\(a\)' >/dev/null 2>&1; then
21554 as_expr=expr
21555else
21556 as_expr=false
21557fi
21558
21559rm -f conf$$ conf$$.exe conf$$.file
21560echo >conf$$.file
21561if ln -s conf$$.file conf$$ 2>/dev/null; then
21562 # We could just check for DJGPP; but this test a) works b) is more generic
21563 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21564 if test -f conf$$.exe; then
21565 # Don't use ln at all; we don't have any links
21566 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021567 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021568 as_ln_s='ln -s'
21569 fi
21570elif ln conf$$.file conf$$ 2>/dev/null; then
21571 as_ln_s=ln
21572else
21573 as_ln_s='cp -p'
21574fi
21575rm -f conf$$ conf$$.exe conf$$.file
21576
Skip Montanaro6dead952003-09-25 14:50:04 +000021577if mkdir -p . 2>/dev/null; then
21578 as_mkdir_p=:
21579else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021580 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000021581 as_mkdir_p=false
21582fi
21583
Martin v. Löwis11437992002-04-12 09:54:03 +000021584as_executable_p="test -f"
21585
21586# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021587as_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 +000021588
21589# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021590as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000021591
21592
21593# IFS
21594# We need space, tab and new line, in precisely that order.
21595as_nl='
21596'
21597IFS=" $as_nl"
21598
21599# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000021600$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000021601
21602exec 6>&1
21603
21604# Open the log real soon, to keep \$[0] and so on meaningful, and to
21605# report actual input values of CONFIG_FILES etc. instead of their
21606# values after options handling. Logging --version etc. is OK.
21607exec 5>>config.log
21608{
21609 echo
21610 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21611## Running $as_me. ##
21612_ASBOX
21613} >&5
21614cat >&5 <<_CSEOF
21615
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000021616This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000021617generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000021618
21619 CONFIG_FILES = $CONFIG_FILES
21620 CONFIG_HEADERS = $CONFIG_HEADERS
21621 CONFIG_LINKS = $CONFIG_LINKS
21622 CONFIG_COMMANDS = $CONFIG_COMMANDS
21623 $ $0 $@
21624
21625_CSEOF
21626echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21627echo >&5
21628_ACEOF
21629
21630# Files that config.status was made for.
21631if test -n "$ac_config_files"; then
21632 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21633fi
21634
21635if test -n "$ac_config_headers"; then
21636 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21637fi
21638
21639if test -n "$ac_config_links"; then
21640 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21641fi
21642
21643if test -n "$ac_config_commands"; then
21644 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21645fi
21646
21647cat >>$CONFIG_STATUS <<\_ACEOF
21648
21649ac_cs_usage="\
21650\`$as_me' instantiates files from templates according to the
21651current configuration.
21652
21653Usage: $0 [OPTIONS] [FILE]...
21654
21655 -h, --help print this help, then exit
21656 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000021657 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000021658 -d, --debug don't remove temporary files
21659 --recheck update $as_me by reconfiguring in the same conditions
21660 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021661 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021662 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000021663 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000021664
21665Configuration files:
21666$config_files
21667
21668Configuration headers:
21669$config_headers
21670
21671Report bugs to <bug-autoconf@gnu.org>."
21672_ACEOF
21673
21674cat >>$CONFIG_STATUS <<_ACEOF
21675ac_cs_version="\\
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000021676python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021677configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000021678 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21679
Skip Montanarof0d5f792004-08-15 14:08:23 +000021680Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000021681This config.status script is free software; the Free Software Foundation
21682gives unlimited permission to copy, distribute and modify it."
21683srcdir=$srcdir
21684INSTALL="$INSTALL"
21685_ACEOF
21686
21687cat >>$CONFIG_STATUS <<\_ACEOF
21688# If no file are specified by the user, then we need to provide default
21689# value. By we need to know if files were specified by the user.
21690ac_need_defaults=:
21691while test $# != 0
21692do
21693 case $1 in
21694 --*=*)
21695 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21696 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021697 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000021698 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021699 -*)
21700 ac_option=$1
21701 ac_optarg=$2
21702 ac_shift=shift
21703 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021704 *) # This is not an option, so the user has probably given explicit
21705 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000021706 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000021707 ac_need_defaults=false;;
21708 esac
21709
Skip Montanaro6dead952003-09-25 14:50:04 +000021710 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000021711 # Handling of the options.
21712_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021713cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021714 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21715 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021716 --version | --vers* | -V )
21717 echo "$ac_cs_version"; exit 0 ;;
21718 --he | --h)
21719 # Conflict between --help and --header
21720 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21721Try \`$0 --help' for more information." >&5
21722echo "$as_me: error: ambiguous option: $1
21723Try \`$0 --help' for more information." >&2;}
21724 { (exit 1); exit 1; }; };;
21725 --help | --hel | -h )
21726 echo "$ac_cs_usage"; exit 0 ;;
21727 --debug | --d* | -d )
21728 debug=: ;;
21729 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000021730 $ac_shift
21731 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021732 ac_need_defaults=false;;
21733 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000021734 $ac_shift
21735 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021736 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021737 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21738 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21739 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021740
21741 # This is an error.
21742 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21743Try \`$0 --help' for more information." >&5
21744echo "$as_me: error: unrecognized option: $1
21745Try \`$0 --help' for more information." >&2;}
21746 { (exit 1); exit 1; }; } ;;
21747
21748 *) ac_config_targets="$ac_config_targets $1" ;;
21749
21750 esac
21751 shift
21752done
21753
Skip Montanaro6dead952003-09-25 14:50:04 +000021754ac_configure_extra_args=
21755
21756if $ac_cs_silent; then
21757 exec 6>/dev/null
21758 ac_configure_extra_args="$ac_configure_extra_args --silent"
21759fi
21760
21761_ACEOF
21762cat >>$CONFIG_STATUS <<_ACEOF
21763if \$ac_cs_recheck; then
21764 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21765 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21766fi
21767
Martin v. Löwis11437992002-04-12 09:54:03 +000021768_ACEOF
21769
21770
21771
21772
21773
21774cat >>$CONFIG_STATUS <<\_ACEOF
21775for ac_config_target in $ac_config_targets
21776do
21777 case "$ac_config_target" in
21778 # Handling of arguments.
21779 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
21780 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
21781 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
21782 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21783echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21784 { (exit 1); exit 1; }; };;
21785 esac
21786done
21787
21788# If the user did not use the arguments to specify the items to instantiate,
21789# then the envvar interface is used. Set only those that are not.
21790# We use the long form for the default assignment because of an extremely
21791# bizarre bug on SunOS 4.1.3.
21792if $ac_need_defaults; then
21793 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21794 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21795fi
21796
Skip Montanaro6dead952003-09-25 14:50:04 +000021797# Have a temporary directory for convenience. Make it in the build tree
21798# simply because there is no reason to put it here, and in addition,
21799# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000021800# Create a temporary directory, and hook for its removal unless debugging.
21801$debug ||
21802{
21803 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21804 trap '{ (exit 1); exit 1; }' 1 2 13 15
21805}
21806
21807# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000021808
Martin v. Löwis11437992002-04-12 09:54:03 +000021809{
Skip Montanaro6dead952003-09-25 14:50:04 +000021810 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000021811 test -n "$tmp" && test -d "$tmp"
21812} ||
21813{
Skip Montanaro6dead952003-09-25 14:50:04 +000021814 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000021815 (umask 077 && mkdir $tmp)
21816} ||
21817{
Skip Montanaro6dead952003-09-25 14:50:04 +000021818 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000021819 { (exit 1); exit 1; }
21820}
21821
21822_ACEOF
21823
21824cat >>$CONFIG_STATUS <<_ACEOF
21825
21826#
21827# CONFIG_FILES section.
21828#
21829
21830# No need to generate the scripts if there are no CONFIG_FILES.
21831# This happens for instance when ./config.status config.h
21832if test -n "\$CONFIG_FILES"; then
21833 # Protect against being on the right side of a sed subst in config.status.
21834 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21835 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21836s,@SHELL@,$SHELL,;t t
21837s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21838s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21839s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21840s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21841s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21842s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21843s,@exec_prefix@,$exec_prefix,;t t
21844s,@prefix@,$prefix,;t t
21845s,@program_transform_name@,$program_transform_name,;t t
21846s,@bindir@,$bindir,;t t
21847s,@sbindir@,$sbindir,;t t
21848s,@libexecdir@,$libexecdir,;t t
21849s,@datadir@,$datadir,;t t
21850s,@sysconfdir@,$sysconfdir,;t t
21851s,@sharedstatedir@,$sharedstatedir,;t t
21852s,@localstatedir@,$localstatedir,;t t
21853s,@libdir@,$libdir,;t t
21854s,@includedir@,$includedir,;t t
21855s,@oldincludedir@,$oldincludedir,;t t
21856s,@infodir@,$infodir,;t t
21857s,@mandir@,$mandir,;t t
21858s,@build_alias@,$build_alias,;t t
21859s,@host_alias@,$host_alias,;t t
21860s,@target_alias@,$target_alias,;t t
21861s,@DEFS@,$DEFS,;t t
21862s,@ECHO_C@,$ECHO_C,;t t
21863s,@ECHO_N@,$ECHO_N,;t t
21864s,@ECHO_T@,$ECHO_T,;t t
21865s,@LIBS@,$LIBS,;t t
21866s,@VERSION@,$VERSION,;t t
21867s,@SOVERSION@,$SOVERSION,;t t
21868s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
21869s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
21870s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
21871s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
21872s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
21873s,@MACHDEP@,$MACHDEP,;t t
21874s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000021875s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000021876s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000021877s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021878s,@CXX@,$CXX,;t t
21879s,@MAINOBJ@,$MAINOBJ,;t t
21880s,@EXEEXT@,$EXEEXT,;t t
21881s,@CC@,$CC,;t t
21882s,@CFLAGS@,$CFLAGS,;t t
21883s,@LDFLAGS@,$LDFLAGS,;t t
21884s,@CPPFLAGS@,$CPPFLAGS,;t t
21885s,@ac_ct_CC@,$ac_ct_CC,;t t
21886s,@OBJEXT@,$OBJEXT,;t t
21887s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021888s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021889s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
21890s,@LIBRARY@,$LIBRARY,;t t
21891s,@LDLIBRARY@,$LDLIBRARY,;t t
21892s,@DLLLIBRARY@,$DLLLIBRARY,;t t
21893s,@BLDLIBRARY@,$BLDLIBRARY,;t t
21894s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
21895s,@INSTSONAME@,$INSTSONAME,;t t
21896s,@RUNSHARED@,$RUNSHARED,;t t
21897s,@LINKCC@,$LINKCC,;t t
21898s,@RANLIB@,$RANLIB,;t t
21899s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21900s,@AR@,$AR,;t t
Martin v. Löwisdea59e52006-01-05 10:00:36 +000021901s,@SVNVERSION@,$SVNVERSION,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021902s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21903s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21904s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21905s,@LN@,$LN,;t t
21906s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000021907s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000021908s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021909s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
21910s,@SO@,$SO,;t t
21911s,@LDSHARED@,$LDSHARED,;t t
21912s,@BLDSHARED@,$BLDSHARED,;t t
21913s,@CCSHARED@,$CCSHARED,;t t
21914s,@LINKFORSHARED@,$LINKFORSHARED,;t t
21915s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000021916s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021917s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
21918s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
21919s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
21920s,@LDLAST@,$LDLAST,;t t
21921s,@THREADOBJ@,$THREADOBJ,;t t
21922s,@DLINCLDIR@,$DLINCLDIR,;t t
21923s,@DYNLOADFILE@,$DYNLOADFILE,;t t
21924s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000021925s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021926s,@LIBOBJS@,$LIBOBJS,;t t
21927s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
21928s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
21929s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
21930s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
21931s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
21932s,@LIBM@,$LIBM,;t t
21933s,@LIBC@,$LIBC,;t t
21934s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
21935s,@THREADHEADERS@,$THREADHEADERS,;t t
21936s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021937s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021938CEOF
21939
21940_ACEOF
21941
21942 cat >>$CONFIG_STATUS <<\_ACEOF
21943 # Split the substitutions into bite-sized pieces for seds with
21944 # small command number limits, like on Digital OSF/1 and HP-UX.
21945 ac_max_sed_lines=48
21946 ac_sed_frag=1 # Number of current file.
21947 ac_beg=1 # First line for current file.
21948 ac_end=$ac_max_sed_lines # Line after last line for current file.
21949 ac_more_lines=:
21950 ac_sed_cmds=
21951 while $ac_more_lines; do
21952 if test $ac_beg -gt 1; then
21953 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21954 else
21955 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21956 fi
21957 if test ! -s $tmp/subs.frag; then
21958 ac_more_lines=false
21959 else
21960 # The purpose of the label and of the branching condition is to
21961 # speed up the sed processing (if there are no `@' at all, there
21962 # is no need to browse any of the substitutions).
21963 # These are the two extra sed commands mentioned above.
21964 (echo ':t
21965 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21966 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021967 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021968 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021969 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021970 fi
21971 ac_sed_frag=`expr $ac_sed_frag + 1`
21972 ac_beg=$ac_end
21973 ac_end=`expr $ac_end + $ac_max_sed_lines`
21974 fi
21975 done
21976 if test -z "$ac_sed_cmds"; then
21977 ac_sed_cmds=cat
21978 fi
21979fi # test -n "$CONFIG_FILES"
21980
21981_ACEOF
21982cat >>$CONFIG_STATUS <<\_ACEOF
21983for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21984 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21985 case $ac_file in
21986 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021987 cat >$tmp/stdin
21988 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21989 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021990 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021991 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021992 * ) ac_file_in=$ac_file.in ;;
21993 esac
21994
21995 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21996 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21997$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021998 X"$ac_file" : 'X\(//\)[^/]' \| \
21999 X"$ac_file" : 'X\(//\)$' \| \
22000 X"$ac_file" : 'X\(/\)' \| \
22001 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022002echo X"$ac_file" |
22003 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22004 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22005 /^X\(\/\/\)$/{ s//\1/; q; }
22006 /^X\(\/\).*/{ s//\1/; q; }
22007 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022008 { if $as_mkdir_p; then
22009 mkdir -p "$ac_dir"
22010 else
22011 as_dir="$ac_dir"
22012 as_dirs=
22013 while test ! -d "$as_dir"; do
22014 as_dirs="$as_dir $as_dirs"
22015 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22016$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022017 X"$as_dir" : 'X\(//\)[^/]' \| \
22018 X"$as_dir" : 'X\(//\)$' \| \
22019 X"$as_dir" : 'X\(/\)' \| \
22020 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022021echo X"$as_dir" |
22022 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22023 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22024 /^X\(\/\/\)$/{ s//\1/; q; }
22025 /^X\(\/\).*/{ s//\1/; q; }
22026 s/.*/./; q'`
22027 done
22028 test ! -n "$as_dirs" || mkdir $as_dirs
22029 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22030echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22031 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022032
22033 ac_builddir=.
22034
22035if test "$ac_dir" != .; then
22036 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22037 # A "../" for each directory in $ac_dir_suffix.
22038 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22039else
22040 ac_dir_suffix= ac_top_builddir=
22041fi
22042
22043case $srcdir in
22044 .) # No --srcdir option. We are building in place.
22045 ac_srcdir=.
22046 if test -z "$ac_top_builddir"; then
22047 ac_top_srcdir=.
22048 else
22049 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22050 fi ;;
22051 [\\/]* | ?:[\\/]* ) # Absolute path.
22052 ac_srcdir=$srcdir$ac_dir_suffix;
22053 ac_top_srcdir=$srcdir ;;
22054 *) # Relative path.
22055 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22056 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22057esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000022058
22059# Do not use `cd foo && pwd` to compute absolute paths, because
22060# the directories may not exist.
22061case `pwd` in
22062.) ac_abs_builddir="$ac_dir";;
22063*)
22064 case "$ac_dir" in
22065 .) ac_abs_builddir=`pwd`;;
22066 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22067 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22068 esac;;
22069esac
22070case $ac_abs_builddir in
22071.) ac_abs_top_builddir=${ac_top_builddir}.;;
22072*)
22073 case ${ac_top_builddir}. in
22074 .) ac_abs_top_builddir=$ac_abs_builddir;;
22075 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22076 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22077 esac;;
22078esac
22079case $ac_abs_builddir in
22080.) ac_abs_srcdir=$ac_srcdir;;
22081*)
22082 case $ac_srcdir in
22083 .) ac_abs_srcdir=$ac_abs_builddir;;
22084 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22085 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22086 esac;;
22087esac
22088case $ac_abs_builddir in
22089.) ac_abs_top_srcdir=$ac_top_srcdir;;
22090*)
22091 case $ac_top_srcdir in
22092 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22093 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22094 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22095 esac;;
22096esac
Martin v. Löwis11437992002-04-12 09:54:03 +000022097
22098
22099 case $INSTALL in
22100 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22101 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
22102 esac
22103
Brett Cannon43802422005-02-10 20:48:03 +000022104 if test x"$ac_file" != x-; then
22105 { echo "$as_me:$LINENO: creating $ac_file" >&5
22106echo "$as_me: creating $ac_file" >&6;}
22107 rm -f "$ac_file"
22108 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022109 # Let's still pretend it is `configure' which instantiates (i.e., don't
22110 # use $as_me), people would be surprised to read:
22111 # /* config.h. Generated by config.status. */
22112 if test x"$ac_file" = x-; then
22113 configure_input=
22114 else
22115 configure_input="$ac_file. "
22116 fi
22117 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000022118 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000022119
22120 # First look for the input files in the build tree, otherwise in the
22121 # src tree.
22122 ac_file_inputs=`IFS=:
22123 for f in $ac_file_in; do
22124 case $f in
22125 -) echo $tmp/stdin ;;
22126 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022127 # Absolute (can't be DOS-style, as IFS=:)
22128 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022129echo "$as_me: error: cannot find input file: $f" >&2;}
22130 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022131 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022132 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022133 if test -f "$f"; then
22134 # Build tree
22135 echo "$f"
22136 elif test -f "$srcdir/$f"; then
22137 # Source tree
22138 echo "$srcdir/$f"
22139 else
22140 # /dev/null tree
22141 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022142echo "$as_me: error: cannot find input file: $f" >&2;}
22143 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022144 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 esac
22146 done` || { (exit 1); exit 1; }
22147_ACEOF
22148cat >>$CONFIG_STATUS <<_ACEOF
22149 sed "$ac_vpsub
22150$extrasub
22151_ACEOF
22152cat >>$CONFIG_STATUS <<\_ACEOF
22153:t
22154/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22155s,@configure_input@,$configure_input,;t t
22156s,@srcdir@,$ac_srcdir,;t t
22157s,@abs_srcdir@,$ac_abs_srcdir,;t t
22158s,@top_srcdir@,$ac_top_srcdir,;t t
22159s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22160s,@builddir@,$ac_builddir,;t t
22161s,@abs_builddir@,$ac_abs_builddir,;t t
22162s,@top_builddir@,$ac_top_builddir,;t t
22163s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22164s,@INSTALL@,$ac_INSTALL,;t t
22165" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22166 rm -f $tmp/stdin
22167 if test x"$ac_file" != x-; then
22168 mv $tmp/out $ac_file
22169 else
22170 cat $tmp/out
22171 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022172 fi
22173
Martin v. Löwis11437992002-04-12 09:54:03 +000022174done
22175_ACEOF
22176cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022177
Martin v. Löwis11437992002-04-12 09:54:03 +000022178#
22179# CONFIG_HEADER section.
22180#
Guido van Rossum627b2d71993-12-24 10:39:16 +000022181
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022182# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22183# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000022184#
22185# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022186ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22187ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000022188ac_dC=' '
22189ac_dD=',;t'
22190# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000022191ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000022192ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022193ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000022194ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022195
Martin v. Löwis11437992002-04-12 09:54:03 +000022196for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000022197 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000022198 case $ac_file in
22199 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022200 cat >$tmp/stdin
22201 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22202 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022203 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022204 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022205 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022206 esac
22207
Martin v. Löwis11437992002-04-12 09:54:03 +000022208 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22209echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022210
Martin v. Löwis11437992002-04-12 09:54:03 +000022211 # First look for the input files in the build tree, otherwise in the
22212 # src tree.
22213 ac_file_inputs=`IFS=:
22214 for f in $ac_file_in; do
22215 case $f in
22216 -) echo $tmp/stdin ;;
22217 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022218 # Absolute (can't be DOS-style, as IFS=:)
22219 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022220echo "$as_me: error: cannot find input file: $f" >&2;}
22221 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022222 # Do quote $f, to prevent DOS paths from being IFS'd.
22223 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022224 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022225 if test -f "$f"; then
22226 # Build tree
22227 echo "$f"
22228 elif test -f "$srcdir/$f"; then
22229 # Source tree
22230 echo "$srcdir/$f"
22231 else
22232 # /dev/null tree
22233 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022234echo "$as_me: error: cannot find input file: $f" >&2;}
22235 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022236 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022237 esac
22238 done` || { (exit 1); exit 1; }
22239 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022240 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022241
Martin v. Löwis11437992002-04-12 09:54:03 +000022242_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022243
Martin v. Löwis11437992002-04-12 09:54:03 +000022244# Transform confdefs.h into two sed scripts, `conftest.defines' and
22245# `conftest.undefs', that substitutes the proper values into
22246# config.h.in to produce config.h. The first handles `#define'
22247# templates, and the second `#undef' templates.
22248# And first: Protect against being on the right side of a sed subst in
22249# config.status. Protect against being in an unquoted here document
22250# in config.status.
22251rm -f conftest.defines conftest.undefs
22252# Using a here document instead of a string reduces the quoting nightmare.
22253# Putting comments in sed scripts is not portable.
22254#
22255# `end' is used to avoid that the second main sed command (meant for
22256# 0-ary CPP macros) applies to n-ary macro definitions.
22257# See the Autoconf documentation for `clear'.
22258cat >confdef2sed.sed <<\_ACEOF
22259s/[\\&,]/\\&/g
22260s,[\\$`],\\&,g
22261t clear
22262: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000022263s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022264t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000022265s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022266: end
22267_ACEOF
22268# If some macros were called several times there might be several times
22269# the same #defines, which is useless. Nevertheless, we may not want to
22270# sort them, since we want the *last* AC-DEFINE to be honored.
22271uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22272sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22273rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022274
22275# This sed command replaces #undef with comments. This is necessary, for
22276# example, in the case of _POSIX_SOURCE, which is predefined and required
22277# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000022278cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000022279s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000022280_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022281
Martin v. Löwis11437992002-04-12 09:54:03 +000022282# Break up conftest.defines because some shells have a limit on the size
22283# of here documents, and old seds have small limits too (100 cmds).
22284echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000022285echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022286echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22287echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022288rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000022289while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000022290do
Martin v. Löwis11437992002-04-12 09:54:03 +000022291 # Write a limited-size here document to $tmp/defines.sed.
22292 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22293 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022294 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022295 # Work around the forget-to-reset-the-flag bug.
22296 echo 't clr' >>$CONFIG_STATUS
22297 echo ': clr' >>$CONFIG_STATUS
22298 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022299 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022300 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22301 rm -f $tmp/in
22302 mv $tmp/out $tmp/in
22303' >>$CONFIG_STATUS
22304 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22305 rm -f conftest.defines
22306 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000022307done
Martin v. Löwis11437992002-04-12 09:54:03 +000022308rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000022309echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022310echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022311
Martin v. Löwis11437992002-04-12 09:54:03 +000022312# Break up conftest.undefs because some shells have a limit on the size
22313# of here documents, and old seds have small limits too (100 cmds).
22314echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22315rm -f conftest.tail
22316while grep . conftest.undefs >/dev/null
22317do
22318 # Write a limited-size here document to $tmp/undefs.sed.
22319 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22320 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000022321 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022322 # Work around the forget-to-reset-the-flag bug.
22323 echo 't clr' >>$CONFIG_STATUS
22324 echo ': clr' >>$CONFIG_STATUS
22325 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22326 echo 'CEOF
22327 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22328 rm -f $tmp/in
22329 mv $tmp/out $tmp/in
22330' >>$CONFIG_STATUS
22331 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22332 rm -f conftest.undefs
22333 mv conftest.tail conftest.undefs
22334done
22335rm -f conftest.undefs
22336
22337cat >>$CONFIG_STATUS <<\_ACEOF
22338 # Let's still pretend it is `configure' which instantiates (i.e., don't
22339 # use $as_me), people would be surprised to read:
22340 # /* config.h. Generated by config.status. */
22341 if test x"$ac_file" = x-; then
22342 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000022343 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022344 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000022345 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022346 cat $tmp/in >>$tmp/config.h
22347 rm -f $tmp/in
22348 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022349 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022350 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22351echo "$as_me: $ac_file is unchanged" >&6;}
22352 else
22353 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22354$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022355 X"$ac_file" : 'X\(//\)[^/]' \| \
22356 X"$ac_file" : 'X\(//\)$' \| \
22357 X"$ac_file" : 'X\(/\)' \| \
22358 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022359echo X"$ac_file" |
22360 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22361 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22362 /^X\(\/\/\)$/{ s//\1/; q; }
22363 /^X\(\/\).*/{ s//\1/; q; }
22364 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022365 { if $as_mkdir_p; then
22366 mkdir -p "$ac_dir"
22367 else
22368 as_dir="$ac_dir"
22369 as_dirs=
22370 while test ! -d "$as_dir"; do
22371 as_dirs="$as_dir $as_dirs"
22372 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22373$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022374 X"$as_dir" : 'X\(//\)[^/]' \| \
22375 X"$as_dir" : 'X\(//\)$' \| \
22376 X"$as_dir" : 'X\(/\)' \| \
22377 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022378echo X"$as_dir" |
22379 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22380 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22381 /^X\(\/\/\)$/{ s//\1/; q; }
22382 /^X\(\/\).*/{ s//\1/; q; }
22383 s/.*/./; q'`
22384 done
22385 test ! -n "$as_dirs" || mkdir $as_dirs
22386 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22387echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22388 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022389
Martin v. Löwis11437992002-04-12 09:54:03 +000022390 rm -f $ac_file
22391 mv $tmp/config.h $ac_file
22392 fi
22393 else
22394 cat $tmp/config.h
22395 rm -f $tmp/config.h
22396 fi
22397done
22398_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022399
Martin v. Löwis11437992002-04-12 09:54:03 +000022400cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022401
Martin v. Löwis11437992002-04-12 09:54:03 +000022402{ (exit 0); exit 0; }
22403_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022404chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022405ac_clean_files=$ac_clean_files_save
22406
22407
22408# configure is writing to config.log, and then calls config.status.
22409# config.status does its own redirection, appending to config.log.
22410# Unfortunately, on DOS this fails, as config.log is still kept open
22411# by configure, so config.status won't be able to write to it; its
22412# output is simply discarded. So we exec the FD to /dev/null,
22413# effectively closing config.log, so it can be properly (re)opened and
22414# appended to by config.status. When coming back to configure, we
22415# need to make the FD available again.
22416if test "$no_create" != yes; then
22417 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000022418 ac_config_status_args=
22419 test "$silent" = yes &&
22420 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000022421 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000022422 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000022423 exec 5>>config.log
22424 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22425 # would make configure fail if this is the last instruction.
22426 $ac_cs_success || { (exit 1); exit 1; }
22427fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000022428
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000022429
22430echo "creating Setup"
22431if test ! -f Modules/Setup
22432then
22433 cp $srcdir/Modules/Setup.dist Modules/Setup
22434fi
22435
22436echo "creating Setup.local"
22437if test ! -f Modules/Setup.local
22438then
22439 echo "# Edit this file for local setup changes" >Modules/Setup.local
22440fi
22441
22442echo "creating Makefile"
22443$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
22444 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000022445 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000022446mv config.c Modules